Uploaded image for project: 'yangtools'
  1. yangtools
  2. YANGTOOLS-1508

Make YangTextSchemaSource work on CharSource

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved
    • Medium
    • Resolution: Done
    • None
    • 11.0.0
    • parser

    Description

      As it currently stands, YangTextSchemaSource works on ByteSource, i.e. it does not make any guarantees about the actual character set being used. We pass whatever bytes we have to ANTLR, where we use a constructor which assumes UTF-8.

      We can be more flexible: make YangTextSchemaSource as CharSource, exposing the character set in use the the various utility methods. This allows use to push the charset assumption up a layer to actual callers and interface ANTLR with plain java.io.Reader, i.e. without forcing everone to use UTF-8.

      Since this impacts YANGTOOLS-1507, rename ImmediateYangTextSchemaSource to StringYangTextSchemaSource, making it more obvious.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            rovarga Robert Varga
            rovarga Robert Varga
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: