You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwebbeans.apache.org by st...@apache.org on 2013/02/13 17:40:35 UTC

svn commit: r1445722 - /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/NormalScopeProxyFactory.java

Author: struberg
Date: Wed Feb 13 16:40:35 2013
New Revision: 1445722

URL: http://svn.apache.org/r1445722
Log:
OWB-344 add more JavaDoc to explain the reason

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/NormalScopeProxyFactory.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/NormalScopeProxyFactory.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/NormalScopeProxyFactory.java?rev=1445722&r1=1445721&r2=1445722&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/NormalScopeProxyFactory.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/NormalScopeProxyFactory.java Wed Feb 13 16:40:35 2013
@@ -466,9 +466,6 @@ public class NormalScopeProxyFactory ext
         // cast the result
         mv.visitTypeInsn(Opcodes.CHECKCAST, getCastType(returnType));
 
-        //X temporary
-        //X mv.visitInsn(Opcodes.ACONST_NULL);
-
 
         if (returnType.isPrimitive() && (!Void.TYPE.equals(returnType)))
         {
@@ -488,8 +485,11 @@ public class NormalScopeProxyFactory ext
 
     /**
      * This method get invoked via generated ASM code.
-     * It delegates to the underlying Method so we don't need to do
+     * It delegates to the underlying protected Method so we don't need to do
      * all the reflection stuff in our generated bytecode.
+     * This is needed as we cannot invoke instanceProvider.get().targetMethod() directly
+     * if targetMethod is protected. Please see Java LangSpec 6.6.2 about the complex
+     * rules for calling 'protected' methods.
      *
      * @see #generateDelegationMethod(org.apache.xbean.asm.ClassWriter, java.lang.reflect.Method, int, Class, String)
      */