ClassDesc factory methods of and ofInternalName perform extraneous validations when they are already guarded by another descriptor check. These extraneous validations are confusing as they have different error messages, such as when calling ClassDesc.of("").
We should revamp the binary/internal name checks to be comprehensive, that it should detect initial, trailing, and consecutive . or / (including rejecting empty strings) in addition to the current checks. Then, we can create a ReferenceClassDescImpl from a validated descriptor string.
We should revamp the binary/internal name checks to be comprehensive, that it should detect initial, trailing, and consecutive . or / (including rejecting empty strings) in addition to the current checks. Then, we can create a ReferenceClassDescImpl from a validated descriptor string.
- duplicates
-
JDK-8338544 Dedicated Array class descriptor implementation
-
- Resolved
-