8250240: Address use of default constructors in the java.util.concurrent

Reviewed-by: martin, lancea
This commit is contained in:
Joe Darcy 2020-07-23 22:50:12 -07:00
parent 1f91e0ebe3
commit 0ef80293f9
5 changed files with 25 additions and 0 deletions

View File

@ -76,6 +76,11 @@ import java.util.List;
*/ */
public abstract class AbstractExecutorService implements ExecutorService { public abstract class AbstractExecutorService implements ExecutorService {
/**
* Constructor for subclasses to call.
*/
public AbstractExecutorService() {}
/** /**
* Returns a {@code RunnableFuture} for the given runnable and default * Returns a {@code RunnableFuture} for the given runnable and default
* value. * value.

View File

@ -242,6 +242,11 @@ public abstract class ForkJoinTask<V> implements Future<V>, Serializable {
private static final int SIGNAL = 1 << 16; // true if joiner waiting private static final int SIGNAL = 1 << 16; // true if joiner waiting
private static final int SMASK = 0xffff; // short bits for tags private static final int SMASK = 0xffff; // short bits for tags
/**
* Constructor for subclasses to call.
*/
public ForkJoinTask() {}
static boolean isExceptionalStatus(int s) { // needed by subclasses static boolean isExceptionalStatus(int s) { // needed by subclasses
return (s & THROWN) != 0; return (s & THROWN) != 0;
} }

View File

@ -165,6 +165,11 @@ package java.util.concurrent;
public abstract class RecursiveAction extends ForkJoinTask<Void> { public abstract class RecursiveAction extends ForkJoinTask<Void> {
private static final long serialVersionUID = 5232453952276485070L; private static final long serialVersionUID = 5232453952276485070L;
/**
* Constructor for subclasses to call.
*/
public RecursiveAction() {}
/** /**
* The main computation performed by this task. * The main computation performed by this task.
*/ */

View File

@ -68,6 +68,11 @@ package java.util.concurrent;
public abstract class RecursiveTask<V> extends ForkJoinTask<V> { public abstract class RecursiveTask<V> extends ForkJoinTask<V> {
private static final long serialVersionUID = 5232453952276485270L; private static final long serialVersionUID = 5232453952276485270L;
/**
* Constructor for subclasses to call.
*/
public RecursiveTask() {}
/** /**
* The result of the computation. * The result of the computation.
*/ */

View File

@ -65,6 +65,11 @@ public abstract class AbstractQueuedLongSynchronizer
private static final long serialVersionUID = 7373984972572414692L; private static final long serialVersionUID = 7373984972572414692L;
/**
* Constructor for subclasses to call.
*/
public AbstractQueuedLongSynchronizer() {}
/* /*
* To keep sources in sync, the remainder of this source file is * To keep sources in sync, the remainder of this source file is
* exactly cloned from AbstractQueuedSynchronizer, replacing class * exactly cloned from AbstractQueuedSynchronizer, replacing class