jenkinsci / jenkinsci/workflow-support-plugin

[JENKINS-56252] Futures.addCallback uses method deleted in Guava 21

Open
#414 8 comments 0 reactions 0 assignees View on GitHub
component:workflow-support-plugin imported-jira-issue priority:minor resolution:unresolved
Dominant language
Java
Stars
23
Forks
75
PR merge metrics
No merged PRs in 30d

Description

If you update to Guava 21+ and try to run a Pipeline build you will get

java.lang.NoSuchMethodError: com.google.common.util.concurrent.MoreExecutors.sameThreadExecutor()Lcom/google/common/util/concurrent/ListeningExecutorService;

at org.jenkinsci.plugins.workflow.support.concurrent.Futures.addCallback(Futures.java:90)
at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.runInCpsVmThread(CpsFlowExecution.java:738)
at ...

due to this removal. (Note that the method was not deprecated or even marked @​Beta in Guava 11, which we currently compile against—the deprecation happened later.)

---
Originally reported by jglick, imported from: Futures.addCallback uses method deleted in Guava 21


  • status: Open
  • priority: Minor
  • component(s): workflow-support-plugin
  • label(s): guava
  • resolution: Unresolved
  • votes: 0
  • watchers: 4
  • imported: 20260601-173816

Raw content of original issue

If you update to Guava 21+ and try to run a Pipeline build you will get


java.lang.NoSuchMethodError: com.google.common.util.concurrent.MoreExecutors.sameThreadExecutor()Lcom/google/common/util/concurrent/ListeningExecutorService;

at org.jenkinsci.plugins.workflow.support.concurrent.Futures.addCallback(Futures.java:90)
at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.runInCpsVmThread(CpsFlowExecution.java:738)
at ...

due to this removal. (Note that the method was not deprecated or even marked @Beta in Guava 11, which we currently compile against—the deprecation happened later.)

Contributor guide

Open the contributing guide

Research direction

Start in Futures.java at line 90, where the reported NoSuchMethodError calls MoreExecutors.sameThreadExecutor(), and review the Guava removal linked in the issue. The issue is done when Pipeline builds run with Guava 21 or newer without this error.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.