diff --git a/app/src/processing/app/debug/Compiler.java b/app/src/processing/app/debug/Compiler.java index 2b328f5f9..284550faa 100644 --- a/app/src/processing/app/debug/Compiler.java +++ b/app/src/processing/app/debug/Compiler.java @@ -79,7 +79,7 @@ public class Compiler implements MessageConsumer { sketch.setCompilingProgress(20); List includePaths = new ArrayList(); includePaths.add(prefs.get("build.core.path")); - if (!prefs.get("build.variant.path").isEmpty()) + if (prefs.get("build.variant.path").length() != 0) includePaths.add(prefs.get("build.variant.path")); for (File file : sketch.getImportedLibraries()) includePaths.add(file.getPath()); @@ -304,7 +304,7 @@ public class Compiler implements MessageConsumer { List stringList = new ArrayList(); for (String string : command) { string = string.trim(); - if (!string.isEmpty()) + if (string.length() != 0) stringList.add(string); } command = stringList.toArray(new String[stringList.size()]); @@ -602,12 +602,12 @@ public class Compiler implements MessageConsumer { List includePaths = new ArrayList(); includePaths.add(corePath); // include core path only - if (!variantPath.isEmpty()) + if (variantPath.length() != 0) includePaths.add(variantPath); List coreObjectFiles = compileFiles(buildPath, new File(corePath), true, includePaths); - if (!variantPath.isEmpty()) + if (variantPath.length() != 0) coreObjectFiles.addAll(compileFiles(buildPath, new File(variantPath), true, includePaths)); diff --git a/app/src/processing/app/helpers/StringReplacer.java b/app/src/processing/app/helpers/StringReplacer.java index 73a760b56..c6b02a23b 100644 --- a/app/src/processing/app/helpers/StringReplacer.java +++ b/app/src/processing/app/helpers/StringReplacer.java @@ -58,7 +58,7 @@ public class StringReplacer { for (String i : src.split(" ")) { if (!escaping) { if (!i.startsWith(quote)) { - if (!i.trim().isEmpty() || acceptEmptyArguments) + if (i.trim().length() != 0 || acceptEmptyArguments) res.add(i); continue; } @@ -74,7 +74,7 @@ public class StringReplacer { } escapedArg += i.substring(0, i.length() - 1); - if (!escapedArg.trim().isEmpty() || acceptEmptyArguments) + if (escapedArg.trim().length() != 0 || acceptEmptyArguments) res.add(escapedArg); escaping = false; }