File tree Expand file tree Collapse file tree 3 files changed +7
-42
lines changed
src/main/java/org/codehaus/mojo/exec Expand file tree Collapse file tree 3 files changed +7
-42
lines changed Original file line number Diff line number Diff line change 38
38
import java .util .Properties ;
39
39
import java .util .Set ;
40
40
import java .util .TreeSet ;
41
+ import java .util .function .Consumer ;
41
42
import java .util .jar .JarEntry ;
42
43
import java .util .jar .JarOutputStream ;
43
44
import java .util .jar .Manifest ;
@@ -435,7 +436,7 @@ else if (useMavenLogger)
435
436
getLog ().debug ("Will redirect program output to Maven logger" );
436
437
final String parentThreadName = Thread .currentThread ().getName ();
437
438
final String logSuffix = "[" + parentThreadName + "] " ;
438
- Invokable <String > mavenOutRedirect = new Invokable <String >()
439
+ Consumer <String > mavenOutRedirect = new Consumer <String >()
439
440
{
440
441
441
442
@ Override
@@ -451,7 +452,7 @@ public void accept(String logMessage)
451
452
}
452
453
}
453
454
};
454
- Invokable <String > mavenErrRedirect = new Invokable <String >()
455
+ Consumer <String > mavenErrRedirect = new Consumer <String >()
455
456
{
456
457
457
458
@ Override
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 20
20
*/
21
21
22
22
import java .io .OutputStream ;
23
+ import java .util .function .Consumer ;
23
24
24
25
/**
25
26
* An output stream that captures one line of output at a time, and then
26
- * redirects that line to some {@link Invokable } to act upon as it pleases. This
27
+ * redirects that line to some {@link Consumer } to act upon as it pleases. This
27
28
* class is not thread safe and expects to have only one active writer consuming
28
29
* it at any given time.
29
30
*
32
33
class LineRedirectOutputStream extends OutputStream {
33
34
34
35
private StringBuilder currentLine = new StringBuilder ();
35
- private final Invokable <String > linePrinter ;
36
+ private final Consumer <String > linePrinter ;
36
37
37
- public LineRedirectOutputStream (Invokable <String > linePrinter ) {
38
+ public LineRedirectOutputStream (Consumer <String > linePrinter ) {
38
39
this .linePrinter = linePrinter ;
39
40
}
40
41
You can’t perform that action at this time.
0 commit comments