mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-18 07:52:14 +01:00
Removed isEmpty() calls for Java 1.5 compatibility
This commit is contained in:
parent
7b157efa7a
commit
8c5e21470f
@ -79,7 +79,7 @@ public class Compiler implements MessageConsumer {
|
|||||||
sketch.setCompilingProgress(20);
|
sketch.setCompilingProgress(20);
|
||||||
List<String> includePaths = new ArrayList<String>();
|
List<String> includePaths = new ArrayList<String>();
|
||||||
includePaths.add(prefs.get("build.core.path"));
|
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"));
|
includePaths.add(prefs.get("build.variant.path"));
|
||||||
for (File file : sketch.getImportedLibraries())
|
for (File file : sketch.getImportedLibraries())
|
||||||
includePaths.add(file.getPath());
|
includePaths.add(file.getPath());
|
||||||
@ -304,7 +304,7 @@ public class Compiler implements MessageConsumer {
|
|||||||
List<String> stringList = new ArrayList<String>();
|
List<String> stringList = new ArrayList<String>();
|
||||||
for (String string : command) {
|
for (String string : command) {
|
||||||
string = string.trim();
|
string = string.trim();
|
||||||
if (!string.isEmpty())
|
if (string.length() != 0)
|
||||||
stringList.add(string);
|
stringList.add(string);
|
||||||
}
|
}
|
||||||
command = stringList.toArray(new String[stringList.size()]);
|
command = stringList.toArray(new String[stringList.size()]);
|
||||||
@ -602,12 +602,12 @@ public class Compiler implements MessageConsumer {
|
|||||||
|
|
||||||
List<String> includePaths = new ArrayList<String>();
|
List<String> includePaths = new ArrayList<String>();
|
||||||
includePaths.add(corePath); // include core path only
|
includePaths.add(corePath); // include core path only
|
||||||
if (!variantPath.isEmpty())
|
if (variantPath.length() != 0)
|
||||||
includePaths.add(variantPath);
|
includePaths.add(variantPath);
|
||||||
|
|
||||||
List<File> coreObjectFiles = compileFiles(buildPath, new File(corePath),
|
List<File> coreObjectFiles = compileFiles(buildPath, new File(corePath),
|
||||||
true, includePaths);
|
true, includePaths);
|
||||||
if (!variantPath.isEmpty())
|
if (variantPath.length() != 0)
|
||||||
coreObjectFiles.addAll(compileFiles(buildPath, new File(variantPath),
|
coreObjectFiles.addAll(compileFiles(buildPath, new File(variantPath),
|
||||||
true, includePaths));
|
true, includePaths));
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ public class StringReplacer {
|
|||||||
for (String i : src.split(" ")) {
|
for (String i : src.split(" ")) {
|
||||||
if (!escaping) {
|
if (!escaping) {
|
||||||
if (!i.startsWith(quote)) {
|
if (!i.startsWith(quote)) {
|
||||||
if (!i.trim().isEmpty() || acceptEmptyArguments)
|
if (i.trim().length() != 0 || acceptEmptyArguments)
|
||||||
res.add(i);
|
res.add(i);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -74,7 +74,7 @@ public class StringReplacer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
escapedArg += i.substring(0, i.length() - 1);
|
escapedArg += i.substring(0, i.length() - 1);
|
||||||
if (!escapedArg.trim().isEmpty() || acceptEmptyArguments)
|
if (escapedArg.trim().length() != 0 || acceptEmptyArguments)
|
||||||
res.add(escapedArg);
|
res.add(escapedArg);
|
||||||
escaping = false;
|
escaping = false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user