From 8f3387e7cb680f963a42e5f40adbe5fa9d4510ce Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Mon, 1 Jul 2019 08:31:31 +0200 Subject: [PATCH] fixed compile errors after cherry-picking --- .../elasticsearch/action/ingest/SimulateExecutionService.java | 2 +- .../elasticsearch/action/bulk/BulkRequestModifierTests.java | 2 +- .../action/ingest/SimulateExecutionServiceTests.java | 4 ++-- .../java/org/elasticsearch/ingest/IngestServiceTests.java | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/src/main/java/org/elasticsearch/action/ingest/SimulateExecutionService.java b/server/src/main/java/org/elasticsearch/action/ingest/SimulateExecutionService.java index 8014219ad6d..03c295c2288 100644 --- a/server/src/main/java/org/elasticsearch/action/ingest/SimulateExecutionService.java +++ b/server/src/main/java/org/elasticsearch/action/ingest/SimulateExecutionService.java @@ -65,7 +65,7 @@ class SimulateExecutionService { } public void execute(SimulatePipelineRequest.Parsed request, ActionListener listener) { - threadPool.executor(THREAD_POOL_NAME).execute(new ActionRunnable<>(listener) { + threadPool.executor(THREAD_POOL_NAME).execute(new ActionRunnable(listener) { @Override protected void doRun() { final AtomicInteger counter = new AtomicInteger(); diff --git a/server/src/test/java/org/elasticsearch/action/bulk/BulkRequestModifierTests.java b/server/src/test/java/org/elasticsearch/action/bulk/BulkRequestModifierTests.java index 5a168264a74..8e6f3e606a3 100644 --- a/server/src/test/java/org/elasticsearch/action/bulk/BulkRequestModifierTests.java +++ b/server/src/test/java/org/elasticsearch/action/bulk/BulkRequestModifierTests.java @@ -102,7 +102,7 @@ public class BulkRequestModifierTests extends ESTestCase { assertThat(bulkRequest.requests().size(), Matchers.equalTo(16)); List responses = new ArrayList<>(); - ActionListener bulkResponseListener = modifier.wrapActionListenerIfNeeded(1L, new ActionListener<>() { + ActionListener bulkResponseListener = modifier.wrapActionListenerIfNeeded(1L, new ActionListener() { @Override public void onResponse(BulkResponse bulkItemResponses) { responses.addAll(Arrays.asList(bulkItemResponses.getItems())); diff --git a/server/src/test/java/org/elasticsearch/action/ingest/SimulateExecutionServiceTests.java b/server/src/test/java/org/elasticsearch/action/ingest/SimulateExecutionServiceTests.java index 2925eeb0235..5326bcb5f12 100644 --- a/server/src/test/java/org/elasticsearch/action/ingest/SimulateExecutionServiceTests.java +++ b/server/src/test/java/org/elasticsearch/action/ingest/SimulateExecutionServiceTests.java @@ -74,7 +74,7 @@ public class SimulateExecutionServiceTests extends ESTestCase { latch.countDown(); }); latch.await(); - SimulateDocumentResult actualItemResponse = holder.getAcquire(); + SimulateDocumentResult actualItemResponse = holder.get(); assertThat(processor.getInvokedCounter(), equalTo(2)); assertThat(actualItemResponse, instanceOf(SimulateDocumentVerboseResult.class)); SimulateDocumentVerboseResult simulateDocumentVerboseResult = (SimulateDocumentVerboseResult) actualItemResponse; @@ -106,7 +106,7 @@ public class SimulateExecutionServiceTests extends ESTestCase { latch.countDown(); }); latch.await(); - SimulateDocumentResult actualItemResponse = holder.getAcquire(); + SimulateDocumentResult actualItemResponse = holder.get(); assertThat(processor.getInvokedCounter(), equalTo(2)); assertThat(actualItemResponse, instanceOf(SimulateDocumentBaseResult.class)); SimulateDocumentBaseResult simulateDocumentBaseResult = (SimulateDocumentBaseResult) actualItemResponse; diff --git a/server/src/test/java/org/elasticsearch/ingest/IngestServiceTests.java b/server/src/test/java/org/elasticsearch/ingest/IngestServiceTests.java index 9bd2c4f6f33..dac2131b0e1 100644 --- a/server/src/test/java/org/elasticsearch/ingest/IngestServiceTests.java +++ b/server/src/test/java/org/elasticsearch/ingest/IngestServiceTests.java @@ -582,7 +582,7 @@ public class IngestServiceTests extends ESTestCase { ingestService.executeBulkRequest(bulkRequest.numberOfActions(), bulkRequest.requests(), failureHandler, completionHandler, indexReq -> {}); verify(failureHandler, times(1)).accept( - argThat(new CustomTypeSafeMatcher<>("failure handler was not called with the expected arguments") { + argThat(new CustomTypeSafeMatcher("failure handler was not called with the expected arguments") { @Override protected boolean matchesSafely(Integer item) { return item == 1;