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

Redundant null comparison after Pattern.split

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P5
    • Resolution: Fixed
    • Affects Version/s: 16, 17
    • Fix Version/s: 18
    • Component/s: core-libs
    • Labels:
      None
    • Resolved In Build:
      b25

      Description

      In couple of classes, result part of arrays of Pattern.split is compared with `null`.
      Pattern.split (and hence String.split) never returns `null` in array elements. Such comparisons are redundant.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              aturbanov Andrey Turbanov
              Reporter:
              aturbanov Andrey Turbanov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: