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:21:08 UTC

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

Author: struberg
Date: Thu May 15 14:21:08 2014
New Revision: 1594926

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

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

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/InterceptorDecoratorProxyFactory.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/InterceptorDecoratorProxyFactory.java?rev=1594926&r1=1594925&r2=1594926&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/InterceptorDecoratorProxyFactory.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/InterceptorDecoratorProxyFactory.java Thu May 15 14:21:08 2014
@@ -459,11 +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);