@@ -25,7 +25,8 @@ public Type[] getGenericTypes(Class<?> clazz) throws Exception {
25
25
Type [] typeArguments ;
26
26
ConstantPool constantPool = (ConstantPool ) Class_getConstantPool .invoke (clazz );
27
27
String typeString = getTypeString (constantPool );
28
- jdk .internal .org .objectweb .asm .Type [] argumentTypes = jdk .internal .org .objectweb .asm .Type .getArgumentTypes (typeString );
28
+ jdk .internal .org .objectweb .asm .Type [] argumentTypes = jdk .internal .org .objectweb .asm .Type
29
+ .getArgumentTypes (typeString );
29
30
typeArguments = new Type [argumentTypes .length ];
30
31
for (int i = 0 ; i < argumentTypes .length ; i ++) {
31
32
typeArguments [i ] = Class .forName (argumentTypes [i ].getClassName ());
@@ -34,21 +35,21 @@ public Type[] getGenericTypes(Class<?> clazz) throws Exception {
34
35
}
35
36
36
37
private String getTypeString (ConstantPool constantPool ) {
37
- int size = constantPool .getSize ();
38
- String [] memberRef = null ;
39
-
40
- // find last element in constantpool with valid memberRef
41
- // - previously always at size-2 index but changed with 1.8.0_60
42
- for (int i = size - 1 ; i > -1 ; i --) {
43
- try {
44
- memberRef = constantPool .getMemberRefInfoAt (i );
45
- break ;
46
- } catch (IllegalArgumentException e ) {
47
- // eat error; null entry at ConstantPool index?
48
- }
49
- }
50
-
51
- return memberRef [2 ];
38
+ int size = constantPool .getSize ();
39
+ String [] memberRef = null ;
40
+
41
+ // find last element in constantpool with valid memberRef
42
+ // - previously always at size-2 index but changed with JDK 1.8.0_60
43
+ for (int i = size - 1 ; i > -1 ; i --) {
44
+ try {
45
+ memberRef = constantPool .getMemberRefInfoAt (i );
46
+ break ;
47
+ } catch (IllegalArgumentException e ) {
48
+ // eat error; null entry at ConstantPool index?
49
+ }
50
+ }
51
+
52
+ return memberRef [2 ];
52
53
}
53
54
54
55
}
0 commit comments