maven-surefire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r541248 - /maven/surefire/branches/surefire-2.3.x/surefire-api/src/main/java/org/apache/maven/surefire/report/XMLReporter.java
Date Thu, 24 May 2007 09:57:04 GMT
Author: brett
Date: Thu May 24 02:57:03 2007
New Revision: 541248

URL: http://svn.apache.org/viewvc?view=rev&rev=541248
Log:
[SUREFIRE-327] fix  java.lang.StringIndexOutOfBoundsException in XMLReporter
Submitted by: Tom Spengler

Modified:
    maven/surefire/branches/surefire-2.3.x/surefire-api/src/main/java/org/apache/maven/surefire/report/XMLReporter.java

Modified: maven/surefire/branches/surefire-2.3.x/surefire-api/src/main/java/org/apache/maven/surefire/report/XMLReporter.java
URL: http://svn.apache.org/viewvc/maven/surefire/branches/surefire-2.3.x/surefire-api/src/main/java/org/apache/maven/surefire/report/XMLReporter.java?view=diff&rev=541248&r1=541247&r2=541248
==============================================================================
--- maven/surefire/branches/surefire-2.3.x/surefire-api/src/main/java/org/apache/maven/surefire/report/XMLReporter.java
(original)
+++ maven/surefire/branches/surefire-2.3.x/surefire-api/src/main/java/org/apache/maven/surefire/report/XMLReporter.java
Thu May 24 02:57:03 2007
@@ -197,7 +197,10 @@
             {
                 element.setAttribute( "message", escapeAttribute( message ) );
 
-                element.setAttribute( "type", stackTrace.substring( 0, stackTrace.indexOf(
":" ) ) );
+                element.setAttribute( "type", ( stackTrace.indexOf( ":" ) > -1 ? stackTrace.substring(
0,
+                                                                                        
              stackTrace.indexOf(
+                                                                                        
                  ":" ) )
+                    : stackTrace ) );
             }
             else
             {



Mime
View raw message