Skip to content

Commit

Permalink
TIKA-4290: use lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
THausherr committed Aug 10, 2024
1 parent 9838502 commit 92b5e45
Showing 1 changed file with 6 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,9 @@ public class ConcurrentUtilsTest {
@Test
public void testExecuteThread() throws Exception {
ParseContext context = new ParseContext();
Future result = ConcurrentUtils.execute(context, new Runnable() {

@Override
public void run() {
//Do nothing

}
Future result = ConcurrentUtils.execute(context, () ->
{
//Do nothing
});

assertNull(result.get());
Expand All @@ -48,13 +44,9 @@ public void testExecuteExecutor() throws Exception {
TikaConfig config = TikaConfig.getDefaultConfig();
ParseContext context = new ParseContext();
context.set(ExecutorService.class, config.getExecutorService());
Future result = ConcurrentUtils.execute(context, new Runnable() {

@Override
public void run() {
//Do nothing

}
Future result = ConcurrentUtils.execute(context, () ->
{
//Do nothing
});

assertNull(result.get());
Expand Down

0 comments on commit 92b5e45

Please sign in to comment.