Skip to content

ATLAS-5193: replace use of commons-lang library classes with classes in commons-lang3 library#504

Merged
mneethiraj merged 1 commit intoapache:masterfrom
mneethiraj:ATLAS-5193
Jan 27, 2026
Merged

ATLAS-5193: replace use of commons-lang library classes with classes in commons-lang3 library#504
mneethiraj merged 1 commit intoapache:masterfrom
mneethiraj:ATLAS-5193

Conversation

@mneethiraj
Copy link
Contributor

What changes were proposed in this pull request?

Replaced use of commons-lang library classes with classes in commons-lang3 library.

How was this patch tested?

Build completes successfully.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR replaces usage of the deprecated commons-lang (version 2.x) library with the modern commons-lang3 (version 3.x) library across the Apache Atlas codebase. This is a refactoring effort to migrate to the actively maintained library version.

Changes:

  • Updated all import statements from org.apache.commons.lang.* to org.apache.commons.lang3.*
  • Updated POM files to use commons-lang3 version 3.20.0 instead of commons-lang version 2.6
  • Fixed API incompatibilities where method signatures differ between libraries (e.g., RandomUtils.nextInt())

Reviewed changes

Copilot reviewed 236 out of 236 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pom.xml Updated dependency management to use commons-lang3 3.20.0 instead of commons-lang 2.6
notification/pom.xml Removed commons-lang dependency and added explicit commons-lang3 version
tools/notification-analyzer/pom.xml Removed commons-lang artifact dependency
addons/kafka-bridge/pom.xml Updated artifact coordinates from commons-lang to commons-lang3
addons/impala-bridge/pom.xml Replaced commons-lang dependency with commons-lang3
notification/src/main/java/org/apache/atlas/notification/spool/utils/local/FileOperation.java Updated RandomUtils.nextInt() call to include required parameters for commons-lang3
Multiple Java files Updated imports from org.apache.commons.lang to org.apache.commons.lang3
Comments suppressed due to low confidence (1)

notification/src/main/java/org/apache/atlas/notification/spool/utils/local/FileOperation.java:1

  • The RandomUtils.nextInt(0, 10) call in commons-lang3 generates a random integer in the range [0, 10), which is exclusive of the upper bound. This differs from commons-lang's RandomUtils.nextInt(10) which generated [0, 10). While the behavior is equivalent, consider if the upper bound should be 10 or 11 to match the original intent of generating values 0-9.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mneethiraj mneethiraj merged commit a27aa12 into apache:master Jan 27, 2026
1 check passed
mneethiraj added a commit that referenced this pull request Jan 27, 2026
…in commons-lang3 library (#504)

(cherry picked from commit a27aa12)
@mneethiraj mneethiraj deleted the ATLAS-5193 branch February 6, 2026 07:09
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.

2 participants

Comments