Update README.md

This commit is contained in:
Ilkka Seppälä
2020-09-01 19:55:22 +03:00
parent 2a5b8c977a
commit b9b6777d15
5 changed files with 29 additions and 24 deletions

View File

@ -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();

View File

@ -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;
}

View File

@ -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);
}
}
}