-
CSR
-
Resolution: Unresolved
-
P4
-
None
-
behavioral
-
minimal
-
Some previously accepted but illegal descriptor strings are now rejected. Such strings would already fail when consumed by other tools.
-
Java API
-
Implementation
Summary
Introduce more accurate parsing of descriptor strings in core reflection.
Problem
Using generic string parser to parse descriptor strings is inaccurate; it may accidentally accept generic strings. In addition, we aim to remove this legacy generic string parser, known to be erroneous sometimes, in the future to reduce maintenance cost around evolution of signatures.
Such legacy parser usage occurs for the EnclosingMethods
attribute and the annotation structures in the class
file format.
Solution
We can simply reuse BytecodeDescriptor
since it is behaviorally compatible, including exceptional contracts. Migrating to BytecodeDescriptor
would also align JDK's handling of the descriptor strings closer to that by other tools or consumers of class files.
Specification
None. This is a purely implementation/behavioral change.
- csr of
-
JDK-8356022 Migrate descriptor parsing from generics to BytecodeDescriptor
-
- Resolved
-