Uploaded image for project: 'Clover'
  1. Clover
  2. CLOV-1477

HTML syntax highlight rendering fails for '\' character in Unicode

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • Low
    • someday
    • 3.2.2
    • Reporting
    • None
    • Severity 3 - Minor

    Description

      Run Eclipse with Clover 3.3 (occurs on 3.2.2 too). A following a code sample (UTF-8 file encoding):

      public class UnicodeChars {
          // unicode char at start of ident
          int Ätest;
      
          // unicode char in middle of ident
          int testÄtest;
      
          // escaped unicode ident ("sanity")
          int \u0073\u0061\u006e\u0069\u0074\u0079;
      
          // escaped unicode in comments
          /** \u0000 */
      
          // \u0000
      
          // a backslash as escaped unicode escaping a single quote
          char SINGLE_QUOTE = '\u005c'';
      
          // a backslash as escaped unicode escaping a double quote
          String DOUBLE_QUOTE = "\u005c"";
      
          // a backslash as escaped unicode esaping another escaped unicode
          /** \u005Cu0020 */
          /** {@code \u005Cu}<i>xxxx</i> */
      
          void foo() {
          	String s = "foo";
          }
      }
      

      instruments correctly. It also correctly displays in Eclipse's source editor. However, the "Run new report" -> HTML has a folowing ERROR in the log:

      Clover Version 3.3.0, built on March 31 2014 (build-dev)
      Loaded from: D:\Soft\Eclipse\eclipse-4.3-kepler\plugins\com.cenqua.clover.core_3.3.0.v20140331000000.jar
      Clover: Developer License registered to Atlassian.
      WARN: Ignoring unknown context filter """"
      Writing HTML report to 'F:\Work\release\testing-sandbox\javasyntax18\report\html'
      WARN: Ignoring unknown context filter """"
      ERROR: Failed to render syntax highlights for F:\Work\release\testing-sandbox\javasyntax18\src\main\java\UnicodeChars.java: unexpected char: '\'
      Done. Processed 1 packages in 1615ms (1615ms per package).
      

      and the file is not coloured as Java but as a plain text file in the report.

      Attachments

        Activity

          People

            Unassigned Unassigned
            mparfianowicz Marek Parfianowicz
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: