-
-
Notifications
You must be signed in to change notification settings - Fork 73
Make workflow-support compatible with Guava 21.0 and newer #114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 5 commits
6ba5df6
335977a
3a32092
b416720
902967c
b0ce2e0
f7a4a16
aa4aba8
2ff560a
f274d5d
c5ecc11
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -44,9 +44,9 @@ | |
| </license> | ||
| </licenses> | ||
| <scm> | ||
| <connection>scm:git:git://github.com/jenkinsci/${project.artifactId}-plugin.git</connection> | ||
| <developerConnection>scm:git:[email protected]:jenkinsci/${project.artifactId}-plugin.git</developerConnection> | ||
| <url>https://github.com/jenkinsci/${project.artifactId}-plugin</url> | ||
| <connection>scm:git:git://github.com/${gitHubRepo}.git</connection> | ||
| <developerConnection>scm:git:[email protected]:${gitHubRepo}.git</developerConnection> | ||
| <url>https://github.com/${gitHubRepo}</url> | ||
| <tag>${scmTag}</tag> | ||
| </scm> | ||
| <repositories> | ||
|
|
@@ -64,18 +64,19 @@ | |
| <properties> | ||
| <revision>3.8</revision> | ||
| <changelist>-SNAPSHOT</changelist> | ||
| <jenkins.version>2.222.4</jenkins.version> | ||
| <jenkins.version>2.273-rc30689.09147672b85b</jenkins.version> <!-- TODO https://github.com/jenkinsci/jenkins/pull/5059 --> | ||
| <java.level>8</java.level> | ||
| <no-test-jar>false</no-test-jar> | ||
| <useBeta>true</useBeta> | ||
| <hpi.compatibleSinceVersion>3.0</hpi.compatibleSinceVersion> | ||
| <gitHubRepo>jenkinsci/${project.artifactId}-plugin</gitHubRepo> | ||
| </properties> | ||
| <dependencyManagement> | ||
| <dependencies> | ||
| <dependency> | ||
| <groupId>io.jenkins.tools.bom</groupId> | ||
| <artifactId>bom-2.222.x</artifactId> | ||
| <version>21</version> | ||
| <artifactId>bom-2.277.x</artifactId> | ||
| <version>23</version> | ||
| <scope>import</scope> | ||
| <type>pom</type> | ||
| </dependency> | ||
|
|
@@ -89,6 +90,7 @@ | |
| <dependency> | ||
| <groupId>org.jenkins-ci.plugins.workflow</groupId> | ||
| <artifactId>workflow-api</artifactId> | ||
| <version>2.42-rc1048.8d974b8c4ed5</version> <!-- TODO https://github.com/jenkinsci/workflow-api-plugin/pull/135 --> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.jenkins-ci.plugins</groupId> | ||
|
|
@@ -97,6 +99,12 @@ | |
| <dependency> | ||
| <groupId>org.jenkins-ci.plugins</groupId> | ||
| <artifactId>script-security</artifactId> | ||
| <exclusions> | ||
| <exclusion> | ||
| <groupId>org.checkerframework</groupId> | ||
| <artifactId>checker-qual</artifactId> | ||
| </exclusion> | ||
| </exclusions> | ||
| </dependency> | ||
| <dependency> | ||
| <!-- Required for running with Java 9+ --> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -65,7 +65,7 @@ public abstract class Futures { | |
| * });}</pre> | ||
| * | ||
| * <p>Note: This overload of {@code addCallback} is designed for cases in | ||
| * which the callack is fast and lightweight, as the method does not accept | ||
| * which the callback is fast and lightweight, as the method does not accept | ||
| * an {@code Executor} in which to perform the the work. For heavier | ||
| * callbacks, this overload carries some caveats: First, the thread that the | ||
| * callback runs in depends on whether the input {@code Future} is done at the | ||
|
|
@@ -74,7 +74,7 @@ public abstract class Futures { | |
| * callback in the thread that calls {@code addCallback} or {@code | ||
| * Future.cancel}. Second, callbacks may run in an internal thread of the | ||
| * system responsible for the input {@code Future}, such as an RPC network | ||
| * thread. Finally, during the execution of a {@code sameThreadExecutor} | ||
| * thread. Finally, during the execution of a {@code newDirectExecutorService} | ||
| * callback, all other registered but unexecuted listeners are prevented from | ||
| * running, even if those listeners are to run in other executors. | ||
| * | ||
|
|
@@ -87,7 +87,7 @@ public abstract class Futures { | |
| */ | ||
| public static <V> void addCallback(ListenableFuture<V> future, | ||
| FutureCallback<? super V> callback) { | ||
| addCallback(future, callback, MoreExecutors.sameThreadExecutor()); | ||
| addCallback(future, callback, MoreExecutors.newDirectExecutorService()); | ||
| } | ||
|
|
||
| /** | ||
|
|
@@ -115,16 +115,16 @@ public static <V> void addCallback(ListenableFuture<V> future, | |
| * | ||
| * When the callback is fast and lightweight consider {@linkplain | ||
| * Futures#addCallback(ListenableFuture, FutureCallback) the other overload} | ||
| * or explicit use of {@link MoreExecutors#sameThreadExecutor | ||
| * sameThreadExecutor}. For heavier callbacks, this choice carries some | ||
| * or explicit use of {@link MoreExecutors#newDirectExecutorService | ||
| * newDirectExecutorService}. For heavier callbacks, this choice carries some | ||
| * caveats: First, the thread that the callback runs in depends on whether | ||
| * the input {@code Future} is done at the time {@code addCallback} is called | ||
| * and on whether the input {@code Future} is ever cancelled. In particular, | ||
| * {@code addCallback} may execute the callback in the thread that calls | ||
| * {@code addCallback} or {@code Future.cancel}. Second, callbacks may run in | ||
| * an internal thread of the system responsible for the input {@code Future}, | ||
| * such as an RPC network thread. Finally, during the execution of a {@code | ||
| * sameThreadExecutor} callback, all other registered but unexecuted | ||
| * newDirectExecutorService} callback, all other registered but unexecuted | ||
| * listeners are prevented from running, even if those listeners are to run | ||
| * in other executors. | ||
| * | ||
|
|
@@ -218,7 +218,7 @@ public static <V> ListenableFuture<V> immediateFailedFuture( | |
| * thread that called {@code transform}. Second, transformations may run in | ||
| * an internal thread of the system responsible for the input {@code Future}, | ||
| * such as an RPC network thread. Finally, during the execution of a {@code | ||
| * sameThreadExecutor} transformation, all other registered but unexecuted | ||
| * newDirectExecutorService} transformation, all other registered but unexecuted | ||
| * listeners are prevented from running, even if those listeners are to run | ||
| * in other executors. | ||
| * | ||
|
|
@@ -240,7 +240,7 @@ public static <V> ListenableFuture<V> immediateFailedFuture( | |
| */ | ||
| public static <I, O> ListenableFuture<O> transform(ListenableFuture<I> future, | ||
| final Function<? super I, ? extends O> function) { | ||
| return Futures.<I, O>transform(future, function, MoreExecutors.sameThreadExecutor()); | ||
| return Futures.<I, O>transform(future, function, MoreExecutors.newDirectExecutorService()); | ||
| } | ||
|
|
||
| /** | ||
|
|
@@ -272,15 +272,15 @@ public static <I, O> ListenableFuture<O> transform(ListenableFuture<I> future, | |
| * <p>Note: For cases in which the transformation is fast and lightweight, | ||
| * consider {@linkplain Futures#transform(ListenableFuture, Function) the | ||
| * other overload} or explicit use of {@link | ||
| * MoreExecutors#sameThreadExecutor}. For heavier transformations, this | ||
| * MoreExecutors#newDirectExecutorService}. For heavier transformations, this | ||
| * choice carries some caveats: First, the thread that the transformation | ||
| * runs in depends on whether the input {@code Future} is done at the time | ||
| * {@code transform} is called. In particular, if called late, {@code | ||
| * transform} will perform the transformation in the thread that called | ||
| * {@code transform}. Second, transformations may run in an internal thread | ||
| * of the system responsible for the input {@code Future}, such as an RPC | ||
| * network thread. Finally, during the execution of a {@code | ||
| * sameThreadExecutor} transformation, all other registered but unexecuted | ||
| * newDirectExecutorService} transformation, all other registered but unexecuted | ||
| * listeners are prevented from running, even if those listeners are to run | ||
| * in other executors. | ||
| * | ||
|
|
@@ -324,7 +324,7 @@ public static <I, O> ListenableFuture<O> transform(ListenableFuture<I> future, | |
| public static <V> ListenableFuture<List<V>> allAsList( | ||
| ListenableFuture<? extends V>... futures) { | ||
| return new ListFuture<V>(ImmutableList.copyOf(futures), true, | ||
| MoreExecutors.sameThreadExecutor()); | ||
| MoreExecutors.newDirectExecutorService()); | ||
|
||
| } | ||
|
|
||
| /** | ||
|
|
@@ -347,7 +347,7 @@ public static <V> ListenableFuture<List<V>> allAsList( | |
| public static <V> ListenableFuture<List<V>> allAsList( | ||
| Iterable<? extends ListenableFuture<? extends V>> futures) { | ||
| return new ListFuture<V>(ImmutableList.copyOf(futures), true, | ||
| MoreExecutors.sameThreadExecutor()); | ||
| MoreExecutors.newDirectExecutorService()); | ||
| } | ||
|
|
||
| /** | ||
|
|
@@ -379,14 +379,14 @@ public static <V> ListenableFuture<List<V>> allAsList( | |
| * <p>Note: For cases in which the work of creating the derived future is | ||
| * fast and lightweight, consider {@linkplain Futures#chain(ListenableFuture, | ||
| * Function) the other overload} or explicit use of {@code | ||
| * sameThreadExecutor}. For heavier derivations, this choice carries some | ||
| * newDirectExecutorService}. For heavier derivations, this choice carries some | ||
| * caveats: First, the thread that the derivation runs in depends on whether | ||
| * the input {@code Future} is done at the time {@code chain} is called. In | ||
| * particular, if called late, {@code chain} will run the derivation in the | ||
| * thread that called {@code chain}. Second, derivations may run in an | ||
| * internal thread of the system responsible for the input {@code Future}, | ||
| * such as an RPC network thread. Finally, during the execution of a {@code | ||
| * sameThreadExecutor} {@code chain} function, all other registered but | ||
| * newDirectExecutorService} {@code chain} function, all other registered but | ||
| * unexecuted listeners are prevented from running, even if those listeners | ||
| * are to run in other executors. | ||
| * | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.