Skip to content

Commit 8459c5b

Browse files
committed
StartupLogCompressor NULL checks
1 parent 3ba2847 commit 8459c5b

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

core/deployment/src/main/java/io/quarkus/deployment/console/StartupLogCompressor.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,19 @@ public void close() {
6969
return;
7070
}
7171
QuarkusConsole.removeOutputFilter(this);
72-
sl.close();
72+
if (sl != null) {
73+
sl.close();
74+
}
7375
}
7476

7577
public void closeAndDumpCaptured() {
7678
if (thread == null) {
7779
return;
7880
}
7981
QuarkusConsole.removeOutputFilter(this);
80-
sl.close();
82+
if (sl != null) {
83+
sl.close();
84+
}
8185
for (var i : toDump) {
8286
QuarkusConsole.INSTANCE.write(true, i);
8387
}
@@ -92,7 +96,9 @@ public boolean test(String s, Boolean errorStream) {
9296
Thread current = Thread.currentThread();
9397
if (current == this.thread || additionalThreadPredicate.test(current)) {
9498
toDump.add(s);
95-
sl.setMessage(MessageFormat.BLUE + name + MessageFormat.RESET + " " + s.replace("\n", ""));
99+
if (sl != null) {
100+
sl.setMessage(MessageFormat.BLUE + name + MessageFormat.RESET + " " + s.replace("\n", ""));
101+
}
96102
return false;
97103
}
98104
return true;

0 commit comments

Comments
 (0)