Skip to content

Commit 4e811a3

Browse files
committed
Order methods in reading order
1 parent ada4df4 commit 4e811a3

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

src/main/java/net/gamrath/junitpredict/Predict.java

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)