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

Comparison null

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.0.9
    • None
    • groovy-runtime
    • None

    Description

      Stable when comparing null by operator less with any not null value, the expression evaluates to true:

      println null == null // correct, true
      println null > null // correct, false
      println null < null // correct, false
      println null == 0 // correct, false
      println null > 0 // correct, false
      println null < 0 // incorrect, true (???)

       

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            ascrus Alexsey Konstantinov

            Dates

              Created:
              Updated:

              Slack

                Issue deployment