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 d6a1f2e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/javassist/bytecode/ConstPool.java
Original file line number Diff line number Diff line change
Expand Up @@ -671,6 +671,9 @@ public String getStringInfo(int index)
*/
public String getUtf8Info(int index)
{
if (index == 0)
return null;

Utf8Info utf = (Utf8Info)getItem(index);
return utf.string;
}
Expand Down Expand Up @@ -1200,6 +1203,9 @@ public int addDoubleInfo(double d)
*/
public int addUtf8Info(String utf8)
{
if (utf8 == null)
return 0;

return addItem(new Utf8Info(utf8, numOfItems));
}

Expand Down

0 comments on commit d6a1f2e

Please sign in to comment.