diff options
author | Andreas Gampe <agampe@google.com> | 2016-07-18 08:27:23 -0700 |
---|---|---|
committer | Andreas Gampe <agampe@google.com> | 2016-07-22 20:37:07 -0700 |
commit | 166aaee6aa39c20c87113b3fcf0dcd81e0a934cb (patch) | |
tree | 70ab523f146d164ece8a0e94dbc499783005e3dc /test/044-proxy/src/BasicTest.java | |
parent | 115c1de1f812d380449ef89cfe50cc4fb4289275 (diff) |
ART: Fix type parameter in tests
Move Class to Class<?>, Constructor to Constructor<?>, and in
general clean up reflection.
Test: m test-art-host-run-test
Change-Id: I3a4223ee8d14d032015edf34bf27135757f7138c
Diffstat (limited to 'test/044-proxy/src/BasicTest.java')
-rw-r--r-- | test/044-proxy/src/BasicTest.java | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/test/044-proxy/src/BasicTest.java b/test/044-proxy/src/BasicTest.java index 445a6cc467..5f04b9344c 100644 --- a/test/044-proxy/src/BasicTest.java +++ b/test/044-proxy/src/BasicTest.java @@ -99,18 +99,16 @@ public class BasicTest { InvocationHandler handler = new MyInvocationHandler(proxyMe); /* create the proxy class */ - Class proxyClass = Proxy.getProxyClass(Shapes.class.getClassLoader(), - new Class[] { Quads.class, Colors.class, Trace.class }); + Class<?> proxyClass = Proxy.getProxyClass(Shapes.class.getClassLoader(), + Quads.class, Colors.class, Trace.class); Main.registerProxyClassName(proxyClass.getCanonicalName()); /* create a proxy object, passing the handler object in */ Object proxy = null; try { - Constructor<Class> cons; - cons = proxyClass.getConstructor( - new Class[] { InvocationHandler.class }); + Constructor<?> cons = proxyClass.getConstructor(InvocationHandler.class); //System.out.println("Constructor is " + cons); - proxy = cons.newInstance(new Object[] { handler }); + proxy = cons.newInstance(handler); } catch (NoSuchMethodException nsme) { System.err.println("failed: " + nsme); } catch (InstantiationException ie) { |