1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-01-17 06:52:18 +01:00

Removed isEmpty() calls for Java 1.5 compatibility

This commit is contained in:
Cristian Maglie 2012-06-25 15:30:43 +02:00
parent 7b157efa7a
commit 8c5e21470f
2 changed files with 6 additions and 6 deletions

View File

@ -79,7 +79,7 @@ public class Compiler implements MessageConsumer {
sketch.setCompilingProgress(20);
List<String> includePaths = new ArrayList<String>();
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<String> stringList = new ArrayList<String>();
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<String> includePaths = new ArrayList<String>();
includePaths.add(corePath); // include core path only
if (!variantPath.isEmpty())
if (variantPath.length() != 0)
includePaths.add(variantPath);
List<File> coreObjectFiles = compileFiles(buildPath, new File(corePath),
true, includePaths);
if (!variantPath.isEmpty())
if (variantPath.length() != 0)
coreObjectFiles.addAll(compileFiles(buildPath, new File(variantPath),
true, includePaths));

View File

@ -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;
}