Clean up the unnecessary code in the method UnsharedNameTable#fromUtf

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 17
    • Affects Version/s: 17
    • Component/s: tools
    • b22
    • generic
    • generic

      The code, which is listed below, has two repetitive checks and needs to be cleaned up.

      location: com.sun.tools.javac.util.UnsharedNameTable#fromUtf
      ```
              while (element != null) {
                  if (element == null) {
                      break;
                  }
      ```

      we can see the `while (element != null)` have already checked the `element`. So the `if (element == null)` is redundant and unnecessary.

            Assignee:
            Guoxiong Li
            Reporter:
            Guoxiong Li
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: