myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu4...@apache.org
Subject svn commit: r1644116 - /myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/annotation/_ClassByteCodeAnnotationFilter.java
Date Tue, 09 Dec 2014 16:38:56 GMT
Author: lu4242
Date: Tue Dec  9 16:38:56 2014
New Revision: 1644116

URL: http://svn.apache.org/r1644116
Log:
MYFACES-3945 _ClassByteCodeAnnotationFilter does not handle SE8 .class files properly

Modified:
    myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/annotation/_ClassByteCodeAnnotationFilter.java

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/annotation/_ClassByteCodeAnnotationFilter.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/annotation/_ClassByteCodeAnnotationFilter.java?rev=1644116&r1=1644115&r2=1644116&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/annotation/_ClassByteCodeAnnotationFilter.java
(original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/annotation/_ClassByteCodeAnnotationFilter.java
Tue Dec  9 16:38:56 2014
@@ -48,7 +48,12 @@ class _ClassByteCodeAnnotationFilter
     private static final int CP_INFO_DOUBLE = 6;
     private static final int CP_INFO_NAME_AND_TYPE = 12;
     private static final int CP_INFO_UTF8 = 1;
-    
+
+    private static final int CP_INFO_METHOD_HANDLE = 15;
+    private static final int CP_INFO_METHOD_TYPE = 16;
+    private static final int CP_INFO_INVOKE_DYNAMIC = 18;
+
+
     /**
      * Checks if the .class file referenced by the DataInput could 
      * contain the annotation names available in the set.
@@ -170,6 +175,26 @@ class _ClassByteCodeAnnotationFilter
                     in.readUnsignedShort();
                     in.readUnsignedShort();
                     break;
+
+                case CP_INFO_METHOD_HANDLE:     // Ignore
+                    // u1 reference_kind
+                    // u2 reference_index
+                    in.readUnsignedByte();
+                    in.readUnsignedShort();
+                    break;
+
+                case CP_INFO_METHOD_TYPE:       // Ignore
+                    // u2 descriptor_index
+                    in.readUnsignedShort();
+                    break;
+
+                case CP_INFO_INVOKE_DYNAMIC:    // Ignore
+                    // u2 bootstrap_method_attr_index;
+                    // u2 name_and_type_index;
+                    in.readUnsignedShort();
+                    in.readUnsignedShort();
+                    break;
+
                 default:
                     // THIS SHOULD NOT HAPPEN! Log error info
                     // and break for loop, because from this point



Mime
View raw message