Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-3718

Regular-Expression-Evaluates-Null-As-True

    XMLWordPrintableJSON

Details

    Description

      Issue reported groovy-user forum: http://www.nabble.com/Regular-Expression-Evaluates-Null-As-True--to25223536.html

      / * Returns true */
      println null ==~ /[^0-9]+/

      / * Returns false */
      println null ==~ /[0-9]+/

      In both the cases, it should probably just throw NPE.

      Attachments

        Activity

          People

            roshandawrani Roshan Dawrani
            roshandawrani Roshan Dawrani
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: