On Sun, 7 Sep 2025 20:09:53 GMT, Chen Liang <li...@openjdk.org> wrote:
>> Guanqiang Han has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Use a different native method for testNative, since the implementation of >> forName has changed. > > src/java.base/share/classes/java/lang/Class.java line 4162: > >> 4160: if (!ModifiedUtf.isValidLengthInConstantPool(name)) { >> 4161: throw new ClassNotFoundException( >> 4162: "Class name length exceeds limit of " + >> ModifiedUtf.CONSTANT_POOL_UTF8_MAX_BYTES); > > Suggestion: > > "Class name length exceeds limit of " + > ModifiedUtf.CONSTANT_POOL_UTF8_MAX_BYTES + ": " + name); @liach Thanks for the suggestion. I think including the name is useful, but since it can be extremely long in this case, Iād prefer to log only the first part (e.g. first 256 chars + āā¦ā) to give context without flooding the logs. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26802#discussion_r2331704563