From 84fc5c908d78a5a78f7d00226e066e56b9c6cafe Mon Sep 17 00:00:00 2001 From: Carsten Hammer Date: Sat, 6 Apr 2019 20:13:26 +0200 Subject: Convert to lambda or member reference Convert anonymous inner classes to lambda expressions or member references Bug: 545856 CQ: 19537 Change-Id: I621431c178e8b99316314602f7c66c9a36f9ae98 Signed-off-by: Carsten Hammer Signed-off-by: Matthias Sohn --- .../tst/org/eclipse/jgit/pgm/ArchiveTest.java | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ArchiveTest.java') diff --git a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ArchiveTest.java b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ArchiveTest.java index 47eb156c55..e07fdd50d2 100644 --- a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ArchiveTest.java +++ b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ArchiveTest.java @@ -60,7 +60,6 @@ import java.io.OutputStream; import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import java.util.concurrent.Callable; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; @@ -703,15 +702,12 @@ public class ArchiveTest extends CLIRepositoryTestCase { private static Future writeAsync(OutputStream stream, byte[] data) { ExecutorService executor = Executors.newSingleThreadExecutor(); - return executor.submit(new Callable() { - @Override - public Object call() throws IOException { - try { - stream.write(data); - return null; - } finally { - stream.close(); - } + return executor.submit(() -> { + try { + stream.write(data); + return null; + } finally { + stream.close(); } }); } -- cgit v1.2.3