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

Tokenizer improvements

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P3 P3
    • 16
    • None
    • tools
    • None
    • b19

      The UnicodeReader/JavaTokenizer code is made more obscure than needed by some suboptimal implementation & naming choices:

      * UnicodeReader has both API to 'scan' a char (e.g. read next char) as well as to 'putChar' e.g. save char in a temp buffer. The buffer functionality should arguably be higher-level and moved in the JavaTokenizer itself?

      * 'putChar' has subtle overloads, some of which also advance the reader state

      * the reader 'scanChar' API could be made more intuitive by renaming it to something like 'nextChar' suggesting the underlying state change

            jlaskey Jim Laskey
            mcimadamore Maurizio Cimadamore
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: