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

Tokenizer improvements

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 16
    • Component/s: tools
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b19

      Description

      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

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: