Author: robertlazarski Date: Mon Sep 9 20:37:11 2019 New Revision: 1866709
URL: http://svn.apache.org/viewvc?rev=1866709&view=rev Log: Apply patch for AXIS2-5935, JDK 8,9,10,11 support Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/bytecode/ClassReader.java Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/bytecode/ClassReader.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/bytecode/ClassReader.java?rev=1866709&r1=1866708&r2=1866709&view=diff ============================================================================== --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/bytecode/ClassReader.java (original) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/bytecode/ClassReader.java Mon Sep 9 20:37:11 2019 @@ -59,6 +59,18 @@ public class ClassReader extends ByteArr private static final int CONSTANT_Double = 6; private static final int CONSTANT_NameAndType = 12; private static final int CONSTANT_Utf8 = 1; + + /*java 8 9 10 11 new tokens https://docs.oracle.com/javase/specs/jvms/se11/html/jvms-4.html*/ + private static final int CONSTANT_MethodHandle = 15; + private static final int CONSTANT_MethodType = 16; + private static final int CONSTANT_Dynamic = 17; + private static final int CONSTANT_InvokeDynamic = 18; + private static final int CONSTANT_Module = 19; + private static final int CONSTANT_Package = 20; + /*end of ava 8 9 10 11 new tokens*/ + + + /** * the constant pool. constant pool indices in the class file * directly index into this array. The value stored in this array @@ -349,9 +361,31 @@ public class ClassReader extends ByteArr skipFully(len); break; + case CONSTANT_MethodHandle: + + read(); // reference kind + readShort(); // reference index + break; + + case CONSTANT_MethodType: + + readShort(); // descriptor index + break; + + case CONSTANT_Dynamic: + readShort(); // bootstrap method attr index + readShort(); // name and type index + break; + + case CONSTANT_InvokeDynamic: + + readShort(); // bootstrap method attr index + readShort(); // name and type index + break; + default: // corrupt class file - throw new IllegalStateException("Error looking for paramter names in bytecode: unexpected bytes in file"); + throw new IllegalStateException("Error looking for paramter names in bytecode: unexpected bytes in file, tag:"+c); } } }