[seam-commits] Seam SVN: r9473 - trunk/src/wicket/org/jboss/seam/wicket/ioc.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Fri Oct 31 13:57:19 EDT 2008


Author: pete.muir at jboss.org
Date: 2008-10-31 13:57:18 -0400 (Fri, 31 Oct 2008)
New Revision: 9473

Modified:
   trunk/src/wicket/org/jboss/seam/wicket/ioc/JavassistInstrumentor.java
Log:
JBSEAM-3594, refer to class explicitly, thanks to Clint Popetz

Modified: trunk/src/wicket/org/jboss/seam/wicket/ioc/JavassistInstrumentor.java
===================================================================
--- trunk/src/wicket/org/jboss/seam/wicket/ioc/JavassistInstrumentor.java	2008-10-31 17:51:24 UTC (rev 9472)
+++ trunk/src/wicket/org/jboss/seam/wicket/ioc/JavassistInstrumentor.java	2008-10-31 17:57:18 UTC (rev 9473)
@@ -161,7 +161,7 @@
             if (constructor.isConstructor())
             {
                {
-                  String constructorObject = createConstructorObject(constructor);
+                  String constructorObject = createConstructorObject(className,constructor);
                   constructor.insertBeforeBody(constructorObject + "handler.beforeInvoke(this, constructor);");
                   constructor.addCatch("{" + constructorObject + "throw new RuntimeException(handler.handleException(this, constructor, e));}", exception, "e");
                   constructor.insertAfter(constructorObject + "handler.afterInvoke(this, constructor);");
@@ -224,10 +224,10 @@
       return src;
    }
    
-   private static String createConstructorObject(CtConstructor constructor) throws NotFoundException
+   private static String createConstructorObject(String className, CtConstructor constructor) throws NotFoundException
    {
       String src = createParameterTypesArray(constructor);
-      src += "java.lang.reflect.Constructor constructor = this.getClass().getDeclaredConstructor(parameterTypes);";
+      src += "java.lang.reflect.Constructor constructor = " + className + ".class.getDeclaredConstructor(parameterTypes);";
       return src;
    }
 




More information about the seam-commits mailing list