chore: update the apache lang3 version to 3.18.0#41154
Conversation
WalkthroughThe changes upgrade the Apache Commons Lang library from version 2.x to 3.x by updating Maven dependencies and modifying import statements across multiple Java files to reference the new Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ast-grep (0.38.6)app/server/appsmith-server/src/main/java/com/appsmith/server/git/common/CommonGitServiceCEImpl.javaapp/server/appsmith-server/src/test/java/com/appsmith/server/git/CommonGitServiceCETest.javaapp/server/appsmith-server/src/test/java/com/appsmith/server/imports/internal/ImportServiceTests.javaNote ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (42)
✅ Files skipped from review due to trivial changes (36)
🚧 Files skipped from review as they are similar to previous changes (1)
🧰 Additional context used🧠 Learnings (4)📓 Common learningsapp/server/appsmith-server/src/main/java/com/appsmith/server/git/utils/GitAnalyticsUtils.java (5)Learnt from: sharat87 Learnt from: abhvsn Learnt from: brayn003 Learnt from: brayn003 Learnt from: brayn003 app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ce/ActionExecutionSolutionCEImpl.java (9)Learnt from: sondermanish Learnt from: sondermanish Learnt from: nidhi-nair Learnt from: nidhi-nair Learnt from: abhvsn Learnt from: nidhi-nair Learnt from: nidhi-nair Learnt from: NilanshBansal Learnt from: NilanshBansal app/server/appsmith-server/pom.xml (3)Learnt from: sharat87 Learnt from: sondermanish Learnt from: sondermanish ⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
🔇 Additional comments (5)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
app/server/appsmith-interfaces/pom.xml(1 hunks)app/server/appsmith-interfaces/src/main/java/com/appsmith/external/helpers/restApiUtils/helpers/DatasourceUtils.java(1 hunks)app/server/appsmith-interfaces/src/main/java/com/appsmith/external/helpers/restApiUtils/helpers/HeaderUtils.java(1 hunks)app/server/appsmith-interfaces/src/main/java/com/appsmith/external/helpers/restApiUtils/helpers/HintMessageUtils.java(1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: nidhi-nair
PR: appsmithorg/appsmith#29372
File: app/server/appsmith-server/src/main/java/com/appsmith/server/applications/jslibs/ApplicationJsLibServiceCEImpl.java:51-56
Timestamp: 2024-10-08T15:32:34.115Z
Learning: The `updateJsLibsInContext` method in the `ApplicationJsLibServiceCEImpl` class was mistakenly referred to as a new method in a previous comment. It is important to accurately assess the context of changes in a pull request to avoid misrepresenting the nature of the code modifications.
Learnt from: nidhi-nair
PR: appsmithorg/appsmith#29372
File: app/server/appsmith-server/src/main/java/com/appsmith/server/applications/jslibs/ApplicationJsLibServiceCEImpl.java:51-56
Timestamp: 2024-07-26T21:12:57.228Z
Learning: The `updateJsLibsInContext` method in the `ApplicationJsLibServiceCEImpl` class was mistakenly referred to as a new method in a previous comment. It is important to accurately assess the context of changes in a pull request to avoid misrepresenting the nature of the code modifications.
Learnt from: brayn003
PR: appsmithorg/appsmith#40462
File: app/client/src/instrumentation/index.ts:0-0
Timestamp: 2025-04-29T09:12:14.552Z
Learning: Only comment on files that are directly related to the PR's objectives, even if other files appear in the diff. For PR #40462, the focus is on the import override feature for artifacts, not on instrumentation or telemetry files.
Learnt from: Aishwarya-U-R
PR: appsmithorg/appsmith#29405
File: app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2_Widget_API_Pagination_spec.js:37-41
Timestamp: 2024-10-08T15:32:39.374Z
Learning: The pull request titled "test: Cypress | Replace static with Dynamic waits - Part 1" is part of a phased approach where only certain test specifications are targeted for static wait removal in the initial phase. Future phases will address additional specs.
Learnt from: Aishwarya-U-R
PR: appsmithorg/appsmith#29405
File: app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2_Widget_API_Pagination_spec.js:37-41
Timestamp: 2024-07-26T21:12:57.228Z
Learning: The pull request titled "test: Cypress | Replace static with Dynamic waits - Part 1" is part of a phased approach where only certain test specifications are targeted for static wait removal in the initial phase. Future phases will address additional specs.
Learnt from: sharat87
PR: appsmithorg/appsmith#30252
File: deploy/docker/fs/usr/lib/python3/dist-packages/supervisor/appsmith_supervisor_stdout.py:21-29
Timestamp: 2024-07-26T21:12:57.228Z
Learning: The user has confirmed that the suggested changes to handle potential exceptions and improve the robustness of the `main` function in `appsmith_supervisor_stdout.py` are acceptable.
app/server/appsmith-interfaces/src/main/java/com/appsmith/external/helpers/restApiUtils/helpers/HeaderUtils.java (2)
Learnt from: nidhi-nair
PR: #29372
File: app/server/appsmith-server/src/main/java/com/appsmith/server/applications/jslibs/ApplicationJsLibServiceCEImpl.java:51-56
Timestamp: 2024-10-08T15:32:34.115Z
Learning: The updateJsLibsInContext method in the ApplicationJsLibServiceCEImpl class was mistakenly referred to as a new method in a previous comment. It is important to accurately assess the context of changes in a pull request to avoid misrepresenting the nature of the code modifications.
Learnt from: nidhi-nair
PR: #29372
File: app/server/appsmith-server/src/main/java/com/appsmith/server/applications/jslibs/ApplicationJsLibServiceCEImpl.java:51-56
Timestamp: 2024-07-26T21:12:57.228Z
Learning: The updateJsLibsInContext method in the ApplicationJsLibServiceCEImpl class was mistakenly referred to as a new method in a previous comment. It is important to accurately assess the context of changes in a pull request to avoid misrepresenting the nature of the code modifications.
app/server/appsmith-interfaces/src/main/java/com/appsmith/external/helpers/restApiUtils/helpers/HintMessageUtils.java (5)
Learnt from: nidhi-nair
PR: #29372
File: app/server/appsmith-server/src/main/java/com/appsmith/server/applications/jslibs/ApplicationJsLibServiceCEImpl.java:51-56
Timestamp: 2024-10-08T15:32:34.115Z
Learning: The updateJsLibsInContext method in the ApplicationJsLibServiceCEImpl class was mistakenly referred to as a new method in a previous comment. It is important to accurately assess the context of changes in a pull request to avoid misrepresenting the nature of the code modifications.
Learnt from: nidhi-nair
PR: #29372
File: app/server/appsmith-server/src/main/java/com/appsmith/server/applications/jslibs/ApplicationJsLibServiceCEImpl.java:51-56
Timestamp: 2024-07-26T21:12:57.228Z
Learning: The updateJsLibsInContext method in the ApplicationJsLibServiceCEImpl class was mistakenly referred to as a new method in a previous comment. It is important to accurately assess the context of changes in a pull request to avoid misrepresenting the nature of the code modifications.
Learnt from: sondermanish
PR: #36413
File: app/server/appsmith-server/src/main/java/com/appsmith/server/imports/internal/ImportServiceCEImpl.java:514-518
Timestamp: 2024-10-08T15:32:34.114Z
Learning: In the ImportServiceCEImpl class, when throwing new AppsmithException instances, avoid adding the original Throwable as the cause due to messaging constraints.
Learnt from: sondermanish
PR: #36413
File: app/server/appsmith-server/src/main/java/com/appsmith/server/imports/internal/ImportServiceCEImpl.java:514-518
Timestamp: 2024-09-20T07:55:30.235Z
Learning: In the ImportServiceCEImpl class, when throwing new AppsmithException instances, avoid adding the original Throwable as the cause due to messaging constraints.
Learnt from: trishaanand
PR: #38359
File: app/server/appsmith-server/src/main/java/com/appsmith/server/authentication/handlers/ce/CustomOAuth2UserServiceCEImpl.java:78-82
Timestamp: 2024-12-25T06:50:40.623Z
Learning: In CustomOAuth2UserServiceCEImpl, the second repository call for finding users by case-insensitive email is needed because older users might have uppercase or mixed-case emails, while new users have emails stored in lowercase.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: perform-test / rts-build / build
- GitHub Check: perform-test / client-build / client-build
- GitHub Check: perform-test / server-build / server-unit-tests
- GitHub Check: server-unit-tests / server-unit-tests
- GitHub Check: server-spotless / spotless-check
🔇 Additional comments (3)
app/server/appsmith-interfaces/src/main/java/com/appsmith/external/helpers/restApiUtils/helpers/HeaderUtils.java (1)
9-9: Import migration looks good
org.apache.commons.lang3.StringUtilsis the correct replacement; no other changes required in this class.app/server/appsmith-interfaces/src/main/java/com/appsmith/external/helpers/restApiUtils/helpers/DatasourceUtils.java (1)
7-7: Import migration looks good
StringUtilsnow points tolang3; all method calls (isEmpty, etc.) remain valid.app/server/appsmith-interfaces/src/main/java/com/appsmith/external/helpers/restApiUtils/helpers/HintMessageUtils.java (1)
9-9: Import migration looks goodNothing else to change in this file.
| <groupId>org.apache.commons</groupId> | ||
| <artifactId>commons-lang3</artifactId> | ||
| <version>3.18.0</version> |
There was a problem hiding this comment.
💡 Verification agent
🧩 Analysis chain
Verify that no modules still rely on commons-lang v2.x
The new commons-lang3 dependency is correctly added, but if any other module still brings in the old commons-lang:commons-lang 2.x JAR you’ll get both versions on the class-path, leading to subtle ClassCastExceptions.
Please run a quick search across the repo and PR branch to confirm every occurrence of org.apache.commons.lang. has been migrated.
🏁 Script executed:
#!/usr/bin/env bash
# Find any remaining imports that reference the deprecated commons-lang 2.x package
rg --no-heading --line-number --fixed-strings 'org.apache.commons.lang.' \
| grep -v 'org.apache.commons.lang3' || trueLength of output: 6608
Multiple commons-lang v2.x imports detected
A search found 40+ occurrences of org.apache.commons.lang.* imports across both plugin and server modules. These need to be migrated to the org.apache.commons.lang3 equivalents to avoid having both v2.x and v3.x on the classpath:
• appsmith-plugins (snowflake, smtp, redis, redshift, oracle, postgres, mysql, mssql, arangoDB, elasticSearch, databricks, amazons3)
• appsmith-server main code (services, solutions, migrations, helpers, configurations, domains)
• appsmith-server tests (CreateDBTablePageSolutionTests, ImportServiceTests, GitDiscardTests, GitCommitTests, CommonGitServiceCETest)
Please update all imports, e.g.:
- import org.apache.commons.lang.StringUtils;
+ import org.apache.commons.lang3.StringUtils;…and similarly for ObjectUtils, WordUtils, ArrayUtils, StringEscapeUtils, NotImplementedException, and builder classes.
Committable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
In app/server/appsmith-interfaces/pom.xml around lines 180 to 182, the project
currently includes dependencies on both commons-lang v2.x and v3.x, causing
conflicts. To fix this, remove all dependencies on commons-lang v2.x and update
all import statements in the entire codebase (plugins, server modules, and
tests) from `org.apache.commons.lang.*` to `org.apache.commons.lang3.*`. Also,
update usages of classes like ObjectUtils, WordUtils, ArrayUtils,
StringEscapeUtils, NotImplementedException, and builder classes to their v3
equivalents to ensure compatibility and avoid classpath conflicts.
There was a problem hiding this comment.
@nsarupr Can we update all the references mentioned here?
There was a problem hiding this comment.
Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!
Description
Tip
Add a TL;DR when the description is longer than 500 words or extremely technical (helps the content, marketing, and DevRel team).
Please also include relevant motivation and context. List any dependencies that are required for this change. Add links to Notion, Figma or any other documents that might be relevant to the PR.
Fixes #
Issue Numberor
Fixes
Issue URLWarning
If no issue exists, please create an issue first, and check with the maintainers if the issue is valid.
Automation
/ok-to-test tags="@tag.All"
🔍 Cypress test results
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/16644871984
Commit: 99ae03d
Cypress dashboard.
Tags:
@tag.AllSpec:
Thu, 31 Jul 2025 11:00:46 UTC
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit