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 2014/05/15 16:20:14 UTC

svn commit: r1594925 - /openwebbeans/branches/owb_1.2.x/webbeans-impl/src/main/java/org/apache/webbeans/proxy/InterceptorDecoratorProxyFactory.java

Author: struberg
Date: Thu May 15 14:20:14 2014
New Revision: 1594925

URL: http://svn.apache.org/r1594925
Log:
OWB-957 handle freak case when a class has > 2^15 methods

Modified:
    openwebbeans/branches/owb_1.2.x/webbeans-impl/src/main/java/org/apache/webbeans/proxy/InterceptorDecoratorProxyFactory.java

Modified: openwebbeans/branches/owb_1.2.x/webbeans-impl/src/main/java/org/apache/webbeans/proxy/InterceptorDecoratorProxyFactory.java
URL: http://svn.apache.org/viewvc/openwebbeans/branches/owb_1.2.x/webbeans-impl/src/main/java/org/apache/webbeans/proxy/InterceptorDecoratorProxyFactory.java?rev=1594925&r1=1594924&r2=1594925&view=diff
==============================================================================
--- openwebbeans/branches/owb_1.2.x/webbeans-impl/src/main/java/org/apache/webbeans/proxy/InterceptorDecoratorProxyFactory.java (original)
+++ openwebbeans/branches/owb_1.2.x/webbeans-impl/src/main/java/org/apache/webbeans/proxy/InterceptorDecoratorProxyFactory.java Thu May 15 14:20:14 2014
@@ -459,12 +459,15 @@ public class InterceptorDecoratorProxyFa
         {
             mv.visitIntInsn(Opcodes.BIPUSH, methodIndex);
         }
-        else
+        else if (methodIndex < 32267)
         {
             // for methods > 127 we need to push a short number as index
             mv.visitIntInsn(Opcodes.SIPUSH, methodIndex);
         }
-
+        else
+        {
+            throw new ProxyGenerationException("Sorry, we only support Classes with 2^15 methods...");
+        }
 
         // and now load the Method from the array
         mv.visitInsn(Opcodes.AALOAD);