final class ThreadedStreamConsumer.Pumper
extends java.lang.Object
implements java.lang.Runnable
Modifier and Type | Field and Description |
---|---|
private MultipleFailureException |
errors |
private org.apache.maven.shared.utils.cli.StreamConsumer |
target |
Constructor and Description |
---|
Pumper(org.apache.maven.shared.utils.cli.StreamConsumer target) |
Modifier and Type | Method and Description |
---|---|
(package private) boolean |
hasErrors() |
void |
run()
Calls
ForkClient.consumeLine(String) which may throw any RuntimeException .Even if ForkClient is not fault-tolerant, this method MUST be fault-tolerant and thus the
try-catch block must be inside of the loop which prevents from loosing events from StreamConsumer . |
(package private) void |
throwErrors() |
private final org.apache.maven.shared.utils.cli.StreamConsumer target
private final MultipleFailureException errors
public void run()
ForkClient.consumeLine(String)
which may throw any RuntimeException
.ForkClient
is not fault-tolerant, this method MUST be fault-tolerant and thus the
try-catch block must be inside of the loop which prevents from loosing events from StreamConsumer
.
ConsoleOutputFileReporter.writeTestOutput(byte[], int, int, boolean)
throws
IOException
and then target.consumeLine()
throws any RuntimeException, this method
MUST NOT skip reading the events from the forked JVM; otherwise we could simply lost events
e.g. acquire-next-test which means that ForkClient
could hang on waiting for old test to complete
and therefore the plugin could be permanently in progress.run
in interface java.lang.Runnable
boolean hasErrors()
void throwErrors() throws java.io.IOException
java.io.IOException