Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes a71229d48 -> 57bb9dafd


CXF-7371: support for Java8-constants
This closes #300


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/57bb9daf
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/57bb9daf
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/57bb9daf

Branch: refs/heads/3.1.x-fixes
Commit: 57bb9dafd152b02a548e5ce36319854833e1d03b
Parents: a71229d
Author: bbodnar <[email protected]>
Authored: Sun Aug 6 23:01:57 2017 +0200
Committer: Daniel Kulp <[email protected]>
Committed: Thu Aug 17 11:12:49 2017 -0400

----------------------------------------------------------------------
 .../apache/cxf/wsdl/service/factory/ClassReader.java  | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/57bb9daf/rt/wsdl/src/main/java/org/apache/cxf/wsdl/service/factory/ClassReader.java
----------------------------------------------------------------------
diff --git 
a/rt/wsdl/src/main/java/org/apache/cxf/wsdl/service/factory/ClassReader.java 
b/rt/wsdl/src/main/java/org/apache/cxf/wsdl/service/factory/ClassReader.java
index 94ac4f6..74dc8da 100644
--- a/rt/wsdl/src/main/java/org/apache/cxf/wsdl/service/factory/ClassReader.java
+++ b/rt/wsdl/src/main/java/org/apache/cxf/wsdl/service/factory/ClassReader.java
@@ -52,6 +52,8 @@ class ClassReader extends ByteArrayInputStream {
     private static final int CONSTANT_FIELDREF = 9;
     private static final int CONSTANT_METHODREF = 10;
     private static final int CONSTANT_INTERFACE_METHOD_REF = 11;
+    private static final int CONSTANT_METHOD_HANDLE = 15;
+    private static final int CONSTANT_METHOD_TYPE = 16;
     private static final int CONSTANT_STRING = 8;
     private static final int CONSTANT_INTEGER = 3;
     private static final int CONSTANT_FLOAT = 4;
@@ -59,6 +61,7 @@ class ClassReader extends ByteArrayInputStream {
     private static final int CONSTANT_DOUBLE = 6;
     private static final int CONSTANT_NAME_AND_TYPE = 12;
     private static final int CONSTANT_UTF_8 = 1;
+    private static final int CONSTANT_INVOKE_DYNAMIC = 18;
     /**
      * the constant pool. constant pool indices in the class file directly 
index
      * into this array. The value stored in this array is the position in the
@@ -319,15 +322,22 @@ class ClassReader extends ByteArrayInputStream {
             case CONSTANT_METHODREF:
             case CONSTANT_INTERFACE_METHOD_REF:
             case CONSTANT_NAME_AND_TYPE:
+            case CONSTANT_INVOKE_DYNAMIC: // 2x short: (bootstrap-method, 
name-and-type)
 
                 readShort(); // class index or (12) name index
                 readShort(); // string index or class index
                 break;
 
+            case CONSTANT_METHOD_HANDLE:
+                read(); // reference kind
+                readShort(); // reference index
+                break;
+                
             case CONSTANT_CLASS:
             case CONSTANT_STRING:
+            case CONSTANT_METHOD_TYPE:
 
-                readShort(); // string index or class index
+                readShort(); // string-, class- or method-index
                 break;
 
             case CONSTANT_LONG:
@@ -355,7 +365,7 @@ class ClassReader extends ByteArrayInputStream {
 
             default:
                 // corrupt class file
-                throw new IllegalStateException();
+                throw new IllegalStateException("unhandled constant \"" + c + 
"\"");
             }
         }
     }

Reply via email to