java.io.StreamTokenizer will noton't allow digits to be wordChars

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P4
    • None
    • Affects Version/s: 1.1.1
    • Component/s: core-libs
    • None
    • sparc
    • solaris_2.5.1



      Name: sg39081 Date: 08/15/97


      If the StreamTokenizer method "wordChars()" is used on the
      characters '0' - '9', they are still interpreted as digits
      by "nextToken()".

      Based on the source, the following factors conspire to produce
      this problem:
      1. The constructor calls "parseNumbers()", creating the default
         "digit" interpretation.
      2. The "wordChars()" method OR's the ALPHA property with the
         DIGIT property, instead of simply setting it to ALPHA.
      3. The "if" clause that parses digits is executed first. So,
         the DIGIT property of these characters is recognized first,
         and the ALPHA property is ignored.

      company - Sun Microsystems Computer Corp , email - ###@###.###
      ======================================================================

            Assignee:
            Zhenghua Li (Inactive)
            Reporter:
            Sheri Good (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: