Skip to content

Remove commons-lang3 dependency from core module#802

Merged
dkropachev merged 2 commits intoscylla-4.xfrom
remove-commons-lang3-dependency
Feb 13, 2026
Merged

Remove commons-lang3 dependency from core module#802
dkropachev merged 2 commits intoscylla-4.xfrom
remove-commons-lang3-dependency

Conversation

@dkropachev
Copy link

@dkropachev dkropachev commented Feb 10, 2026

Summary

  • commons-lang3 was a transitive dependency of the optional gremlin-core but used directly in production code (DefaultLoadBalancingPolicy), meaning consumers could hit NoClassDefFoundError at runtime if they didn't happen to have it on their classpath
  • Replace Pair<Integer, Integer> with int[] in moveReplicasToFront() — the only production usage
  • Replace ArrayUtils.addAll() with Arrays.copyOf()/System.arraycopy() in VectorCodecTest — the only test usage

Closes: #801

Test plan

  • DefaultLoadBalancingPolicy* tests pass (232 tests)
  • VectorCodecTest passes (131 tests)
  • Full CI

commons-lang3 was pulled in transitively via the optional gremlin-core
dependency but used directly in production code (DefaultLoadBalancingPolicy).
Since gremlin-core is optional, consumers would not get commons-lang3
transitively, risking NoClassDefFoundError at runtime.

Replace Pair<Integer, Integer> with int[] in moveReplicasToFront() and
ArrayUtils.addAll() with standard Arrays.copyOf()/System.arraycopy()
in VectorCodecTest.
Fix pre-existing xml-format-maven-plugin check failure.
@dkropachev dkropachev merged commit 44e057a into scylla-4.x Feb 13, 2026
16 checks passed
@dkropachev dkropachev deleted the remove-commons-lang3-dependency branch February 13, 2026 02:08
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.

Missing commons-lang3 runtime dependency causes NoClassDefFoundError in DefaultLoadBalancingPolicy (4.19.0.5)

2 participants