mirror of https://github.com/apache/maven.git
[MNG-8460] Implement flush() (#2006)
LoggingOutputStream used by default as sysout and syserr were NOT flushing (def method is empty), and flush happened only when EOL was printed. Still, prompts and help:evaluate does print out unterminated strings. --- https://issues.apache.org/jira/browse/MNG-8460
This commit is contained in:
parent
575ad3719c
commit
80107b05d8
|
@ -56,6 +56,11 @@ public class LoggingOutputStream extends FilterOutputStream {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void flush() throws IOException {
|
||||
forceFlush();
|
||||
}
|
||||
|
||||
public void forceFlush() {
|
||||
if (buf.size() > 0) {
|
||||
String line = new String(buf.toByteArray(), 0, buf.size());
|
||||
|
|
Loading…
Reference in New Issue