mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8330954: since-checker - Fix remaining @ since tags in java.base
Reviewed-by: liach, naoto
This commit is contained in:
parent
3050ba0176
commit
f4fa35e28b
12 changed files with 69 additions and 4 deletions
|
@ -2178,6 +2178,9 @@ public class CompletableFuture<T> implements Future<T>, CompletionStage<T> {
|
|||
return ((r = result) == null) ? valueIfAbsent : (T) reportJoin(r, "getNow");
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 19
|
||||
*/
|
||||
@Override
|
||||
public T resultNow() {
|
||||
Object r = result;
|
||||
|
@ -2193,6 +2196,9 @@ public class CompletableFuture<T> implements Future<T>, CompletionStage<T> {
|
|||
throw new IllegalStateException();
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 19
|
||||
*/
|
||||
@Override
|
||||
public Throwable exceptionNow() {
|
||||
Object r = result;
|
||||
|
@ -2440,26 +2446,41 @@ public class CompletableFuture<T> implements Future<T>, CompletionStage<T> {
|
|||
return uniExceptionallyStage(null, fn);
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 12
|
||||
*/
|
||||
public CompletableFuture<T> exceptionallyAsync(
|
||||
Function<Throwable, ? extends T> fn) {
|
||||
return uniExceptionallyStage(defaultExecutor(), fn);
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 12
|
||||
*/
|
||||
public CompletableFuture<T> exceptionallyAsync(
|
||||
Function<Throwable, ? extends T> fn, Executor executor) {
|
||||
return uniExceptionallyStage(screenExecutor(executor), fn);
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 12
|
||||
*/
|
||||
public CompletableFuture<T> exceptionallyCompose(
|
||||
Function<Throwable, ? extends CompletionStage<T>> fn) {
|
||||
return uniComposeExceptionallyStage(null, fn);
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 12
|
||||
*/
|
||||
public CompletableFuture<T> exceptionallyComposeAsync(
|
||||
Function<Throwable, ? extends CompletionStage<T>> fn) {
|
||||
return uniComposeExceptionallyStage(defaultExecutor(), fn);
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 12
|
||||
*/
|
||||
public CompletableFuture<T> exceptionallyComposeAsync(
|
||||
Function<Throwable, ? extends CompletionStage<T>> fn,
|
||||
Executor executor) {
|
||||
|
@ -2585,6 +2606,9 @@ public class CompletableFuture<T> implements Future<T>, CompletionStage<T> {
|
|||
return ((r = result) instanceof AltResult) && r != NIL;
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 19
|
||||
*/
|
||||
@Override
|
||||
public State state() {
|
||||
Object r = result;
|
||||
|
|
|
@ -327,6 +327,8 @@ public class DelayQueue<E extends Delayed> extends AbstractQueue<E>
|
|||
* @return the <em>expired head</em> of this queue
|
||||
* @throws NoSuchElementException if this queue has no elements with an
|
||||
* expired delay
|
||||
*
|
||||
* @since 21
|
||||
*/
|
||||
public E remove() {
|
||||
return super.remove();
|
||||
|
|
|
@ -887,6 +887,9 @@ public abstract class ForkJoinTask<V> implements Future<V>, Serializable {
|
|||
return (status & (DONE | ABNORMAL)) == DONE;
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 19
|
||||
*/
|
||||
@Override
|
||||
public State state() {
|
||||
int s = status;
|
||||
|
@ -896,6 +899,9 @@ public abstract class ForkJoinTask<V> implements Future<V>, Serializable {
|
|||
State.CANCELLED;
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 19
|
||||
*/
|
||||
@Override
|
||||
public V resultNow() {
|
||||
int s = status;
|
||||
|
@ -910,6 +916,9 @@ public abstract class ForkJoinTask<V> implements Future<V>, Serializable {
|
|||
return getRawResult();
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 19
|
||||
*/
|
||||
@Override
|
||||
public Throwable exceptionNow() {
|
||||
Throwable ex;
|
||||
|
|
|
@ -205,6 +205,9 @@ public class FutureTask<V> implements RunnableFuture<V> {
|
|||
return report(s);
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 19
|
||||
*/
|
||||
@Override
|
||||
public V resultNow() {
|
||||
switch (state()) { // Future.State
|
||||
|
@ -221,6 +224,9 @@ public class FutureTask<V> implements RunnableFuture<V> {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 19
|
||||
*/
|
||||
@Override
|
||||
public Throwable exceptionNow() {
|
||||
switch (state()) { // Future.State
|
||||
|
@ -236,6 +242,9 @@ public class FutureTask<V> implements RunnableFuture<V> {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 19
|
||||
*/
|
||||
@Override
|
||||
public State state() {
|
||||
int s = state;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue