in surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/util/LineConsumerThread.java [64:86]
public void run() {
try (Scanner stream = new Scanner(channel, encoding.name());
CountdownCloseable c = countdownCloseable; ) {
boolean isError = false;
while (stream.hasNextLine()) {
try {
String line = stream.nextLine();
isError |= stream.ioException() != null;
if (!isError && !disabled) {
eventHandler.handleEvent(line);
}
} catch (IllegalStateException e) {
isError = true;
}
}
} catch (IOException e) {
if (e instanceof InterruptedIOException || e.getCause() instanceof InterruptedException) {
Thread.currentThread().interrupt();
}
} catch (IllegalStateException e) {
// not needed
}
}