java.util.regex.Pattern.matcher(null) is to be specified as NullPointerException

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P4
    • None
    • Affects Version/s: 7
    • Component/s: core-libs

      A DESCRIPTION OF THE PROBLEM :
      The API document is not mentioning the case that java.utl.regex.Pattern.matcher(input) gets the argument input = null, and the description can be read that the method 'matcher' never raises exceptions. However jre provided by Oracle raises NullPointerException for the case.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
        To be added the 'Throws' paragraph to the 'matcher's description, and be described about the case if input is null.
      ACTUAL -
      Nothing about the exception is written.

      URL OF FAULTY DOCUMENTATION :
      http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html#matcher(java.lang.CharSequence)

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

              Created:
              Updated:
              Resolved: