diff options
author | Noel Grandin <noel@peralex.com> | 2012-09-07 09:42:15 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-09-10 23:43:37 +0200 |
commit | a5ff5aad59bbe70cfaa0b18ec9df6f787a7160ca (patch) | |
tree | 6313b316dc96b82e5cafec866631d15b01a04e52 /scripting/java | |
parent | e3d9ff3fd0b753a6712e86703e5f69392d241508 (diff) |
Java5 update, Convert ArrayList and Vector code to use generics
Change-Id: I6cf6fa8e55005ffdc1d173aeee1e374efbb214fd
Diffstat (limited to 'scripting/java')
3 files changed, 11 insertions, 11 deletions
diff --git a/scripting/java/org/openoffice/idesupport/ExtensionFinder.java b/scripting/java/org/openoffice/idesupport/ExtensionFinder.java index f3002bb40f00..1edfba296fbd 100644 --- a/scripting/java/org/openoffice/idesupport/ExtensionFinder.java +++ b/scripting/java/org/openoffice/idesupport/ExtensionFinder.java @@ -36,7 +36,7 @@ public class ExtensionFinder implements MethodFinder { public ScriptEntry[] findMethods(File basedir) { String parcelName; - ArrayList files = new ArrayList(10); + ArrayList<ScriptEntry> files = new ArrayList<ScriptEntry>(10); ScriptEntry[] empty = new ScriptEntry[0]; if (basedir == null || basedir.exists() == false || @@ -54,7 +54,7 @@ public class ExtensionFinder implements MethodFinder { return empty; } - private void findFiles(ArrayList list, File basedir, String parcelName) { + private void findFiles(ArrayList<ScriptEntry> list, File basedir, String parcelName) { File[] children = basedir.listFiles(); File f; diff --git a/scripting/java/org/openoffice/idesupport/JavaFinder.java b/scripting/java/org/openoffice/idesupport/JavaFinder.java index f23919699ebe..d8e3ec02117f 100644 --- a/scripting/java/org/openoffice/idesupport/JavaFinder.java +++ b/scripting/java/org/openoffice/idesupport/JavaFinder.java @@ -65,7 +65,7 @@ public class JavaFinder implements MethodFinder { public ScriptEntry[] findMethods(File basedir) { String parcelName; - ArrayList result = new ArrayList(10); + ArrayList<ScriptEntry> result = new ArrayList<ScriptEntry>(10); ScriptEntry[] empty = new ScriptEntry[0]; if (basedir == null || basedir.exists() == false || @@ -132,7 +132,7 @@ public class JavaFinder implements MethodFinder { private ClassLoader getClassLoader() { int len = classpath.size(); - ArrayList urls = new ArrayList(len); + ArrayList<URL> urls = new ArrayList<URL>(len); for (int i = 0; i < len; i++) { try { @@ -150,7 +150,7 @@ public class JavaFinder implements MethodFinder { } private ClassLoader getClassLoader(File basedir) { - ArrayList files = findFiles(basedir, ".jar"); + ArrayList<File> files = findFiles(basedir, ".jar"); files.add(basedir); try { @@ -189,8 +189,8 @@ public class JavaFinder implements MethodFinder { return new URLClassLoader(urls); } - private ArrayList findFiles(File basedir, String suffix) { - ArrayList result = new ArrayList(); + private ArrayList<File> findFiles(File basedir, String suffix) { + ArrayList<File> result = new ArrayList<File>(); File[] children = basedir.listFiles(); for (int i = 0; i < children.length; i++) { @@ -204,15 +204,15 @@ public class JavaFinder implements MethodFinder { private String[] findClassNames(File basedir) { - ArrayList classFiles = findFiles(basedir, CLASS_SUFFIX); + ArrayList<File> classFiles = findFiles(basedir, CLASS_SUFFIX); if(classFiles == null || classFiles.size() == 0) return null; - ArrayList javaFiles = findFiles(basedir, JAVA_SUFFIX); + ArrayList<File> javaFiles = findFiles(basedir, JAVA_SUFFIX); if(javaFiles == null || javaFiles.size() == 0) return null; - ArrayList result = new ArrayList(); + ArrayList<String> result = new ArrayList<String>(); for (int i = 0; i < classFiles.size(); i++) { File classFile = (File)classFiles.get(i); diff --git a/scripting/java/org/openoffice/idesupport/xml/Manifest.java b/scripting/java/org/openoffice/idesupport/xml/Manifest.java index 7b5e2e77e165..6cf90899ccad 100644 --- a/scripting/java/org/openoffice/idesupport/xml/Manifest.java +++ b/scripting/java/org/openoffice/idesupport/xml/Manifest.java @@ -91,7 +91,7 @@ public class Manifest { if (nl == null || (len = nl.getLength()) == 0) return; - ArrayList list = new ArrayList(); + ArrayList<Element> list = new ArrayList<Element>(); for (int i = 0; i < len; i++) { el = (Element)nl.item(i); if (el.getAttribute("manifest:full-path").startsWith(entry)) { |