deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tandrasc...@apache.org
Subject [2/2] deltaspike git commit: DELTASPIKE-1170 Proxy should be invocationHandler class independent
Date Tue, 07 Jun 2016 20:25:47 GMT
DELTASPIKE-1170 Proxy should be invocationHandler class independent

Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/857c932b
Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/857c932b
Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/857c932b

Branch: refs/heads/master
Commit: 857c932bed72453e1bac6ae7ef9aa46c40b621a5
Parents: b3430a4
Author: Thomas Andraschko <tandraschko@apache.org>
Authored: Tue Jun 7 22:25:39 2016 +0200
Committer: Thomas Andraschko <tandraschko@apache.org>
Committed: Tue Jun 7 22:25:39 2016 +0200

----------------------------------------------------------------------
 .../apache/deltaspike/proxy/impl/AsmProxyClassGenerator.java   | 6 ++----
 .../deltaspike/proxy/impl/AsmProxyClassGeneratorTest.java      | 1 -
 2 files changed, 2 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltaspike/blob/857c932b/deltaspike/modules/proxy/impl-asm5/src/main/java/org/apache/deltaspike/proxy/impl/AsmProxyClassGenerator.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/proxy/impl-asm5/src/main/java/org/apache/deltaspike/proxy/impl/AsmProxyClassGenerator.java
b/deltaspike/modules/proxy/impl-asm5/src/main/java/org/apache/deltaspike/proxy/impl/AsmProxyClassGenerator.java
index 1ee1a63..a887c28 100644
--- a/deltaspike/modules/proxy/impl-asm5/src/main/java/org/apache/deltaspike/proxy/impl/AsmProxyClassGenerator.java
+++ b/deltaspike/modules/proxy/impl-asm5/src/main/java/org/apache/deltaspike/proxy/impl/AsmProxyClassGenerator.java
@@ -53,7 +53,6 @@ public class AsmProxyClassGenerator implements ProxyClassGenerator
     @Override
     public <T> Class<T> generateProxyClass(ClassLoader classLoader,
             Class<T> targetClass,
-            Class<? extends InvocationHandler> delegateInvocationHandlerClass,
             String suffix,
             String superAccessorMethodSuffix,
             Class<?>[] additionalInterfaces,
@@ -63,7 +62,7 @@ public class AsmProxyClassGenerator implements ProxyClassGenerator
         String proxyName = targetClass.getName() + suffix;
         String classFileName = proxyName.replace('.', '/');
 
-        byte[] proxyBytes = generateProxyClassBytes(targetClass, delegateInvocationHandlerClass,
+        byte[] proxyBytes = generateProxyClassBytes(targetClass,
                 classFileName, superAccessorMethodSuffix, additionalInterfaces, delegateMethods,
interceptMethods);
 
         Class<T> proxyClass = (Class<T>) loadClass(classLoader, proxyName, proxyBytes,
@@ -73,7 +72,6 @@ public class AsmProxyClassGenerator implements ProxyClassGenerator
     }
 
     private static byte[] generateProxyClassBytes(Class<?> targetClass,
-            Class<? extends InvocationHandler> delegateInvocationHandlerClass,
             String proxyName,
             String superAccessorMethodSuffix,
             Class<?>[] additionalInterfaces,
@@ -104,7 +102,7 @@ public class AsmProxyClassGenerator implements ProxyClassGenerator
 
         Type superType = Type.getType(superClass);
         Type proxyType = Type.getObjectType(proxyName);
-        Type delegateInvocationHandlerType = Type.getType(delegateInvocationHandlerClass);
+        Type delegateInvocationHandlerType = Type.getType(InvocationHandler.class);
 
         final ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_MAXS);
         cw.visit(Opcodes.V1_6, Opcodes.ACC_PUBLIC + Opcodes.ACC_SUPER, proxyType.getInternalName(),
null,

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/857c932b/deltaspike/modules/proxy/impl-asm5/src/test/java/org/apache/deltaspike/proxy/impl/AsmProxyClassGeneratorTest.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/proxy/impl-asm5/src/test/java/org/apache/deltaspike/proxy/impl/AsmProxyClassGeneratorTest.java
b/deltaspike/modules/proxy/impl-asm5/src/test/java/org/apache/deltaspike/proxy/impl/AsmProxyClassGeneratorTest.java
index 01f72e2..7f45720 100644
--- a/deltaspike/modules/proxy/impl-asm5/src/test/java/org/apache/deltaspike/proxy/impl/AsmProxyClassGeneratorTest.java
+++ b/deltaspike/modules/proxy/impl-asm5/src/test/java/org/apache/deltaspike/proxy/impl/AsmProxyClassGeneratorTest.java
@@ -33,7 +33,6 @@ public class AsmProxyClassGeneratorTest
         AsmProxyClassGenerator asmProxyClassGenerator = new AsmProxyClassGenerator();
         proxyClass = asmProxyClassGenerator.generateProxyClass(TestClass.class.getClassLoader(),
                 TestClass.class,
-                TestInvocationHandler.class,
                 "$Test",
                 "$super",
                 null,


Mime
View raw message