Skip to content

Commit

Permalink
[MSHARED-1247] java.lang.RuntimeException: Unknown constant pool type
Browse files Browse the repository at this point in the history
'17'
  • Loading branch information
garydgregory committed Apr 28, 2023
1 parent a9a6fd3 commit 409060a
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ public class ConstantPoolParser {
/** Constant <code>CONSTANT_METHOD_TYPE=16</code> */
public static final byte CONSTANT_METHOD_TYPE = 16;

/** Constant <code>CONSTANT_INVOKE=17</code> */
public static final byte CONSTANT_INVOKE = 17;

/** Constant <code>CONSTANT_INVOKE_DYNAMIC=18</code> */
public static final byte CONSTANT_INVOKE_DYNAMIC = 18;

Expand Down Expand Up @@ -156,6 +159,9 @@ static Set<String> parseConstantPoolClassReferences(ByteBuffer buf) {
case CONSTANT_METHODHANDLE:
consumeMethodHandle(buf);
break;
case CONSTANT_INVOKE:
consumeDynamic(buf);
break;
case CONSTANT_INVOKE_DYNAMIC:
consumeInvokeDynamic(buf);
break;
Expand Down Expand Up @@ -260,6 +266,11 @@ private static void consumeMethodHandle(ByteBuffer buf) {
buf.getChar();
}

private static void consumeDynamic(ByteBuffer buf) {
buf.getChar(); // u2 bootstrap_method_attr_index;
buf.getChar(); // u2 name_and_type_index;
}

private static void consumeInvokeDynamic(ByteBuffer buf) {
buf.getChar();
buf.getChar();
Expand Down

0 comments on commit 409060a

Please sign in to comment.