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

replace "".equals(s) with s != null and s.isEmpty()

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 13
    • Fix Version/s: tbd
    • Component/s: core-libs
    • Labels:

      Description

      The idiom "".equals(str) could be more efficient if replaced with a usage
      that can uses String.isEmpty.

      Check for null is important and there might be reason to create a utility method for the purpose.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              rriggs Roger Riggs
              Reporter:
              rriggs Roger Riggs
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated: