Tibor17 commented on a change in pull request #320:
URL: https://github.com/apache/maven-surefire/pull/320#discussion_r500621644
##########
File path:
surefire-providers/common-java5/src/main/java/org/apache/maven/surefire/report/SmartStackTraceParser.java
##########
@@ -185,12 +185,16 @@ private static String truncateMessage( String msg, int i )
private boolean rootIsInclass()
{
- return stackTrace.length > 0 && stackTrace[0].getClassName().equals(
testClassName );
+ return stackTrace != null && stackTrace.length > 0 &&
stackTrace[0].getClassName().equals( testClassName );
}
private static List<StackTraceElement> focusOnClass( StackTraceElement[]
stackTrace, Class<?> clazz )
{
List<StackTraceElement> result = new ArrayList<>();
+ if ( stackTrace == null )
+ {
Review comment:
Pls use `Collections.emptyList()` instead, and move the `ArrayList`
down. Thx
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]