[ 
http://jira.codehaus.org/browse/SUREFIRE-429?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dan Fabulich closed SUREFIRE-429.
---------------------------------

       Resolution: Cannot Reproduce
    Fix Version/s:     (was: 2.4.1)

I just tried it with BEA JRockit(R) (build 
R27.4.0-90-89592-1.4.2_15-20070928-1715-windows-ia32 and it worked fine.

With that said, I don't doubt that this is really happening on your end.  I'd 
accept a patch if you submit one and reopen the bug.  Barring that, please 
submit a reduced test case (a minimal Maven project that reproduces the 
problem) and reopen the bug.

> surefire-report plugin not compatible with Jrockit JVM
> ------------------------------------------------------
>
>                 Key: SUREFIRE-429
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-429
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: plugin
>    Affects Versions: 2.3.1
>         Environment: Linux Jrockit : jrockit-j2sdk1.4.2_08
>            Reporter: Brian Harper
>
> When running mvn surefire-report:report (or report-only), I encountered an 
> exception:
> [INFO] An error has occurred in Maven Surefire Report report generation.
>  
> Embedded error: String index out of range: -44
> The stack trace shows the following:
> Caused by: java.lang.StringIndexOutOfBoundsException: String index out of 
> range: -44
>         at java.lang.String.substring(II)Ljava/lang/String;(Unknown Source)
>         at 
> org.apache.maven.plugins.surefire.report.SurefireReportGenerator.getErrorLineNumber(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;(SurefireReportGenerator.java:608)
> Looking at the code for SurefireReportGenerator.java, I see that in 
> getErrorLineNumber, the following code is used to parse the test error report 
> to find the line number:
> if ( token.startsWith( className ) )
>             {
>                 int idx = token.indexOf( ":" );
>                 lineNo = token.substring( idx + 1, token.indexOf( ")" ) );
>                 break;
>             }
> This works fine if the Sun JVM's stack trace format:
> at net.company.package.MyClassTest.testMethod(MyClassTest.java:95)
> But here's what the stack trace looks like with Jrockit:
> at net.company.package.MyClassTest.testMethod()V(MyClassTest.java:95)
> Sure enough, if I swith to the Sun JVM and rerun, the report is generated 
> successfully.
> The parsing logic should be fixed to look for the last occurence of a close 
> parentheses rather than the first. 

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

        

Reply via email to