Skip to content

Replace Apache Commons Lang 2 with Java APIs due to removal from core and security issue#618

Merged
jglick merged 1 commit intojenkinsci:masterfrom
jonesbusy:feature/remove-commons-lang2
Jan 20, 2026
Merged

Replace Apache Commons Lang 2 with Java APIs due to removal from core and security issue#618
jglick merged 1 commit intojenkinsci:masterfrom
jonesbusy:feature/remove-commons-lang2

Conversation

@jonesbusy
Copy link
Copy Markdown
Contributor

Supersedes #372

Testing done

mvn -DskipTests clean install

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

Copy link
Copy Markdown

@mikecirioli mikecirioli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

public String getId() {
if (StringUtils.isEmpty(this.id)) {
if (this.id == null || this.id.isEmpty()) {
this.id = generateId();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm probably deserves rewrite like jenkinsci/scm-api-plugin#357


public boolean isGeneratingPrefixRoles() {
return StringUtils.isNotBlank(rolePrefix) || convertToUpperCase;
return (rolePrefix != null && !rolePrefix.isBlank()) || convertToUpperCase;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am guessing a PR like this is mechanically generated. True cleanup would mean reading the code to figure out whether a rolePrefix of "" (much less " ") was ever actually possible, and if so, cleaning up properly by picking either null or "" at the point at which such a field is written.

@jglick jglick merged commit 7d7de30 into jenkinsci:master Jan 20, 2026
17 checks passed
@jonesbusy jonesbusy deleted the feature/remove-commons-lang2 branch January 20, 2026 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants