[jboss-cvs] JBossAS SVN: r74296 - projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/proxy.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sun Jun 8 18:34:18 EDT 2008


Author: flavia.rainone at jboss.com
Date: 2008-06-08 18:34:18 -0400 (Sun, 08 Jun 2008)
New Revision: 74296

Modified:
   projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/proxy/ClassProxyFactory.java
   projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/proxy/ProxyFactory.java
Log:
[JBAOP-509] Removed default constructor of JoinPointInfo classes. The reason for this is to avoid the
registration of inconsistently created infos.

Modified: projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/proxy/ClassProxyFactory.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/proxy/ClassProxyFactory.java	2008-06-08 22:33:05 UTC (rev 74295)
+++ projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/proxy/ClassProxyFactory.java	2008-06-08 22:34:18 UTC (rev 74296)
@@ -291,8 +291,8 @@
          if (m.getParameterTypes().length > 0) args = "$args";
          String code = "{   " +
          "    org.jboss.aop.advice.Interceptor[] aspects = instanceAdvisor.getInterceptors(); " +
-         "    org.jboss.aop.MethodInfo mi = new org.jboss.aop.MethodInfo(); " +
-         "    mi.setHash(" + hash.longValue() + "L);" +
+         "    java.lang.reflect.Method method = ((org.jboss.aop.util.reference.MethodPersistentReference)this.getMethodMap().get(new java.lang.Long(" + hash.longValue()+ "L))).getMethod();" +
+         "    org.jboss.aop.MethodInfo mi = new org.jboss.aop.MethodInfo(null, " + hash.longValue() + "L, method, method);" +
          "    org.jboss.aop.proxy.ProxyMethodInvocation invocation = new org.jboss.aop.proxy.ProxyMethodInvocation(this, mi, aspects); " +
          "    invocation.setInstanceResolver(instanceAdvisor.getMetaData()); " +
          "    invocation.setArguments(" + args + "); " +

Modified: projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/proxy/ProxyFactory.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/proxy/ProxyFactory.java	2008-06-08 22:33:05 UTC (rev 74295)
+++ projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/proxy/ProxyFactory.java	2008-06-08 22:34:18 UTC (rev 74296)
@@ -217,8 +217,9 @@
             if (methods[m].getParameterTypes().length > 0) args = "$args";
             String code = "{   " +
             "    org.jboss.aop.advice.Interceptor[] aspects = instanceAdvisor.getInterceptors(); " +
-            "    org.jboss.aop.MethodInfo mi = new org.jboss.aop.MethodInfo(); " +
-            "    mi.setHash(" + hash.longValue() + "L);" +
+            "    java.lang.reflect.Method method = ((org.jboss.aop.util.reference.MethodPersistentReference)this.getMethodMap().get(new java.lang.Long(" + hash.longValue()+ "L))).getMethod();" +
+            "    org.jboss.aop.MethodInfo mi = new org.jboss.aop.MethodInfo(null, " + hash.longValue() + "L, method, method);" +
+//            "    mi.setHash(" + hash.longValue() + "L);" +
             "    org.jboss.aop.proxy.ProxyMethodInvocation invocation = new org.jboss.aop.proxy.ProxyMethodInvocation(this, mi, aspects); " +
             "    invocation.setInstanceResolver(instanceAdvisor.getMetaData()); " +
             "    invocation.setArguments(" + args + "); " +




More information about the jboss-cvs-commits mailing list