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

size() and iterator() not correct for an empty IntRange

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.9, 2.2.1
    • Fix Version/s: 2.2.2
    • Component/s: Static compilation
    • Labels:
      None

      Description

      The following script fails:

      def empty = new IntRange(false, 5, 5)
      assert empty.size() == 0
      assert empty.iterator().hasNext() == false
      

        Attachments

        Issue Links

          Activity

            People

            • Assignee:
              paulk Paul King
              Reporter:
              pledbrook Peter Ledbrook

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment