You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Robert Scholte (JIRA)" <ji...@apache.org> on 2018/01/21 11:14:00 UTC

[jira] [Commented] (MCHECKSTYLE-348) Checkstyle plugin fails on Unicode Escapes

    [ https://issues.apache.org/jira/browse/MCHECKSTYLE-348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16333467#comment-16333467 ] 

Robert Scholte commented on MCHECKSTYLE-348:
--------------------------------------------

This exception is not from the maven-plugin, but from Checkstyle, so the advice is to file an issue at http://checkstyle.sourceforge.net/
However, based on some [similar issues|https://github.com/checkstyle/checkstyle/issues/4562] at Checkstyle, you might be hitting http://checkstyle.sourceforge.net/writingchecks.html#Limitations

> Checkstyle plugin fails on Unicode Escapes
> ------------------------------------------
>
>                 Key: MCHECKSTYLE-348
>                 URL: https://issues.apache.org/jira/browse/MCHECKSTYLE-348
>             Project: Maven Checkstyle Plugin
>          Issue Type: Bug
>          Components: checkstyle:checkstyle
>    Affects Versions: 2.17, 3.0.0
>            Reporter: Leon K
>            Priority: Major
>
> Checkstyle plugin fails to correctly handle Unicode Escapes [https://docs.oracle.com/javase/specs/jls/se8/html/jls-3.html#jls-3.3] ).
> This issue was introduced in 2.17. It does not occur with earlier versions of maven-checkstyle-plugin.
> For this code:
> {{public class Test {}}
> {{    private String things;}}
> {{    private String \u06c5;}}
> {{}}}
> The following occurs with checkstyle:checkstyle :
> {{[ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:2.17:checkstyle (default-cli) on project checkstyle-bug: An error has occurred in Checkstyle report generation.: Failed during checkstyle configuration: TokenStreamRecognitionException occurred during the analysis of file C:\TEMP\checkstyle-bug\src\main\java\Test.java. unexpected char: '\' -> [Help 1]}}
> Similarly for 3.0.0, we get the same error:
> {{[ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:3.0.0:checkstyle (default-cli) on project checkstyle-bug: An error has occurred in Checkstyle report generation.: Failed during checkstyle configuration: Exception was thrown while processing C:\TEMP\checkstyle-bug\src\main\java\Test.java: TokenStreamRecognitionException occurred during the analysis of file C:\TEMP\checkstyle-bug\src\main\java\Test.java. unexpected char: '\' -> [Help 1]}}
> For 2.16 and earlier, checkstyle:checkstyle completes without error.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)