Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8315976

StreamTokenizer should document its defaults

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • None
    • core-libs
    • generic
    • generic

      A DESCRIPTION OF THE PROBLEM :
      The constructor for StreamTokenizer sets several syntax options by default.
      Notably:
      1. It calls parseNumbers(); which means that unquoted character 4 will be returned as 4.0.
      2. it calls commentChar('/'); which means that strings like 4/2=2 will first return 4.0 and then skip to after the next End Of Line, thus skipping all characters after the 4 character.

      The documentation of StreamTokenizer should be updated to include the defaults set in the constructor.


            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: