Commit 49a2612b authored by Kristof Szabados's avatar Kristof Szabados
Browse files

paths containing only space should be handled as empty

parent 70de503b
......@@ -160,7 +160,7 @@ public final class CompilerVersionInformationCollector {
* problems.
* */
private static CompilerInfoStruct collectVersionInformation(final String path) {
if (path == null || path.length() == 0) {
if (path == null || path.trim().length() == 0) {
return null;
}
......
......@@ -2228,7 +2228,7 @@ public final class InternalMakefileGenerator {
allProjectsUseSymbolicLinks = usingSymbolicLinks;
String temp = ResourceUtils.getPersistentProperty(project, ProjectBuildPropertyData.QUALIFIER, MakefileCreationData.TARGET_EXECUTABLE_PROPERTY);
if (temp != null && temp.length() > 0) {
if (temp != null && temp.trim().length() > 0) {
IPath resolvedPath = TITANPathUtilities.resolvePath(temp, projectLocation);
etsName = PathConverter.convert(resolvedPath.toOSString(), reportDebugInformation, TITANDebugConsole.getConsole());
} else {
......
......@@ -76,7 +76,7 @@ public final class LicenseValidator {
PreferenceConstants.LICENSE_FILE_PATH, "", null);
wasChecked = true;
if (licensePath == null || "".equals(licensePath)) {
if (licensePath == null || licensePath.trim().length() == 0) {
showErrorDialog("Checking for TITAN license failed", "The path of the license for TITAN is not set.\n\n" + CORRECTIONSTRING);
wasCorrect = false;
return false;
......@@ -166,7 +166,7 @@ public final class LicenseValidator {
boolean reportDebugInformation = preferenceService.getBoolean(ProductConstants.PRODUCT_ID_DESIGNER,
PreferenceConstants.DISPLAYDEBUGINFORMATION, false, null);
if (force || "".equals(resolvedLicenseFilePath)) {
if (force || resolvedLicenseFilePath.length() == 0) {
String licensePath = preferenceService.getString(ProductConstants.PRODUCT_ID_DESIGNER, PreferenceConstants.LICENSE_FILE_PATH,
"", null);
resolvedLicenseFilePath = PathConverter.convert(licensePath, reportDebugInformation, TITANDebugConsole.getConsole());
......
......@@ -94,7 +94,7 @@ public final class EnvironmentHelper {
}
final String temp = DesignerHelper.getTTCN3DIR();
if (null == temp || 0 == temp.length()) {
if (null == temp || 0 == temp.trim().length()) {
return temp;
}
......@@ -115,7 +115,7 @@ public final class EnvironmentHelper {
}
String temp = DesignerHelper.getTTCN3DIR();
if (null == temp || 0 == temp.length()) {
if (null == temp || 0 == temp.trim().length()) {
return env;
}
......@@ -139,7 +139,7 @@ public final class EnvironmentHelper {
}
String temp = DesignerHelper.getTTCN3LICENSEFILE();
if (null == temp || 0 == temp.length()) {
if (null == temp || 0 == temp.trim().length()) {
return env;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment