Skip to content

Migrate from Commons Lang 2 to Commons Lang 3 - #858

Merged
c00ler merged 1 commit into
jenkinsci:masterfrom
timja:commons-lang3
Aug 3, 2026
Merged

Migrate from Commons Lang 2 to Commons Lang 3#858
c00ler merged 1 commit into
jenkinsci:masterfrom
timja:commons-lang3

Conversation

@timja-bot

Copy link
Copy Markdown
Contributor

Migrate from deprecated/EOL Commons Lang 2 to Commons Lang 3. This repository was previously using
an inconsistent mix of versions — commons-lang3-api was already declared, while Gradle.java
still imported org.apache.commons.lang.StringUtils.

Part of the effort to remove Commons Lang 2 from Jenkins core — jenkinsci/jenkins#16404,
jenkinsci/jenkins#26105. Commons Lang 2 is EOL and carries an unfixed advisory
(GHSA-j288-q9x7-2f5v).

What's changed

  • Gradle.java: org.apache.commons.lang.StringUtils becomes org.apache.commons.lang3.StringUtils.
    Import-only; isBlank/isNotBlank are identical in Lang 3 and commons-lang3-api is already declared.
  • Bumped the parent POM to 6.2211.v27f680c93c53 so the ban-commons-lang-2 enforcer rule is
    available, and enabled it.

Testing done

mvn -B -ntp -pl plugin -am clean verify on Java 21 / macOS: the unit tests pass. The run then
hangs in GradlePluginIntegrationTest inside GradleInstallation.forNode, downloading a Gradle
distribution — unrelated to this change, so I left it to CI.

The ban-commons-lang-2 enforcer rule is enabled in this PR, so the build fails if an
org.apache.commons.lang.* import comes back.

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests that demonstrate the feature works or the issue is fixed

🤖 This pull request was generated with AI assistance (Claude Code) as part of a bulk migration
across Jenkins plugins. If anything here looks wrong, please comment on this PR or contact @timja.

@timja
timja requested a review from a team August 3, 2026 08:05
@c00ler
c00ler merged commit 20dd6b1 into jenkinsci:master Aug 3, 2026
16 checks passed
@timja

timja commented Aug 3, 2026

Copy link
Copy Markdown
Member

Thanks for merging it, would it be possible to release it please?

Jenkins will soon be removing this library and need plugins that depend on it to be released first.

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants