diff options
author | Noel Grandin <noel@peralex.com> | 2012-09-07 13:41:02 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-09-10 23:43:39 +0200 |
commit | 4c9e62c6e3513a57e86dfb7ea06a74ce2943aaaa (patch) | |
tree | 1008fb1ceb97da428ab451b0d1b83b1bb3b5e089 /bean/test | |
parent | Java cleanup, remove unnecessary imports (diff) | |
download | core-4c9e62c6e3513a57e86dfb7ea06a74ce2943aaaa.tar.gz core-4c9e62c6e3513a57e86dfb7ea06a74ce2943aaaa.zip |
Java cleanup, convert ArrayList and Vector to use generics
Change-Id: Ic668b46872ee0bfd259ca335aed9d68fb545c3a4
Diffstat (limited to 'bean/test')
-rw-r--r-- | bean/test/applet/oooapplet/OOoViewer.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bean/test/applet/oooapplet/OOoViewer.java b/bean/test/applet/oooapplet/OOoViewer.java index ae77242af5a8..e09f78e88821 100644 --- a/bean/test/applet/oooapplet/OOoViewer.java +++ b/bean/test/applet/oooapplet/OOoViewer.java @@ -73,7 +73,7 @@ public class OOoViewer extends Applet { // Class arPropValClass = m_loader.loadClass("[Lcom.sun.star.beans.PropertyValue;"); Object arProp = Array.newInstance( m_loader.loadClass("com.sun.star.beans.PropertyValue"), 1); - Class clazz = arProp.getClass(); + Class<? extends Object> clazz = arProp.getClass(); Method methLoad = beanClass.getMethod( "loadFromURL", new Class[] { @@ -124,7 +124,7 @@ public class OOoViewer extends Applet { final class CustomURLClassLoader extends URLClassLoader { - private Vector resourcePaths; + private Vector<URL> resourcePaths; public CustomURLClassLoader( URL[] urls ) { super( urls ); @@ -163,7 +163,7 @@ final class CustomURLClassLoader extends URLClassLoader { } public void addResourcePath(URL rurl) { - if (resourcePaths == null) resourcePaths = new Vector(); + if (resourcePaths == null) resourcePaths = new Vector<URL>(); resourcePaths.add(rurl); } @@ -177,8 +177,8 @@ final class CustomURLClassLoader extends URLClassLoader { URL u = null; URI uri = null; - for (Enumeration e = resourcePaths.elements(); e.hasMoreElements();) { - u = (URL)e.nextElement(); + for (Enumeration<URL> e = resourcePaths.elements(); e.hasMoreElements();) { + u = e.nextElement(); if (u.getProtocol().startsWith("file")){ try { File f1 = new File(u.getPath()); |