michael-o commented on code in PR #716:
URL: https://github.com/apache/maven-surefire/pull/716#discussion_r1627988457


##########
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/StatelessXmlReporter.java:
##########
@@ -451,7 +451,9 @@ private static void getTestProblems(
                     String type = delimiter == -1 ? stackTrace : 
stackTrace.substring(0, delimiter);
                     ppw.addAttribute("type", type);
                 } else {
-                    ppw.addAttribute("type", new 
StringTokenizer(stackTrace).nextToken());
+                    ppw.addAttribute(
+                            "type",
+                            isBlank(stackTrace) ? "UndefinedException" : new 
StringTokenizer(stackTrace).nextToken());

Review Comment:
   I looked at this again and I want to address for 3.3.0.
   
   I have option D for you: Since this is an oversight and `strackTrace` can be 
truly null of `t.getMessage()` is `null`, we should not write non-sense or 
empty to `type`, but leave it out. Rather no output than bad output. My 
proposal: Since we know that `type` can be null, I can remove the `requried` in 
the schema and bump to 3.1.0.
   
   WDYT?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to