diff options
Diffstat (limited to 'test/068-classloader/src/FancyLoader.java')
-rw-r--r-- | test/068-classloader/src/FancyLoader.java | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/test/068-classloader/src/FancyLoader.java b/test/068-classloader/src/FancyLoader.java index 6a153cc9e2..e616bfc10f 100644 --- a/test/068-classloader/src/FancyLoader.java +++ b/test/068-classloader/src/FancyLoader.java @@ -41,7 +41,7 @@ public class FancyLoader extends ClassLoader { static final String DEX_FILE = System.getenv("DEX_LOCATION") + "/068-classloader-ex.jar"; /* on Dalvik, this is a DexFile; otherwise, it's null */ - private Class mDexClass; + private Class<?> mDexClass; private Object mDexFile; @@ -82,12 +82,12 @@ public class FancyLoader extends ClassLoader { if (mDexFile == null) { synchronized (FancyLoader.class) { - Constructor ctor; + Constructor<?> ctor; /* * Construct a DexFile object through reflection. */ try { - ctor = mDexClass.getConstructor(new Class[] {String.class}); + ctor = mDexClass.getConstructor(String.class); } catch (NoSuchMethodException nsme) { throw new ClassNotFoundException("getConstructor failed", nsme); @@ -111,8 +111,7 @@ public class FancyLoader extends ClassLoader { Method meth; try { - meth = mDexClass.getMethod("loadClass", - new Class[] { String.class, ClassLoader.class }); + meth = mDexClass.getMethod("loadClass", String.class, ClassLoader.class); } catch (NoSuchMethodException nsme) { throw new ClassNotFoundException("getMethod failed", nsme); } @@ -184,7 +183,7 @@ public class FancyLoader extends ClassLoader { protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException { - Class res; + Class<?> res; /* * 1. Invoke findLoadedClass(String) to check if the class has |