ClassDesc.of incorrectly permitting empty names

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 24
    • Affects Version/s: 24
    • Component/s: core-libs
    • None
    • b23

      After JDK-8338544, the old descriptor string validation is removed. The new validation doesn't test against empty strings, so the call `ClassDesc.of("")` and `ClassDesc.ofInternalName("")` now erroneously returns instead of throwing an IllegalArgumentException.

      The class name validation has significant overlap with package names: valid package names, except the empty string for the unnamed package, are always valid class names. Valid class names are always valid package names. We can unify their validation.

            Assignee:
            Chen Liang
            Reporter:
            Chen Liang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: