Clean up after deprecation of AsyncResult

See gh-33809
This commit is contained in:
Sam Brannen
2024-12-15 15:53:33 +01:00
parent 8a8df90a46
commit bf80485cc3
2 changed files with 24 additions and 36 deletions

View File

@@ -27,11 +27,6 @@ import org.springframework.lang.Nullable;
* A pass-through {@code Future} handle that can be used for method signatures
* which are declared with a {@code Future} return type for asynchronous execution.
*
* <p>As of Spring 4.1, this class implements {@code ListenableFuture}, not just
* plain {@link java.util.concurrent.Future}, along with the corresponding support
* in {@code @Async} processing. As of 7.0, this will be turned back to a plain
* {@code Future} in order to focus on compatibility with existing common usage.
*
* @author Juergen Hoeller
* @author Rossen Stoyanchev
* @since 3.0
@@ -123,20 +118,4 @@ public class AsyncResult<V> implements Future<V> {
return new AsyncResult<>(null, ex);
}
/**
* Determine the exposed exception: either the cause of a given
* {@link ExecutionException}, or the original exception as-is.
* @param original the original as given to {@link #forExecutionException}
* @return the exposed exception
*/
private static Throwable exposedException(Throwable original) {
if (original instanceof ExecutionException) {
Throwable cause = original.getCause();
if (cause != null) {
return cause;
}
}
return original;
}
}