From abb815917dda52788ac62d67eedfaa4f0e79c4d8 Mon Sep 17 00:00:00 2001 From: wuwen Date: Sun, 8 Oct 2023 16:31:26 +0800 Subject: [PATCH] fixes GitHub Issue 462 (Internal class issues in the Java 21) --- src/main/javassist/bytecode/ConstPool.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/javassist/bytecode/ConstPool.java b/src/main/javassist/bytecode/ConstPool.java index e8434dce..796ba9c9 100644 --- a/src/main/javassist/bytecode/ConstPool.java +++ b/src/main/javassist/bytecode/ConstPool.java @@ -672,6 +672,8 @@ public String getStringInfo(int index) public String getUtf8Info(int index) { Utf8Info utf = (Utf8Info)getItem(index); + if (utf == null) + return null; return utf.string; }