Skip to content

Commit

Permalink
8274391: Suppress more warnings on non-serializable non-transient ins…
Browse files Browse the repository at this point in the history
…tance fields in java.util.concurrent

Reviewed-by: lancea, bpb, alanb, iris
  • Loading branch information
jddarcy committed Sep 28, 2021
1 parent 6a477bd commit 2072bc7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2778,6 +2778,7 @@ static final class InvokeAnyRoot<E> extends ForkJoinTask<E> {
@SuppressWarnings("serial") // Conditionally serializable
volatile E result;
final AtomicInteger count; // in case all throw
@SuppressWarnings("serial")
final ForkJoinPool pool; // to check shutdown while collecting
InvokeAnyRoot(int n, ForkJoinPool p) {
pool = p;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1444,8 +1444,8 @@ static final class AdaptedInterruptibleCallable<T> extends ForkJoinTask<T>
implements RunnableFuture<T> {
@SuppressWarnings("serial") // Conditionally serializable
final Callable<? extends T> callable;
@SuppressWarnings("serial") // Conditionally serializable
transient volatile Thread runner;
@SuppressWarnings("serial") // Conditionally serializable
T result;
AdaptedInterruptibleCallable(Callable<? extends T> callable) {
if (callable == null) throw new NullPointerException();
Expand Down

1 comment on commit 2072bc7

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.