[ http://jira.codehaus.org/browse/MJNCSS-10?page=comments#action_84408 ] 
            
Jean-Laurent de Morlhon commented on MJNCSS-10:
-----------------------------------------------

Hi Fabrice,

Looks like it's deep inside javancss core code not plugin one.
To investigate further  would you mind posting a stacktrace if it is different 
from the one below  ? :

.../...
TokenMgrError in 
/Users/JeanLaurent/src/workspaces/primary/NcssTestGround/src/main/java/javancss/testground/MJNCSS10.java
Lexical error at line 5, column 39.  Encountered: "\u00a9" (169), after : ""


[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] An error has occurred in JavaNCSS Report report generation.

Embedded error: Error while JavaNCSS was executing
Lexical error at line 5, column 39.  Encountered: "\u00a9" (169), after : ""
[INFO] ------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: An error has occurred 
in JavaNCSS Report report generation.

.../...

Caused by: javancss.TokenMgrError: Lexical error at line 5, column 39.  
Encountered: "\u00a9" (169), after : ""
        at 
javancss.JavaParserTokenManager.getNextToken(JavaParserTokenManager.java:1781)
        at javancss.JavaParser.jj_scan_token(JavaParser.java:11363)
        at javancss.JavaParser.jj_3R_91(JavaParser.java:9664)
        at javancss.JavaParser.jj_3_10(JavaParser.java:9734)
        at javancss.JavaParser.jj_2_10(JavaParser.java:5604)



> Plugin crashes when Java elements have special characters
> ---------------------------------------------------------
>
>                 Key: MJNCSS-10
>                 URL: http://jira.codehaus.org/browse/MJNCSS-10
>             Project: Maven 2.x JavaNCSS Plugin
>          Issue Type: Bug
>            Reporter: Fabrice BELLINGARD
>         Assigned To: Jean-Laurent de Morlhon
>
> One of my team mate found this bug when using a 'é' char on a Java method. 
> When JavaNCSS generates the XML report file, it doesn't specify the file 
> encoding in the <xml> tag (at the very beginning of the file). So when the 
> MOJO reads the report file, it doesn't know which encoding it should use and 
> crashes when reading the report file.
> Looking quickly at the NcssReportMojo class, it looks like specifying the 
> file encoding in the #loadDocument(File file) method should fix the bug (but 
> I haven't tested it):
>    reader.setEncoding(System.getProperty("file.encoding"));

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to