summaryrefslogtreecommitdiff
path: root/scripting
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-08-21 08:27:25 +0200
committerNoel Grandin <noel@peralex.com>2014-10-07 13:20:03 +0200
commit68fa1410975ccecc35db8a97669f0fbe5ef9b451 (patch)
tree5fd946ab04ea37e17813ec3c0345badc59ae5400 /scripting
parent81968336ea6433293c603110a75bd13d5898c0eb (diff)
java: use isEmpty() instead of "size() == 0"
Change-Id: I23e1038246999b0744d8e9ae83b66fa1f7dafa99
Diffstat (limited to 'scripting')
-rw-r--r--scripting/java/com/sun/star/script/framework/container/ScriptMetaData.java6
-rw-r--r--scripting/java/org/openoffice/idesupport/CommandLineTools.java2
-rw-r--r--scripting/java/org/openoffice/idesupport/JavaFinder.java3
3 files changed, 5 insertions, 6 deletions
diff --git a/scripting/java/com/sun/star/script/framework/container/ScriptMetaData.java b/scripting/java/com/sun/star/script/framework/container/ScriptMetaData.java
index 2c36a579c3a9..db30afb201d9 100644
--- a/scripting/java/com/sun/star/script/framework/container/ScriptMetaData.java
+++ b/scripting/java/com/sun/star/script/framework/container/ScriptMetaData.java
@@ -218,9 +218,9 @@ public class ScriptMetaData extends ScriptEntry {
if (url != null) {
classPathVec.add(url);
}
- }
+ }
- return classPathVec.toArray(new URL[classPathVec.size()]);
+ return classPathVec.toArray(new URL[classPathVec.size()]);
} catch (Exception e) {
LogUtils.DEBUG("Failed to build class path " + e.toString());
LogUtils.DEBUG(LogUtils.getTrace(e));
@@ -320,4 +320,4 @@ public class ScriptMetaData extends ScriptEntry {
LogUtils.DEBUG("Creating script url for " + sUrl);
return createURL(sUrl);
}
-} \ No newline at end of file
+}
diff --git a/scripting/java/org/openoffice/idesupport/CommandLineTools.java b/scripting/java/org/openoffice/idesupport/CommandLineTools.java
index 5b9050cfd621..85995cdfac42 100644
--- a/scripting/java/org/openoffice/idesupport/CommandLineTools.java
+++ b/scripting/java/org/openoffice/idesupport/CommandLineTools.java
@@ -284,7 +284,7 @@ public class CommandLineTools {
}
if (scripts != null) {
- if (scripts.size() == 0)
+ if (scripts.isEmpty())
throw new Exception("No valid scripts found");
ParcelDescriptor desc = new ParcelDescriptor(parcelxml, language);
diff --git a/scripting/java/org/openoffice/idesupport/JavaFinder.java b/scripting/java/org/openoffice/idesupport/JavaFinder.java
index e9385fd3c57e..b1139ab7dbc7 100644
--- a/scripting/java/org/openoffice/idesupport/JavaFinder.java
+++ b/scripting/java/org/openoffice/idesupport/JavaFinder.java
@@ -191,8 +191,7 @@ public class JavaFinder implements MethodFinder {
private String[] findClassNames(File basedir) {
ArrayList<File> classFiles = findFiles(basedir, CLASS_SUFFIX);
-
- if (classFiles == null || classFiles.size() == 0)
+ if(classFiles == null || classFiles.isEmpty())
return null;
ArrayList<File> javaFiles = findFiles(basedir, JAVA_SUFFIX);