diff --git a/build.gradle b/build.gradle index bc24754..cef3a3a 100644 --- a/build.gradle +++ b/build.gradle @@ -1,10 +1,7 @@ plugins { - id "checkstyle" - id "pmd" id 'maven-publish' id 'signing' id "io.github.gradle-nexus.publish-plugin" version "1.3.0" - id "com.github.spotbugs" version "5.0.14" id "org.cyclonedx.bom" version "1.7.2" id "org.xbib.gradle.plugin.asciidoctor" version "2.5.2.2" } @@ -31,14 +28,8 @@ ext { apply plugin: 'java-library' -apply from: rootProject.file('gradle/init/banner.gradle') -apply from: rootProject.file('gradle/ide/idea.gradle') apply from: rootProject.file('gradle/repositories/maven.gradle') apply from: rootProject.file('gradle/compile/java.gradle') apply from: rootProject.file('gradle/test/junit5.gradle') -apply from: rootProject.file('gradle/quality/cyclonedx.gradle') -apply from: rootProject.file('gradle/quality/spotbugs.gradle') -apply from: rootProject.file('gradle/quality/checkstyle.gradle') -apply from: rootProject.file('gradle/quality/pmd.gradle') apply from: rootProject.file('gradle/publish/sonatype.gradle') apply from: rootProject.file('gradle/publish/forgejo.gradle') diff --git a/gradle.properties b/gradle.properties index 284aa2a..e2f4d98 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,3 @@ group = org.xbib name = guava -version = 30.1 - -org.gradle.warning.mode = ALL +version = 30.2 diff --git a/gradle/compile/java.gradle b/gradle/compile/java.gradle index 09a2962..d65537c 100644 --- a/gradle/compile/java.gradle +++ b/gradle/compile/java.gradle @@ -2,19 +2,12 @@ apply plugin: 'java-library' java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } modularity.inferModulePath.set(true) - withJavadocJar() withSourcesJar() -} - -compileJava { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 -} - -compileTestJava { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 + withJavadocJar() } jar { @@ -24,7 +17,10 @@ jar { } tasks.withType(JavaCompile) { - options.compilerArgs.add('-Xlint:all') + options.fork = true + options.forkOptions.jvmArgs += ['-Duser.language=en','-Duser.country=US'] + options.compilerArgs.add('-Xlint:-requires-transitive-automatic') + options.compilerArgs.add('-Xlint:deprecation') options.encoding = 'UTF-8' } diff --git a/gradle/test/junit5.gradle b/gradle/test/junit5.gradle index 6345948..46df5d8 100644 --- a/gradle/test/junit5.gradle +++ b/gradle/test/junit5.gradle @@ -1,7 +1,7 @@ dependencies { - testImplementation libs.junit.jupiter.api - testImplementation libs.hamcrest - testRuntimeOnly libs.junit.jupiter.engine + testImplementation testLibs.junit.jupiter.api + testImplementation testLibs.hamcrest + testRuntimeOnly testLibs.junit.jupiter.engine } test { diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index c1962a7..e644113 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 8707e8b..e7646de 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index aeb74cb..1aa94a4 100755 --- a/gradlew +++ b/gradlew @@ -83,7 +83,8 @@ done # This is normally unused # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -130,10 +131,13 @@ location of your Java installation." fi else JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." + fi fi # Increase the maximum file descriptors if we can. @@ -141,7 +145,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac @@ -149,7 +153,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then '' | soft) :;; #( *) # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -198,11 +202,11 @@ fi # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ diff --git a/gradlew.bat b/gradlew.bat index 6689b85..7101f8e 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -43,11 +43,11 @@ set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail diff --git a/settings.gradle b/settings.gradle index 1f4408e..9ac89a5 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,8 +1,10 @@ dependencyResolutionManagement { versionCatalogs { libs { - version('gradle', '8.1.1') - version('junit', '5.9.3') + version('gradle', '8.7') + } + testLibs { + version('junit', '5.10.2') library('junit-jupiter-api', 'org.junit.jupiter', 'junit-jupiter-api').versionRef('junit') library('junit-jupiter-engine', 'org.junit.jupiter', 'junit-jupiter-engine').versionRef('junit') library('junit4', 'junit', 'junit').version('4.13.2') diff --git a/src/main/java/com/google/common/graph/AbstractBaseGraph.java b/src/main/java/com/google/common/graph/AbstractBaseGraph.java index 9f725c4..d0a64f5 100644 --- a/src/main/java/com/google/common/graph/AbstractBaseGraph.java +++ b/src/main/java/com/google/common/graph/AbstractBaseGraph.java @@ -44,7 +44,7 @@ import java.util.Set; abstract class AbstractBaseGraph implements BaseGraph { /** - * Returns the number of edges in this graph; used to calculate the size of {@link #edges()}. This + * Returns the number of edges in this graph; used to calculate the size of {@code #edges()}. This * implementation requires O(|N|) time. Classes extending this one may manually keep track of the * number of edges as the graph is updated, and override this method for better performance. */ @@ -59,7 +59,7 @@ abstract class AbstractBaseGraph implements BaseGraph { } /** - * An implementation of {@link BaseGraph#edges()} defined in terms of {@link #nodes()} and {@link + * An implementation of {@link BaseGraph#edges()} defined in terms of {@code #nodes()} and {@link * #successors(Object)}. */ @Override diff --git a/src/main/java/com/google/common/util/concurrent/AbstractFuture.java b/src/main/java/com/google/common/util/concurrent/AbstractFuture.java index 4bf4789..e1f509f 100644 --- a/src/main/java/com/google/common/util/concurrent/AbstractFuture.java +++ b/src/main/java/com/google/common/util/concurrent/AbstractFuture.java @@ -370,8 +370,6 @@ public abstract class AbstractFuture extends InternalFutureFailureAccess * *

The default {@link AbstractFuture} implementation throws {@code InterruptedException} if the * current thread is interrupted during the call, even if the value is already available. - * - * @throws CancellationException {@inheritDoc} */ @Override public V get(long timeout, TimeUnit unit) @@ -480,8 +478,6 @@ public abstract class AbstractFuture extends InternalFutureFailureAccess * *

The default {@link AbstractFuture} implementation throws {@code InterruptedException} if the * current thread is interrupted during the call, even if the value is already available. - * - * @throws CancellationException {@inheritDoc} */ @Override public V get() throws InterruptedException, ExecutionException { diff --git a/src/main/java/com/google/common/util/concurrent/ClosingFuture.java b/src/main/java/com/google/common/util/concurrent/ClosingFuture.java index 4eabfe2..0ed1192 100644 --- a/src/main/java/com/google/common/util/concurrent/ClosingFuture.java +++ b/src/main/java/com/google/common/util/concurrent/ClosingFuture.java @@ -244,9 +244,6 @@ public final class ClosingFuture { /** * Computes a result, or throws an exception if unable to do so. * - *

Any objects that are passed to {@link DeferredCloser#eventuallyClose(Closeable, Executor) - * closer.eventuallyClose()} will be closed when the {@link ClosingFuture} pipeline is done (but - * not before this method completes), even if this method throws or the pipeline is cancelled. */ V call(DeferredCloser closer) throws Exception; } @@ -261,10 +258,6 @@ public final class ClosingFuture { public interface AsyncClosingCallable { /** * Computes a result, or throws an exception if unable to do so. - * - *

Any objects that are passed to {@link DeferredCloser#eventuallyClose(Closeable, Executor) - * closer.eventuallyClose()} will be closed when the {@link ClosingFuture} pipeline is done (but - * not before this method completes), even if this method throws or the pipeline is cancelled. */ ClosingFuture call(DeferredCloser closer) throws Exception; } @@ -280,10 +273,6 @@ public final class ClosingFuture { /** * Applies this function to an input, or throws an exception if unable to do so. - * - *

Any objects that are passed to {@link DeferredCloser#eventuallyClose(Closeable, Executor) - * closer.eventuallyClose()} will be closed when the {@link ClosingFuture} pipeline is done (but - * not before this method completes), even if this method throws or the pipeline is cancelled. */ U apply(DeferredCloser closer, T input) throws Exception; } @@ -298,10 +287,6 @@ public final class ClosingFuture { public interface AsyncClosingFunction { /** * Applies this function to an input, or throws an exception if unable to do so. - * - *

Any objects that are passed to {@link DeferredCloser#eventuallyClose(Closeable, Executor) - * closer.eventuallyClose()} will be closed when the {@link ClosingFuture} pipeline is done (but - * not before this method completes), even if this method throws or the pipeline is cancelled. */ ClosingFuture apply(DeferredCloser closer, T input) throws Exception; } @@ -340,8 +325,7 @@ public final class ClosingFuture { /** * Starts closing all closeable objects captured during the {@link ClosingFuture}'s asynchronous - * operation on the {@link Executor}s specified by calls to {@link - * DeferredCloser#eventuallyClose(Closeable, Executor)}. + * operation on the {@link Executor}s. * *

If any such calls specified {@link MoreExecutors#directExecutor()}, those objects will be * closed synchronously. @@ -410,8 +394,7 @@ public final class ClosingFuture { * value in order to close it. * * @param future the future to create the {@code ClosingFuture} from. For discussion of the - * future's result type {@code C}, see {@link DeferredCloser#eventuallyClose(Closeable, - * Executor)}. + * future's result type {@code C}. * @param closingExecutor the future's result will be closed on this executor * @deprecated Creating {@link Future}s of closeable types is dangerous in general because the * underlying value may never be closed if the {@link Future} is canceled after its operation @@ -704,8 +687,6 @@ public final class ClosingFuture { *

  • Use this method only when calling an API that returns a {@link ListenableFuture} or a * {@code ClosingFuture}. If possible, prefer calling {@link #transform(ClosingFunction, * Executor)} instead, with a function that returns the next value directly. - *
  • Call {@link DeferredCloser#eventuallyClose(Closeable, Executor) closer.eventuallyClose()} - * for every closeable object this step creates in order to capture it for later closing. *
  • Return a {@code ClosingFuture}. To turn a {@link ListenableFuture} into a {@code * ClosingFuture} call {@link #from(ListenableFuture)}. *
  • In case this step doesn't create new closeables, you can adapt an API that returns a @@ -784,8 +765,6 @@ public final class ClosingFuture { * meets these conditions: * *
      - *
    • It does not need to capture any {@link Closeable} objects by calling {@link - * DeferredCloser#eventuallyClose(Closeable, Executor)}. *
    • It returns a {@link ListenableFuture}. *
    * @@ -902,8 +881,6 @@ public final class ClosingFuture { * {@code ClosingFuture}. If possible, prefer calling {@link #catching(Class, * ClosingFunction, Executor)} instead, with a function that returns the next value * directly. - *
  • Call {@link DeferredCloser#eventuallyClose(Closeable, Executor) closer.eventuallyClose()} - * for every closeable object this step creates in order to capture it for later closing. *
  • Return a {@code ClosingFuture}. To turn a {@link ListenableFuture} into a {@code * ClosingFuture} call {@link #from(ListenableFuture)}. *
  • In case this step doesn't create new closeables, you can adapt an API that returns a @@ -1213,11 +1190,6 @@ public final class ClosingFuture { /** * Computes a result, or throws an exception if unable to do so. * - *

    Any objects that are passed to {@link DeferredCloser#eventuallyClose(Closeable, - * Executor) closer.eventuallyClose()} will be closed when the {@link ClosingFuture} pipeline - * is done (but not before this method completes), even if this method throws or the pipeline - * is cancelled. - * * @param peeker used to get the value of any of the input futures */ V call(DeferredCloser closer, Peeker peeker) throws Exception; @@ -1233,11 +1205,6 @@ public final class ClosingFuture { /** * Computes a {@link ClosingFuture} result, or throws an exception if unable to do so. * - *

    Any objects that are passed to {@link DeferredCloser#eventuallyClose(Closeable, - * Executor) closer.eventuallyClose()} will be closed when the {@link ClosingFuture} pipeline - * is done (but not before this method completes), even if this method throws or the pipeline - * is cancelled. - * * @param peeker used to get the value of any of the input futures */ ClosingFuture call(DeferredCloser closer, Peeker peeker) throws Exception; @@ -1314,9 +1281,6 @@ public final class ClosingFuture { *

  • Use this method only when calling an API that returns a {@link ListenableFuture} or a * {@code ClosingFuture}. If possible, prefer calling {@link #call(CombiningCallable, * Executor)} instead, with a function that returns the next value directly. - *
  • Call {@link DeferredCloser#eventuallyClose(Closeable, Executor) - * closer.eventuallyClose()} for every closeable object this step creates in order to - * capture it for later closing. *
  • Return a {@code ClosingFuture}. To turn a {@link ListenableFuture} into a {@code * ClosingFuture} call {@link #from(ListenableFuture)}. * @@ -1388,11 +1352,6 @@ public final class ClosingFuture { /** * Applies this function to two inputs, or throws an exception if unable to do so. - * - *

    Any objects that are passed to {@link DeferredCloser#eventuallyClose(Closeable, - * Executor) closer.eventuallyClose()} will be closed when the {@link ClosingFuture} pipeline - * is done (but not before this method completes), even if this method throws or the pipeline - * is cancelled. */ U apply(DeferredCloser closer, V1 value1, V2 value2) throws Exception; } @@ -1411,11 +1370,6 @@ public final class ClosingFuture { /** * Applies this function to two inputs, or throws an exception if unable to do so. - * - *

    Any objects that are passed to {@link DeferredCloser#eventuallyClose(Closeable, - * Executor) closer.eventuallyClose()} will be closed when the {@link ClosingFuture} pipeline - * is done (but not before this method completes), even if this method throws or the pipeline - * is cancelled. */ ClosingFuture apply(DeferredCloser closer, V1 value1, V2 value2) throws Exception; } @@ -1485,9 +1439,6 @@ public final class ClosingFuture { *

  • Use this method only when calling an API that returns a {@link ListenableFuture} or a * {@code ClosingFuture}. If possible, prefer calling {@link #call(CombiningCallable, * Executor)} instead, with a function that returns the next value directly. - *
  • Call {@link DeferredCloser#eventuallyClose(Closeable, Executor) - * closer.eventuallyClose()} for every closeable object this step creates in order to - * capture it for later closing. *
  • Return a {@code ClosingFuture}. To turn a {@link ListenableFuture} into a {@code * ClosingFuture} call {@link #from(ListenableFuture)}. * @@ -1542,11 +1493,6 @@ public final class ClosingFuture { U extends Object> { /** * Applies this function to three inputs, or throws an exception if unable to do so. - * - *

    Any objects that are passed to {@link DeferredCloser#eventuallyClose(Closeable, - * Executor) closer.eventuallyClose()} will be closed when the {@link ClosingFuture} pipeline - * is done (but not before this method completes), even if this method throws or the pipeline - * is cancelled. */ U apply(DeferredCloser closer, V1 value1, V2 value2, V3 v3) throws Exception; } @@ -1569,10 +1515,6 @@ public final class ClosingFuture { /** * Applies this function to three inputs, or throws an exception if unable to do so. * - *

    Any objects that are passed to {@link DeferredCloser#eventuallyClose(Closeable, - * Executor) closer.eventuallyClose()} will be closed when the {@link ClosingFuture} pipeline - * is done (but not before this method completes), even if this method throws or the pipeline - * is cancelled. */ ClosingFuture apply(DeferredCloser closer, V1 value1, V2 value2, V3 value3) throws Exception; @@ -1650,9 +1592,6 @@ public final class ClosingFuture { *

  • Use this method only when calling an API that returns a {@link ListenableFuture} or a * {@code ClosingFuture}. If possible, prefer calling {@link #call(CombiningCallable, * Executor)} instead, with a function that returns the next value directly. - *
  • Call {@link DeferredCloser#eventuallyClose(Closeable, Executor) - * closer.eventuallyClose()} for every closeable object this step creates in order to - * capture it for later closing. *
  • Return a {@code ClosingFuture}. To turn a {@link ListenableFuture} into a {@code * ClosingFuture} call {@link #from(ListenableFuture)}. * @@ -1717,11 +1656,6 @@ public final class ClosingFuture { U extends Object> { /** * Applies this function to four inputs, or throws an exception if unable to do so. - * - *

    Any objects that are passed to {@link DeferredCloser#eventuallyClose(Closeable, - * Executor) closer.eventuallyClose()} will be closed when the {@link ClosingFuture} pipeline - * is done (but not before this method completes), even if this method throws or the pipeline - * is cancelled. */ U apply(DeferredCloser closer, V1 value1, V2 value2, V3 value3, V4 value4) throws Exception; } @@ -1746,11 +1680,6 @@ public final class ClosingFuture { U extends Object> { /** * Applies this function to four inputs, or throws an exception if unable to do so. - * - *

    Any objects that are passed to {@link DeferredCloser#eventuallyClose(Closeable, - * Executor) closer.eventuallyClose()} will be closed when the {@link ClosingFuture} pipeline - * is done (but not before this method completes), even if this method throws or the pipeline - * is cancelled. */ ClosingFuture apply(DeferredCloser closer, V1 value1, V2 value2, V3 value3, V4 value4) throws Exception; @@ -1834,9 +1763,6 @@ public final class ClosingFuture { *

  • Use this method only when calling an API that returns a {@link ListenableFuture} or a * {@code ClosingFuture}. If possible, prefer calling {@link #call(CombiningCallable, * Executor)} instead, with a function that returns the next value directly. - *
  • Call {@link DeferredCloser#eventuallyClose(Closeable, Executor) - * closer.eventuallyClose()} for every closeable object this step creates in order to - * capture it for later closing. *
  • Return a {@code ClosingFuture}. To turn a {@link ListenableFuture} into a {@code * ClosingFuture} call {@link #from(ListenableFuture)}. * @@ -1907,11 +1833,6 @@ public final class ClosingFuture { U extends Object> { /** * Applies this function to five inputs, or throws an exception if unable to do so. - * - *

    Any objects that are passed to {@link DeferredCloser#eventuallyClose(Closeable, - * Executor) closer.eventuallyClose()} will be closed when the {@link ClosingFuture} pipeline - * is done (but not before this method completes), even if this method throws or the pipeline - * is cancelled. */ U apply(DeferredCloser closer, V1 value1, V2 value2, V3 value3, V4 value4, V5 value5) throws Exception; @@ -1939,11 +1860,6 @@ public final class ClosingFuture { U extends Object> { /** * Applies this function to five inputs, or throws an exception if unable to do so. - * - *

    Any objects that are passed to {@link DeferredCloser#eventuallyClose(Closeable, - * Executor) closer.eventuallyClose()} will be closed when the {@link ClosingFuture} pipeline - * is done (but not before this method completes), even if this method throws or the pipeline - * is cancelled. */ ClosingFuture apply( DeferredCloser closer, V1 value1, V2 value2, V3 value3, V4 value4, V5 value5) @@ -2034,9 +1950,6 @@ public final class ClosingFuture { *

  • Use this method only when calling an API that returns a {@link ListenableFuture} or a * {@code ClosingFuture}. If possible, prefer calling {@link #call(CombiningCallable, * Executor)} instead, with a function that returns the next value directly. - *
  • Call {@link DeferredCloser#eventuallyClose(Closeable, Executor) - * closer.eventuallyClose()} for every closeable object this step creates in order to - * capture it for later closing. *
  • Return a {@code ClosingFuture}. To turn a {@link ListenableFuture} into a {@code * ClosingFuture} call {@link #from(ListenableFuture)}. * diff --git a/src/main/java/com/google/common/util/concurrent/ListeningExecutorService.java b/src/main/java/com/google/common/util/concurrent/ListeningExecutorService.java index e684d71..e359c26 100644 --- a/src/main/java/com/google/common/util/concurrent/ListeningExecutorService.java +++ b/src/main/java/com/google/common/util/concurrent/ListeningExecutorService.java @@ -35,21 +35,18 @@ import java.util.concurrent.TimeUnit; public interface ListeningExecutorService extends ExecutorService { /** * @return a {@code ListenableFuture} representing pending completion of the task - * @throws RejectedExecutionException {@inheritDoc} */ @Override ListenableFuture submit(Callable task); /** * @return a {@code ListenableFuture} representing pending completion of the task - * @throws RejectedExecutionException {@inheritDoc} */ @Override ListenableFuture submit(Runnable task); /** * @return a {@code ListenableFuture} representing pending completion of the task - * @throws RejectedExecutionException {@inheritDoc} */ @Override ListenableFuture submit(Runnable task, T result); @@ -69,8 +66,6 @@ public interface ListeningExecutorService extends ExecutorService { * @return A list of {@code ListenableFuture} instances representing the tasks, in the same * sequential order as produced by the iterator for the given task list, each of which has * completed. - * @throws RejectedExecutionException {@inheritDoc} - * @throws NullPointerException if any task is null */ @Override List> invokeAll(Collection> tasks) @@ -92,8 +87,6 @@ public interface ListeningExecutorService extends ExecutorService { * sequential order as produced by the iterator for the given task list. If the operation did * not time out, each task will have completed. If it did time out, some of these tasks will * not have completed. - * @throws RejectedExecutionException {@inheritDoc} - * @throws NullPointerException if any task is null */ @Override List> invokeAll(