[jboss-cvs] JBossAS SVN: r68639 - in projects/aop/trunk/aop/src/main/org/jboss/aop: instrument and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sat Jan 5 16:39:21 EST 2008


Author: flavia.rainone at jboss.com
Date: 2008-01-05 16:39:21 -0500 (Sat, 05 Jan 2008)
New Revision: 68639

Modified:
   projects/aop/trunk/aop/src/main/org/jboss/aop/hook/GenerateInstrumentedClassLoader.java
   projects/aop/trunk/aop/src/main/org/jboss/aop/instrument/JoinPointGenerator.java
Log:
[JBAOP-500] Bug solved.

Modified: projects/aop/trunk/aop/src/main/org/jboss/aop/hook/GenerateInstrumentedClassLoader.java
===================================================================
--- projects/aop/trunk/aop/src/main/org/jboss/aop/hook/GenerateInstrumentedClassLoader.java	2008-01-05 20:51:49 UTC (rev 68638)
+++ projects/aop/trunk/aop/src/main/org/jboss/aop/hook/GenerateInstrumentedClassLoader.java	2008-01-05 21:39:21 UTC (rev 68639)
@@ -48,12 +48,33 @@
       CtMethod wrapper = CtNewMethod.make(Modifier.PROTECTED, method.getReturnType(), "defineClass", method.getParameterTypes(), method.getExceptionTypes(), null, clazz);
 
       String code = "{"
-              + "  byte[] newBytes = org.jboss.aop.AspectManager.instance().translate($1, $0, $2) ;"
-              + "  if (newBytes != (byte[])null) {"
-              + "    return wrappedDefineClass($1, newBytes, 0, newBytes.length, $5); "
-              + "  } else {"
-              + "    return wrappedDefineClass($1, $2, $3, $4, $5); "
-              + "  }"
+              + " if (!$1.startsWith(\"org.jboss.aop\") &&"
+              + " !$1.endsWith(\"$aop\") &&"
+              + " !$1.startsWith(\"javassist\") &&"
+              + " !$1.startsWith(\"org.jboss.util.\") &&"
+              + " !$1.startsWith(\"gnu.trove.\") &&"
+              + " !$1.startsWith(\"EDU.oswego.cs.dl.util.concurrent.\") &&"
+              // System classes
+              + " !$1.startsWith(\"org.apache.crimson\") &&"
+              + " !$1.startsWith(\"org.apache.xalan\") &&"
+              + " !$1.startsWith(\"org.apache.xml\") &&"
+              + " !$1.startsWith(\"org.apache.xpath\") &&"
+              + " !$1.startsWith(\"org.ietf.\") &&"
+              + " !$1.startsWith(\"org.omg.\") &&"
+              + " !$1.startsWith(\"org.w3c.\") &&"
+              + " !$1.startsWith(\"org.xml.sax.\") &&"
+              + " !$1.startsWith(\"sunw.\") &&"
+              + " !$1.startsWith(\"sun.\") &&"
+              + " !$1.startsWith(\"java.\") &&"
+              + " !$1.startsWith(\"javax.\") &&"
+              + " !$1.startsWith(\"com.sun.\") &&"
+              + " !$1.startsWith(\"$Proxy\")) {"
+              + "      byte[] newBytes = org.jboss.aop.AspectManager.instance().translate($1, $0, $2) ;"
+              + "      if (newBytes != (byte[])null) {"
+              + "         return wrappedDefineClass($1, newBytes, 0, newBytes.length, $5); "
+              + "      }}"
+              + "  return wrappedDefineClass($1, $2, $3, $4, $5); "
+              + "  "
               + "}";
       wrapper.setBody(code);
       clazz.addMethod(wrapper);

Modified: projects/aop/trunk/aop/src/main/org/jboss/aop/instrument/JoinPointGenerator.java
===================================================================
--- projects/aop/trunk/aop/src/main/org/jboss/aop/instrument/JoinPointGenerator.java	2008-01-05 20:51:49 UTC (rev 68638)
+++ projects/aop/trunk/aop/src/main/org/jboss/aop/instrument/JoinPointGenerator.java	2008-01-05 21:39:21 UTC (rev 68639)
@@ -441,7 +441,7 @@
 
    private String getJoinpointClassName()
    {
-      return baseJoinPointClassName + getIncrement();
+      return baseJoinPointClassName + getIncrement() + "$aop";
    }
 
    private void createInitialisePerInstanceAspectsMethod(CtClass clazz, AdviceSetups setups, Class advisedClass) throws CannotCompileException, NotFoundException




More information about the jboss-cvs-commits mailing list