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

String.split non-positive term incorrect use

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b16
    • Verification:
      Not verified

      Backports

        Description

        A DESCRIPTION OF THE PROBLEM :
        In the documentation of String.split it says: "If n is non-positive then the pattern will be applied as many times as possible and the array can have any length. If n is zero then the..."
        But non-positive is used meaning negative but it is not correct. For further information see:
        https://math.stackexchange.com/questions/1023616/difference-between-nonpositive-and-negative-numbers#1023619

        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        "If n is negative then the pattern will be applied as many times as possible and the array can have any length. If n is zero then the..."
        ACTUAL -
        "If n is non-positive then the pattern will be applied as many times as possible and the array can have any length. If n is zero then the..."

        URL OF FAULTY DOCUMENTATION :
        https://docs.oracle.com/javase/8/docs/api/java/lang/String.html#split-java.lang.String-

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                sherman Xueming Shen
                Reporter:
                webbuggrp Webbug Group
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: