You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2012/08/28 09:05:38 UTC

svn commit: r1377997 - /incubator/isis/trunk/framework/progmodels/wrapper/wrapper-metamodel/src/main/java/org/apache/isis/progmodel/wrapper/metamodel/internal/CgLibClassProxyFactory.java

Author: danhaywood
Date: Tue Aug 28 07:05:37 2012
New Revision: 1377997

URL: http://svn.apache.org/viewvc?rev=1377997&view=rev
Log:
ISIS-14: no functional changes, cosmetic.

Modified:
    incubator/isis/trunk/framework/progmodels/wrapper/wrapper-metamodel/src/main/java/org/apache/isis/progmodel/wrapper/metamodel/internal/CgLibClassProxyFactory.java

Modified: incubator/isis/trunk/framework/progmodels/wrapper/wrapper-metamodel/src/main/java/org/apache/isis/progmodel/wrapper/metamodel/internal/CgLibClassProxyFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/progmodels/wrapper/wrapper-metamodel/src/main/java/org/apache/isis/progmodel/wrapper/metamodel/internal/CgLibClassProxyFactory.java?rev=1377997&r1=1377996&r2=1377997&view=diff
==============================================================================
--- incubator/isis/trunk/framework/progmodels/wrapper/wrapper-metamodel/src/main/java/org/apache/isis/progmodel/wrapper/metamodel/internal/CgLibClassProxyFactory.java (original)
+++ incubator/isis/trunk/framework/progmodels/wrapper/wrapper-metamodel/src/main/java/org/apache/isis/progmodel/wrapper/metamodel/internal/CgLibClassProxyFactory.java Tue Aug 28 07:05:37 2012
@@ -54,7 +54,7 @@ public class CgLibClassProxyFactory<T> i
         enhancer.setInterfaces(new Class[] { WrapperObject.class });
         enhancer.setCallbackType(interceptor.getClass());
 
-        final Class enhancedClass = enhancer.createClass();
+        final Class<?> enhancedClass = enhancer.createClass();
 
         Enhancer.registerCallbacks(enhancedClass, new Callback[] { interceptor });
 
@@ -62,25 +62,9 @@ public class CgLibClassProxyFactory<T> i
         try {
             factory = (Factory) ClassInstantiatorFactoryCE.getInstantiator().newInstance(enhancedClass);
         } catch (final InstantiationException e) {
-            // ///CLOVER:OFF
             throw new RuntimeException("Fail to instantiate mock for " + toProxyClass + " on " + ClassInstantiatorFactoryCE.getJVM() + " JVM");
-            // ///CLOVER:ON
         }
 
-        // the below comment was from EasyMock code; don't think applies so
-        // commented out.
-
-        // // This call is required. Cglib has some "magic code" making sure a
-        // // callback is used by only one instance of a given class. So only
-        // the
-        // // instance created right after registering the callback will get it.
-        // // However, this is done in the construtor which I'm bypassing to
-        // // allow class instantiation without calling a constructor.
-        // // Fortunatly, the "magic code" is also called in getCallback which
-        // is
-        // // why I'm calling it here mock.getCallback(0);
-        // factory.getCallback(0);
-
         return (T) factory;
     }