RFR: 8368050: Validation missing in ClassFile signature factories [v3]
Adam Sotona
asotona at openjdk.org
Fri Sep 19 07:17:19 UTC 2025
On Fri, 19 Sep 2025 00:27:04 GMT, Chen Liang <liach at openjdk.org> wrote:
>> The Signature modeling in the ClassFile API is missing some validations required by JVMS, notably identifier character restrictions and void type restrictions. In addition, the model currently uses `ClassDesc` to indicate a simple name for an inner class signature, which is incorrect, and this patch proposes to deprecate that API for removal.
>
> Chen Liang has updated the pull request incrementally with one additional commit since the last revision:
>
> Fix links
src/java.base/share/classes/java/lang/classfile/Signature.java line 230:
> 228: public static ClassTypeSig of(ClassTypeSig outerType, String className, TypeArg... typeArgs) {
> 229: requireNonNull(className);
> 230: return new SignaturesImpl.ClassTypeSigImpl(Optional.ofNullable(outerType), className.replace(".", "/"), List.of(typeArgs));
We should declare that the method accepts binary class name only If we remove conversion from binary to internal class name.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27380#discussion_r2362009319
More information about the core-libs-dev
mailing list