maven-surefire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r332011 - /maven/surefire/trunk/surefire/src/main/java/org/codehaus/surefire/report/XMLReporter.java
Date Wed, 09 Nov 2005 09:44:03 GMT
Author: evenisse
Date: Wed Nov  9 01:43:58 2005
New Revision: 332011

URL: http://svn.apache.org/viewcvs?rev=332011&view=rev
Log:
[SUREFIRE-11] Fix when report.getThrowable().getMessage() is null

Modified:
    maven/surefire/trunk/surefire/src/main/java/org/codehaus/surefire/report/XMLReporter.java

Modified: maven/surefire/trunk/surefire/src/main/java/org/codehaus/surefire/report/XMLReporter.java
URL: http://svn.apache.org/viewcvs/maven/surefire/trunk/surefire/src/main/java/org/codehaus/surefire/report/XMLReporter.java?rev=332011&r1=332010&r2=332011&view=diff
==============================================================================
--- maven/surefire/trunk/surefire/src/main/java/org/codehaus/surefire/report/XMLReporter.java
(original)
+++ maven/surefire/trunk/surefire/src/main/java/org/codehaus/surefire/report/XMLReporter.java
Wed Nov  9 01:43:58 2005
@@ -138,9 +138,16 @@
         
         message = StringUtils.replace( message, "\"", """ );
                 
-        error.setAttribute("message", message);
+		if( message != null && !message.equals( "" ) )
+		{
+			error.setAttribute("message", message);
 
-        error.setAttribute("type", stackTrace.substring(0, stackTrace.indexOf(":")));
+			error.setAttribute("type", stackTrace.substring(0, stackTrace.indexOf(":")));
+		}
+		else
+		{
+			error.setAttribute("type", stackTrace.substring(0, stackTrace.indexOf("Exception") + 9
));
+		}
         
         error.setValue(stackTrace);
         



Mime
View raw message