From 2ab81eee2d57cafa215832bafcdeed104001dc75 Mon Sep 17 00:00:00 2001 From: Yannick Welsch Date: Tue, 20 Oct 2015 18:05:13 +0200 Subject: [PATCH] Remove unused method ActionFuture.getRootFailure() Closes #14214 --- .../elasticsearch/action/ActionFuture.java | 26 ------------------- .../action/support/AdapterActionFuture.java | 7 ----- 2 files changed, 33 deletions(-) diff --git a/core/src/main/java/org/elasticsearch/action/ActionFuture.java b/core/src/main/java/org/elasticsearch/action/ActionFuture.java index 26a9260b710..2d5f6781d71 100644 --- a/core/src/main/java/org/elasticsearch/action/ActionFuture.java +++ b/core/src/main/java/org/elasticsearch/action/ActionFuture.java @@ -37,10 +37,6 @@ public interface ActionFuture extends Future { * Similar to {@link #get()}, just catching the {@link InterruptedException} and throwing * an {@link IllegalStateException} instead. Also catches * {@link java.util.concurrent.ExecutionException} and throws the actual cause instead. - *

- * Note, the actual cause is unwrapped to the actual failure (for example, unwrapped - * from {@link org.elasticsearch.transport.RemoteTransportException}. The root failure is - * still accessible using {@link #getRootFailure()}. */ T actionGet(); @@ -48,10 +44,6 @@ public interface ActionFuture extends Future { * Similar to {@link #get(long, java.util.concurrent.TimeUnit)}, just catching the {@link InterruptedException} and throwing * an {@link IllegalStateException} instead. Also catches * {@link java.util.concurrent.ExecutionException} and throws the actual cause instead. - *

- * Note, the actual cause is unwrapped to the actual failure (for example, unwrapped - * from {@link org.elasticsearch.transport.RemoteTransportException}. The root failure is - * still accessible using {@link #getRootFailure()}. */ T actionGet(String timeout); @@ -59,10 +51,6 @@ public interface ActionFuture extends Future { * Similar to {@link #get(long, java.util.concurrent.TimeUnit)}, just catching the {@link InterruptedException} and throwing * an {@link IllegalStateException} instead. Also catches * {@link java.util.concurrent.ExecutionException} and throws the actual cause instead. - *

- * Note, the actual cause is unwrapped to the actual failure (for example, unwrapped - * from {@link org.elasticsearch.transport.RemoteTransportException}. The root failure is - * still accessible using {@link #getRootFailure()}. * * @param timeoutMillis Timeout in millis */ @@ -72,10 +60,6 @@ public interface ActionFuture extends Future { * Similar to {@link #get(long, java.util.concurrent.TimeUnit)}, just catching the {@link InterruptedException} and throwing * an {@link IllegalStateException} instead. Also catches * {@link java.util.concurrent.ExecutionException} and throws the actual cause instead. - *

- * Note, the actual cause is unwrapped to the actual failure (for example, unwrapped - * from {@link org.elasticsearch.transport.RemoteTransportException}. The root failure is - * still accessible using {@link #getRootFailure()}. */ T actionGet(long timeout, TimeUnit unit); @@ -83,16 +67,6 @@ public interface ActionFuture extends Future { * Similar to {@link #get(long, java.util.concurrent.TimeUnit)}, just catching the {@link InterruptedException} and throwing * an {@link IllegalStateException} instead. Also catches * {@link java.util.concurrent.ExecutionException} and throws the actual cause instead. - *

- * Note, the actual cause is unwrapped to the actual failure (for example, unwrapped - * from {@link org.elasticsearch.transport.RemoteTransportException}. The root failure is - * still accessible using {@link #getRootFailure()}. */ T actionGet(TimeValue timeout); - - /** - * The root (possibly) wrapped failure. - */ - @Nullable - Throwable getRootFailure(); } diff --git a/core/src/main/java/org/elasticsearch/action/support/AdapterActionFuture.java b/core/src/main/java/org/elasticsearch/action/support/AdapterActionFuture.java index 1a14f344d5a..ec2db7a22b2 100644 --- a/core/src/main/java/org/elasticsearch/action/support/AdapterActionFuture.java +++ b/core/src/main/java/org/elasticsearch/action/support/AdapterActionFuture.java @@ -36,8 +36,6 @@ import java.util.concurrent.TimeoutException; */ public abstract class AdapterActionFuture extends BaseFuture implements ActionFuture, ActionListener { - private Throwable rootFailure; - @Override public T actionGet() { try { @@ -105,9 +103,4 @@ public abstract class AdapterActionFuture extends BaseFuture implements } protected abstract T convert(L listenerResponse); - - @Override - public Throwable getRootFailure() { - return rootFailure; - } }