ATLAS-5193: replace use of commons-lang library classes with classes in commons-lang3 library#504
Merged
mneethiraj merged 1 commit intoapache:masterfrom Jan 27, 2026
Merged
Conversation
…in commons-lang3 library
There was a problem hiding this comment.
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.*toorg.apache.commons.lang3.* - Updated POM files to use
commons-lang3version 3.20.0 instead ofcommons-langversion 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'sRandomUtils.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.
pinal-shah
approved these changes
Jan 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.