diff options
Diffstat (limited to 'test/044-proxy/src')
-rw-r--r-- | test/044-proxy/src/BasicTest.java | 10 | ||||
-rw-r--r-- | test/044-proxy/src/Clash.java | 4 | ||||
-rw-r--r-- | test/044-proxy/src/Clash2.java | 2 | ||||
-rw-r--r-- | test/044-proxy/src/Clash3.java | 2 | ||||
-rw-r--r-- | test/044-proxy/src/Clash4.java | 2 | ||||
-rw-r--r-- | test/044-proxy/src/FloatSelect.java | 2 | ||||
-rw-r--r-- | test/044-proxy/src/NativeProxy.java | 2 | ||||
-rw-r--r-- | test/044-proxy/src/ReturnsAndArgPassing.java | 4 | ||||
-rw-r--r-- | test/044-proxy/src/WrappedThrow.java | 2 |
9 files changed, 14 insertions, 16 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) { diff --git a/test/044-proxy/src/Clash.java b/test/044-proxy/src/Clash.java index adeffdcf11..d000112fb6 100644 --- a/test/044-proxy/src/Clash.java +++ b/test/044-proxy/src/Clash.java @@ -30,7 +30,7 @@ public class Clash { /* try passing in the same interface twice */ try { Proxy.newProxyInstance(Clash.class.getClassLoader(), - new Class[] { Interface1A.class, Interface1A.class }, + new Class<?>[] { Interface1A.class, Interface1A.class }, handler); System.err.println("Dupe did not throw expected exception"); } catch (IllegalArgumentException iae) { @@ -39,7 +39,7 @@ public class Clash { try { Proxy.newProxyInstance(Clash.class.getClassLoader(), - new Class[] { Interface1A.class, Interface1B.class }, + new Class<?>[] { Interface1A.class, Interface1B.class }, handler); System.err.println("Clash did not throw expected exception"); } catch (IllegalArgumentException iae) { diff --git a/test/044-proxy/src/Clash2.java b/test/044-proxy/src/Clash2.java index 2a384f4174..e405cfea03 100644 --- a/test/044-proxy/src/Clash2.java +++ b/test/044-proxy/src/Clash2.java @@ -29,7 +29,7 @@ public class Clash2 { try { Proxy.newProxyInstance(Clash.class.getClassLoader(), - new Class[] { Interface2A.class, Interface2B.class }, + new Class<?>[] { Interface2A.class, Interface2B.class }, handler); System.err.println("Clash2 did not throw expected exception"); } catch (IllegalArgumentException iae) { diff --git a/test/044-proxy/src/Clash3.java b/test/044-proxy/src/Clash3.java index 6d6f2f2965..44806cee7d 100644 --- a/test/044-proxy/src/Clash3.java +++ b/test/044-proxy/src/Clash3.java @@ -29,7 +29,7 @@ public class Clash3 { try { Proxy.newProxyInstance(Clash.class.getClassLoader(), - new Class[] { + new Class<?>[] { Interface3a.class, Interface3base.class, Interface3aa.class, diff --git a/test/044-proxy/src/Clash4.java b/test/044-proxy/src/Clash4.java index 1bfb37f58d..ca5c3ab6e6 100644 --- a/test/044-proxy/src/Clash4.java +++ b/test/044-proxy/src/Clash4.java @@ -29,7 +29,7 @@ public class Clash4 { try { Proxy.newProxyInstance(Clash.class.getClassLoader(), - new Class[] { + new Class<?>[] { Interface4a.class, Interface4aa.class, Interface4base.class, diff --git a/test/044-proxy/src/FloatSelect.java b/test/044-proxy/src/FloatSelect.java index febe697818..217ccafd25 100644 --- a/test/044-proxy/src/FloatSelect.java +++ b/test/044-proxy/src/FloatSelect.java @@ -34,7 +34,7 @@ public class FloatSelect { public static void main(String[] args) { FloatSelectI proxyObject = (FloatSelectI) Proxy.newProxyInstance( FloatSelectI.class.getClassLoader(), - new Class[] { FloatSelectI.class }, + new Class<?>[] { FloatSelectI.class }, new FloatSelectIInvoke1()); float floatResult = proxyObject.method(2.1f, 5.8f); diff --git a/test/044-proxy/src/NativeProxy.java b/test/044-proxy/src/NativeProxy.java index b425da87b5..c609dc25b3 100644 --- a/test/044-proxy/src/NativeProxy.java +++ b/test/044-proxy/src/NativeProxy.java @@ -40,7 +40,7 @@ public class NativeProxy { try { NativeInterface inf = (NativeInterface)Proxy.newProxyInstance( NativeProxy.class.getClassLoader(), - new Class[] { NativeInterface.class }, + new Class<?>[] { NativeInterface.class }, new NativeInvocationHandler()); nativeCall(inf); diff --git a/test/044-proxy/src/ReturnsAndArgPassing.java b/test/044-proxy/src/ReturnsAndArgPassing.java index 225cc5b232..3d8ebf05a9 100644 --- a/test/044-proxy/src/ReturnsAndArgPassing.java +++ b/test/044-proxy/src/ReturnsAndArgPassing.java @@ -98,7 +98,7 @@ public class ReturnsAndArgPassing { MyInvocationHandler myHandler = new MyInvocationHandler(); MyInterface proxyMyInterface = (MyInterface)Proxy.newProxyInstance(ReturnsAndArgPassing.class.getClassLoader(), - new Class[] { MyInterface.class }, + new Class<?>[] { MyInterface.class }, myHandler); check(fooInvocations == 0); proxyMyInterface.voidFoo(); @@ -441,7 +441,7 @@ public class ReturnsAndArgPassing { MyInvocationHandler myHandler = new MyInvocationHandler(); MyInterface proxyMyInterface = (MyInterface)Proxy.newProxyInstance(ReturnsAndArgPassing.class.getClassLoader(), - new Class[] { MyInterface.class }, + new Class<?>[] { MyInterface.class }, myHandler); check((Integer)proxyMyInterface.selectArg(0, Integer.MAX_VALUE, Long.MAX_VALUE, diff --git a/test/044-proxy/src/WrappedThrow.java b/test/044-proxy/src/WrappedThrow.java index 27ae84e24c..643ba053b9 100644 --- a/test/044-proxy/src/WrappedThrow.java +++ b/test/044-proxy/src/WrappedThrow.java @@ -32,7 +32,7 @@ public class WrappedThrow { try { proxy = Proxy.newProxyInstance(WrappedThrow.class.getClassLoader(), - new Class[] { InterfaceW1.class, InterfaceW2.class }, + new Class<?>[] { InterfaceW1.class, InterfaceW2.class }, handler); } catch (IllegalArgumentException iae) { System.out.println("WT init failed"); |