update to OpenJDK 21, Gradle 8.7
This commit is contained in:
parent
c50bb3f8b4
commit
0992e12c50
13 changed files with 45 additions and 151 deletions
|
@ -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')
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
group = org.xbib
|
||||
name = guava
|
||||
version = 30.1
|
||||
|
||||
org.gradle.warning.mode = ALL
|
||||
version = 30.2
|
||||
|
|
|
@ -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'
|
||||
}
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
3
gradle/wrapper/gradle-wrapper.properties
vendored
3
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -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
|
||||
|
|
22
gradlew
vendored
22
gradlew
vendored
|
@ -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" \
|
||||
|
|
20
gradlew.bat
vendored
20
gradlew.bat
vendored
|
@ -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
|
||||
|
||||
|
|
|
@ -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')
|
||||
|
|
|
@ -44,7 +44,7 @@ import java.util.Set;
|
|||
abstract class AbstractBaseGraph<N> implements BaseGraph<N> {
|
||||
|
||||
/**
|
||||
* 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<N> implements BaseGraph<N> {
|
|||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
|
|
|
@ -370,8 +370,6 @@ public abstract class AbstractFuture<V> extends InternalFutureFailureAccess
|
|||
*
|
||||
* <p>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<V> extends InternalFutureFailureAccess
|
|||
*
|
||||
* <p>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 {
|
||||
|
|
|
@ -244,9 +244,6 @@ public final class ClosingFuture<V> {
|
|||
/**
|
||||
* Computes a result, or throws an exception if unable to do so.
|
||||
*
|
||||
* <p>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<V> {
|
|||
public interface AsyncClosingCallable<V extends Object> {
|
||||
/**
|
||||
* Computes a result, or throws an exception if unable to do so.
|
||||
*
|
||||
* <p>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<V> call(DeferredCloser closer) throws Exception;
|
||||
}
|
||||
|
@ -280,10 +273,6 @@ public final class ClosingFuture<V> {
|
|||
|
||||
/**
|
||||
* Applies this function to an input, or throws an exception if unable to do so.
|
||||
*
|
||||
* <p>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<V> {
|
|||
public interface AsyncClosingFunction<T extends Object, U extends Object> {
|
||||
/**
|
||||
* Applies this function to an input, or throws an exception if unable to do so.
|
||||
*
|
||||
* <p>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<U> apply(DeferredCloser closer, T input) throws Exception;
|
||||
}
|
||||
|
@ -340,8 +325,7 @@ public final class ClosingFuture<V> {
|
|||
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* <p>If any such calls specified {@link MoreExecutors#directExecutor()}, those objects will be
|
||||
* closed synchronously.
|
||||
|
@ -410,8 +394,7 @@ public final class ClosingFuture<V> {
|
|||
* 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<V> {
|
|||
* <li>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.
|
||||
* <li>Call {@link DeferredCloser#eventuallyClose(Closeable, Executor) closer.eventuallyClose()}
|
||||
* for every closeable object this step creates in order to capture it for later closing.
|
||||
* <li>Return a {@code ClosingFuture}. To turn a {@link ListenableFuture} into a {@code
|
||||
* ClosingFuture} call {@link #from(ListenableFuture)}.
|
||||
* <li>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<V> {
|
|||
* meets these conditions:
|
||||
*
|
||||
* <ul>
|
||||
* <li>It does not need to capture any {@link Closeable} objects by calling {@link
|
||||
* DeferredCloser#eventuallyClose(Closeable, Executor)}.
|
||||
* <li>It returns a {@link ListenableFuture}.
|
||||
* </ul>
|
||||
*
|
||||
|
@ -902,8 +881,6 @@ public final class ClosingFuture<V> {
|
|||
* {@code ClosingFuture}. If possible, prefer calling {@link #catching(Class,
|
||||
* ClosingFunction, Executor)} instead, with a function that returns the next value
|
||||
* directly.
|
||||
* <li>Call {@link DeferredCloser#eventuallyClose(Closeable, Executor) closer.eventuallyClose()}
|
||||
* for every closeable object this step creates in order to capture it for later closing.
|
||||
* <li>Return a {@code ClosingFuture}. To turn a {@link ListenableFuture} into a {@code
|
||||
* ClosingFuture} call {@link #from(ListenableFuture)}.
|
||||
* <li>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<V> {
|
|||
/**
|
||||
* Computes a result, or throws an exception if unable to do so.
|
||||
*
|
||||
* <p>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<V> {
|
|||
/**
|
||||
* Computes a {@link ClosingFuture} result, or throws an exception if unable to do so.
|
||||
*
|
||||
* <p>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<V> call(DeferredCloser closer, Peeker peeker) throws Exception;
|
||||
|
@ -1314,9 +1281,6 @@ public final class ClosingFuture<V> {
|
|||
* <li>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.
|
||||
* <li>Call {@link DeferredCloser#eventuallyClose(Closeable, Executor)
|
||||
* closer.eventuallyClose()} for every closeable object this step creates in order to
|
||||
* capture it for later closing.
|
||||
* <li>Return a {@code ClosingFuture}. To turn a {@link ListenableFuture} into a {@code
|
||||
* ClosingFuture} call {@link #from(ListenableFuture)}.
|
||||
* </ul>
|
||||
|
@ -1388,11 +1352,6 @@ public final class ClosingFuture<V> {
|
|||
|
||||
/**
|
||||
* Applies this function to two inputs, or throws an exception if unable to do so.
|
||||
*
|
||||
* <p>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<V> {
|
|||
|
||||
/**
|
||||
* Applies this function to two inputs, or throws an exception if unable to do so.
|
||||
*
|
||||
* <p>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<U> apply(DeferredCloser closer, V1 value1, V2 value2) throws Exception;
|
||||
}
|
||||
|
@ -1485,9 +1439,6 @@ public final class ClosingFuture<V> {
|
|||
* <li>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.
|
||||
* <li>Call {@link DeferredCloser#eventuallyClose(Closeable, Executor)
|
||||
* closer.eventuallyClose()} for every closeable object this step creates in order to
|
||||
* capture it for later closing.
|
||||
* <li>Return a {@code ClosingFuture}. To turn a {@link ListenableFuture} into a {@code
|
||||
* ClosingFuture} call {@link #from(ListenableFuture)}.
|
||||
* </ul>
|
||||
|
@ -1542,11 +1493,6 @@ public final class ClosingFuture<V> {
|
|||
U extends Object> {
|
||||
/**
|
||||
* Applies this function to three inputs, or throws an exception if unable to do so.
|
||||
*
|
||||
* <p>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<V> {
|
|||
/**
|
||||
* Applies this function to three inputs, or throws an exception if unable to do so.
|
||||
*
|
||||
* <p>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<U> apply(DeferredCloser closer, V1 value1, V2 value2, V3 value3)
|
||||
throws Exception;
|
||||
|
@ -1650,9 +1592,6 @@ public final class ClosingFuture<V> {
|
|||
* <li>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.
|
||||
* <li>Call {@link DeferredCloser#eventuallyClose(Closeable, Executor)
|
||||
* closer.eventuallyClose()} for every closeable object this step creates in order to
|
||||
* capture it for later closing.
|
||||
* <li>Return a {@code ClosingFuture}. To turn a {@link ListenableFuture} into a {@code
|
||||
* ClosingFuture} call {@link #from(ListenableFuture)}.
|
||||
* </ul>
|
||||
|
@ -1717,11 +1656,6 @@ public final class ClosingFuture<V> {
|
|||
U extends Object> {
|
||||
/**
|
||||
* Applies this function to four inputs, or throws an exception if unable to do so.
|
||||
*
|
||||
* <p>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<V> {
|
|||
U extends Object> {
|
||||
/**
|
||||
* Applies this function to four inputs, or throws an exception if unable to do so.
|
||||
*
|
||||
* <p>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<U> apply(DeferredCloser closer, V1 value1, V2 value2, V3 value3, V4 value4)
|
||||
throws Exception;
|
||||
|
@ -1834,9 +1763,6 @@ public final class ClosingFuture<V> {
|
|||
* <li>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.
|
||||
* <li>Call {@link DeferredCloser#eventuallyClose(Closeable, Executor)
|
||||
* closer.eventuallyClose()} for every closeable object this step creates in order to
|
||||
* capture it for later closing.
|
||||
* <li>Return a {@code ClosingFuture}. To turn a {@link ListenableFuture} into a {@code
|
||||
* ClosingFuture} call {@link #from(ListenableFuture)}.
|
||||
* </ul>
|
||||
|
@ -1907,11 +1833,6 @@ public final class ClosingFuture<V> {
|
|||
U extends Object> {
|
||||
/**
|
||||
* Applies this function to five inputs, or throws an exception if unable to do so.
|
||||
*
|
||||
* <p>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<V> {
|
|||
U extends Object> {
|
||||
/**
|
||||
* Applies this function to five inputs, or throws an exception if unable to do so.
|
||||
*
|
||||
* <p>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<U> apply(
|
||||
DeferredCloser closer, V1 value1, V2 value2, V3 value3, V4 value4, V5 value5)
|
||||
|
@ -2034,9 +1950,6 @@ public final class ClosingFuture<V> {
|
|||
* <li>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.
|
||||
* <li>Call {@link DeferredCloser#eventuallyClose(Closeable, Executor)
|
||||
* closer.eventuallyClose()} for every closeable object this step creates in order to
|
||||
* capture it for later closing.
|
||||
* <li>Return a {@code ClosingFuture}. To turn a {@link ListenableFuture} into a {@code
|
||||
* ClosingFuture} call {@link #from(ListenableFuture)}.
|
||||
* </ul>
|
||||
|
|
|
@ -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
|
||||
<T> ListenableFuture<T> submit(Callable<T> 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
|
||||
<T> ListenableFuture<T> 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
|
||||
<T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> 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
|
||||
<T> List<Future<T>> invokeAll(
|
||||
|
|
Loading…
Reference in a new issue