JDK8 sources fail to compile when instrumented by Clover

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Medium
    • 3.2.2
    • Affects Version/s: None
    • Component/s: Instrumentation
    • None

      See the attached comparison of original and instrumented code:

      unicode_decoding_error.png

      A problem is as follows:

      • Clover has a UnicodeDecodingReader class which translates 6-letter character sequences "\uNNNN" into a single UTF16 character
      • this is used to correctly tokenize code identifiers (IDENT) written in non-ascii characters (a variable with German umlaut for instance)

      In this specific example, some "\uNNNN" sequences were translated inside comments, and some characters were "swallowed". So for instance a fragment:

      {@code \u}
      

      ends with "java: illegal unicode escape".

      Related issues:

      • CLOV-1305 - syntax highlighting problem
      • CLOV-1131 - Eclipse/IDEA editors get out of sync

        1. unicode_decoding_error.png
          133 kB
          Marek Parfianowicz

            Assignee:
            Marek Parfianowicz
            Reporter:
            Marek Parfianowicz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: