On Thu, 20 Nov 2025 16:30:32 GMT, ExE Boss <[email protected]> wrote: >> Could you add a test for something like `"Ljava#/lang/Object;"`? > > That is a valid **JVM** [field descriptor] (but not a denotable type in > **Java**). > > -------------------------------------------------------------------------------- > > These 4 are the only characters which are forbidden from appearing in > identifiers by the [JVMS § 4.2.1]. > > [JVMS § 4.2.1]: > https://docs.oracle.com/javase/specs/jvms/se25/html/jvms-4.html#jvms-4.2.1 > [field descriptor]: > https://docs.oracle.com/javase/specs/jvms/se25/html/jvms-4.html#jvms-4.3.2
Yep, the 4 chars are listed by JVMS 4.2.2, close enough. This is also in line with the behavior of [ClassFileParser::verify_unqualified_name](https://github.com/openjdk/jdk/blob/ea19ad2ac8a1fa9d4124be9a8e05cf4c6f6231bd/src/hotspot/share/classfile/classFileParser.cpp#L4544C5-L4544C46). ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/28079#discussion_r2546880778
