clarifiy APP_CONFIG deprecation note
[idea/community.git] / platform / core-api / src / com / intellij / openapi / util / AsyncResult.java
index 187171a079b902b98c4e039ece68e79dc8c6de74..253910e5adf953cea78d729cf0235f3156f115c2 100644 (file)
@@ -62,18 +62,6 @@ public class AsyncResult<T> extends ActionCallback {
     return subResult;
   }
 
-  /**
-   * @deprecated Don't use AsyncResult - use Promise instead.
-   */
-  @SuppressWarnings("unused")
-  @NotNull
-  @Deprecated
-  public ActionCallback subCallback(@NotNull Consumer<T> doneHandler) {
-    ActionCallback subCallback = new ActionCallback();
-    doWhenDone(new SubCallbackDoneCallback<T>(subCallback, doneHandler)).notifyWhenRejected(subCallback);
-    return subCallback;
-  }
-
   /**
    * @deprecated Use {@link #doWhenDone(com.intellij.util.Consumer)} (to remove in IDEA 16)
    */
@@ -226,27 +214,4 @@ public class AsyncResult<T> extends ActionCallback {
       subResult.setDone(v);
     }
   }
-
-  private static class SubCallbackDoneCallback<Result> implements Consumer<Result> {
-    private final ActionCallback subResult;
-    private final Consumer<Result> doneHandler;
-
-    public SubCallbackDoneCallback(ActionCallback subResult, Consumer<Result> doneHandler) {
-      this.subResult = subResult;
-      this.doneHandler = doneHandler;
-    }
-
-    @Override
-    public void consume(Result result) {
-      try {
-        doneHandler.consume(result);
-      }
-      catch (Throwable e) {
-        subResult.reject(e.getMessage());
-        LOG.error(e);
-        return;
-      }
-      subResult.setDone();
-    }
-  }
 }