Skip to content

Commit

Permalink
fixes GitHub Issue 462 (Internal class issues in the Java 21)
Browse files Browse the repository at this point in the history
  • Loading branch information
wuwen5 committed Oct 8, 2023
1 parent 700be6f commit d63c0ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/javassist/bytecode/MethodParametersAttribute.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public int name(int i) {
* @param i the position of the parameter.
*/
public String parameterName(int i) {
return getConstPool().getUtf8Info(name(i));
return name(i) == 0 ? "" : getConstPool().getUtf8Info(name(i));
}

/**
Expand All @@ -87,7 +87,7 @@ public AttributeInfo copy(ConstPool newCp, Map<String,String> classnames) {
String[] names = new String[s];
int[] flags = new int[s];
for (int i = 0; i < s; i++) {
names[i] = cp.getUtf8Info(name(i));
names[i] = name(i) == 0 ? "" : cp.getUtf8Info(name(i));
flags[i] = accessFlags(i);
}

Expand Down

0 comments on commit d63c0ca

Please sign in to comment.