File tree Expand file tree Collapse file tree 1 file changed +15
-15
lines changed
src/main/java/net/gamrath/junitpredict Expand file tree Collapse file tree 1 file changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,21 @@ public void afterAll(ExtensionContext context) {
6868 writeLogFile (logPath , newLines );
6969 }
7070
71+ @ SuppressWarnings ("CallToPrintStackTrace" )
72+ private static List <String > readLogFile (Path logPath ) {
73+ try {
74+ return Files
75+ .readAllLines (logPath , StandardCharsets .UTF_8 )
76+ .stream ()
77+ .filter (line -> !line .startsWith ("STATS:" ))
78+ .toList ();
79+ } catch (NoSuchFileException ignored ) {
80+ } catch (IOException e ) {
81+ e .printStackTrace ();
82+ }
83+ return Collections .emptyList ();
84+ }
85+
7186 private static String formatStatsLine (final int hits , final int misses ) {
7287 return "STATS: hits=%d, misses=%d" .formatted (hits , misses );
7388 }
@@ -87,19 +102,4 @@ private static void writeLogFile(Path logPath, ArrayList<String> newLines) {
87102 e .printStackTrace ();
88103 }
89104 }
90-
91- @ SuppressWarnings ("CallToPrintStackTrace" )
92- private static List <String > readLogFile (Path logPath ) {
93- try {
94- return Files
95- .readAllLines (logPath , StandardCharsets .UTF_8 )
96- .stream ()
97- .filter (line -> !line .startsWith ("STATS:" ))
98- .toList ();
99- } catch (NoSuchFileException ignored ) {
100- } catch (IOException e ) {
101- e .printStackTrace ();
102- }
103- return Collections .emptyList ();
104- }
105105}
You can’t perform that action at this time.
0 commit comments