diff --git a/src/main/groovy/com/athaydes/spockframework/report/internal/HtmlReportCreator.groovy b/src/main/groovy/com/athaydes/spockframework/report/internal/HtmlReportCreator.groovy index b369cbe..18b8315 100644 --- a/src/main/groovy/com/athaydes/spockframework/report/internal/HtmlReportCreator.groovy +++ b/src/main/groovy/com/athaydes/spockframework/report/internal/HtmlReportCreator.groovy @@ -279,10 +279,9 @@ class HtmlReportCreator extends AbstractHtmlCreator List iterations = run ? run.copyFailuresByIteration().keySet() - .toList().findAll { it.iterationIndex >= 0 } - .sort { it.iterationIndex } - : List.of() - def extraInfo = List.of() + .toList().sort { it.iterationIndex } + : Collections.emptyList() + def extraInfo = Collections.emptyList() def multipleIterations = iterations.size() > 1 if ( run && multipleIterations ) { extraInfo = iterations.collectMany { diff --git a/src/test/groovy/com/athaydes/spockframework/report/engine/CanRunSpockSpecs.groovy b/src/test/groovy/com/athaydes/spockframework/report/engine/CanRunSpockSpecs.groovy index cbaf4c7..a80bb6b 100644 --- a/src/test/groovy/com/athaydes/spockframework/report/engine/CanRunSpockSpecs.groovy +++ b/src/test/groovy/com/athaydes/spockframework/report/engine/CanRunSpockSpecs.groovy @@ -17,14 +17,14 @@ trait CanRunSpockSpecs { else execute( selectClass( specClass ) ) } - private static void execute( DiscoverySelector selector, Consumer statisticsConsumer ) { + private void execute( DiscoverySelector selector, Consumer statisticsConsumer ) { execute( selector ) .testEvents() .debug() .assertStatistics( statisticsConsumer ) } - private static EngineExecutionResults execute( DiscoverySelector selector ) { + private EngineExecutionResults execute( DiscoverySelector selector ) { return EngineTestKit .engine( "spock" ) .selectors( selector )