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

ClassDesc.of incorrectly permitting empty names

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 24
    • 24
    • 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.

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

              Created:
              Updated:
              Resolved: