Skip to content

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.
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)

1 participant