You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Kohsuke Kawaguchi (JIRA)" <ji...@codehaus.org> on 2009/10/30 21:50:26 UTC

[jira] Created: (MCOMPILER-109) JavacCompiler treat localized warning messages as errors

JavacCompiler treat localized warning messages as errors
--------------------------------------------------------

                 Key: MCOMPILER-109
                 URL: http://jira.codehaus.org/browse/MCOMPILER-109
             Project: Maven 2.x Compiler Plugin
          Issue Type: Bug
            Reporter: Kohsuke Kawaguchi


This is really a bug in plexus-compiler-javac, not that of a Maven plugin.

Javac uses localized messages for "error" and "warning" for languages like Japanese, but JavacCompiler.parseModernStream(...) and parseModernError(...) is hard-coded to only understand English words "warning" and "error".

In particular, in line 535, the code treats any keyword but "warning" as errors, so the Japanese word "&#35686;&#21578;" (meaning warning) is interpreted as an error.

{code}
            isError = !msg.startsWith( WARNING_PREFIX );
{code}

As a fix, I suggest you check the exit code from javac to determine if there were any errors --- if it returns 0, treat everything as warnings.



-- 
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

        

[jira] Closed: (MCOMPILER-109) JavacCompiler treat localized warning messages as errors

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MCOMPILER-109?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann closed MCOMPILER-109.
---------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.4
         Assignee: Benjamin Bentmann

Fixed in [r990633|http://svn.apache.org/viewvc?view=revision&revision=990633].

> JavacCompiler treat localized warning messages as errors
> --------------------------------------------------------
>
>                 Key: MCOMPILER-109
>                 URL: http://jira.codehaus.org/browse/MCOMPILER-109
>             Project: Maven 2.x Compiler Plugin
>          Issue Type: Bug
>            Reporter: Kohsuke Kawaguchi
>            Assignee: Benjamin Bentmann
>             Fix For: 2.4
>
>
> This is really a bug in plexus-compiler-javac, not that of a Maven plugin.
> Javac uses localized messages for "error" and "warning" for languages like Japanese, but JavacCompiler.parseModernStream(...) and parseModernError(...) is hard-coded to only understand English words "warning" and "error".
> In particular, in line 535, the code treats any keyword but "warning" as errors, so the Japanese word "&#35686;&#21578;" (meaning warning) is interpreted as an error.
> {code}
>             isError = !msg.startsWith( WARNING_PREFIX );
> {code}
> As a fix, I suggest you check the exit code from javac to determine if there were any errors --- if it returns 0, treat everything as warnings.

-- 
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

        

[jira] Updated: (MCOMPILER-109) JavacCompiler treat localized warning messages as errors

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MCOMPILER-109?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann updated MCOMPILER-109:
----------------------------------------

    Affects Version/s: 2.3.1
        Fix Version/s:     (was: 2.4)
                       2.3.2

> JavacCompiler treat localized warning messages as errors
> --------------------------------------------------------
>
>                 Key: MCOMPILER-109
>                 URL: http://jira.codehaus.org/browse/MCOMPILER-109
>             Project: Maven 2.x Compiler Plugin
>          Issue Type: Bug
>    Affects Versions: 2.3.1
>            Reporter: Kohsuke Kawaguchi
>            Assignee: Benjamin Bentmann
>             Fix For: 2.3.2
>
>
> This is really a bug in plexus-compiler-javac, not that of a Maven plugin.
> Javac uses localized messages for "error" and "warning" for languages like Japanese, but JavacCompiler.parseModernStream(...) and parseModernError(...) is hard-coded to only understand English words "warning" and "error".
> In particular, in line 535, the code treats any keyword but "warning" as errors, so the Japanese word "&#35686;&#21578;" (meaning warning) is interpreted as an error.
> {code}
>             isError = !msg.startsWith( WARNING_PREFIX );
> {code}
> As a fix, I suggest you check the exit code from javac to determine if there were any errors --- if it returns 0, treat everything as warnings.

-- 
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