You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@axis.apache.org by ro...@apache.org on 2019/09/09 20:52:14 UTC
svn commit: r1866711 -
/axis/axis2/java/core/branches/1_7/modules/kernel/src/org/apache/axis2/description/java2wsdl/bytecode/ClassReader.java
Author: robertlazarski
Date: Mon Sep 9 20:52:14 2019
New Revision: 1866711
URL: http://svn.apache.org/viewvc?rev=1866711&view=rev
Log:
Apply patch for AXIS-5935 to 1_7 branch, for JDK 8,9,10,11 support
Modified:
axis/axis2/java/core/branches/1_7/modules/kernel/src/org/apache/axis2/description/java2wsdl/bytecode/ClassReader.java
Modified: axis/axis2/java/core/branches/1_7/modules/kernel/src/org/apache/axis2/description/java2wsdl/bytecode/ClassReader.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_7/modules/kernel/src/org/apache/axis2/description/java2wsdl/bytecode/ClassReader.java?rev=1866711&r1=1866710&r2=1866711&view=diff
==============================================================================
--- axis/axis2/java/core/branches/1_7/modules/kernel/src/org/apache/axis2/description/java2wsdl/bytecode/ClassReader.java (original)
+++ axis/axis2/java/core/branches/1_7/modules/kernel/src/org/apache/axis2/description/java2wsdl/bytecode/ClassReader.java Mon Sep 9 20:52:14 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
@@ -348,10 +360,29 @@ public class ClassReader extends ByteArr
int len = readShort();
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);
}
}
}