Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8307071

ClassDesc factories perform extraneous argument validations

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • None
    • core-libs

      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.

            Unassigned Unassigned
            liach Chen Liang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: