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

Trailing null when iterating StringTokenizer

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.0-beta-3
    • 1.0-beta-4
    • None
    • None

    Description

      When iterating through the tokens from a StringTokenizer, a null entry appears at the end of the list.

      groovy> bar = new java.util.StringTokenizer("1/2/3/4/5", "/");
      groovy> bar.each

      { t | println t }

      groovy>
      1
      2
      3
      4
      5
      null

      Attachments

        Activity

          People

            Unassigned Unassigned
            carlfish Charles Miller
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: