Update README.md
This commit is contained in:
@ -81,7 +81,7 @@ public class App {
|
||||
* @throws InterruptedException if main thread is interrupted.
|
||||
* @throws ExecutionException if an execution error occurs.
|
||||
*/
|
||||
public static void main(String[] args) throws InterruptedException, ExecutionException {
|
||||
public static void main(String[] args) throws InterruptedException {
|
||||
var app = new App();
|
||||
try {
|
||||
app.promiseUsage();
|
||||
|
@ -141,7 +141,7 @@ public class Promise<T> extends PromiseSupport<T> {
|
||||
*/
|
||||
public <V> Promise<V> thenApply(Function<? super T, V> func) {
|
||||
Promise<V> dest = new Promise<>();
|
||||
fulfillmentAction = new TransformAction<V>(this, dest, func);
|
||||
fulfillmentAction = new TransformAction<>(this, dest, func);
|
||||
return dest;
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,6 @@ package com.iluwatar.promise;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.Future;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.TimeoutException;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@ -114,4 +113,4 @@ class PromiseSupport<T> implements Future<T> {
|
||||
}
|
||||
throw new ExecutionException(exception);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user