Skip to content

Fix missing relocation for org.jspecify in hadoop-shaded-guava#50

Open
RomanVlasenko wants to merge 1 commit intoapache:trunkfrom
RomanVlasenko:fix-jspecify-relocation
Open

Fix missing relocation for org.jspecify in hadoop-shaded-guava#50
RomanVlasenko wants to merge 1 commit intoapache:trunkfrom
RomanVlasenko:fix-jspecify-relocation

Conversation

@RomanVlasenko
Copy link

@RomanVlasenko RomanVlasenko commented Feb 26, 2026

Problem

org.jspecify:jspecify was added as a shaded artifact in 1.5.0 but without a corresponding relocation rule. As a result, its classes are bundled at their original org/jspecify/annotations/ path inside the hadoop-shaded-guava jar.

This causes classpath collisions in projects that also have a direct or transitive dependency on org.jspecify:jspecify, since the same class files appear from two different jars.

Fix

Add a <relocation> rule for org/jspecify/ in the maven-shade-plugin configuration, consistent with how com/google/ and org/checkerframework/ are already handled.


For code changes:

  • Does the title or this PR start with the corresponding JIRA issue id?
  • Have you updated the `LICENSE`, `LICENSE-binary`, `NOTICE-binary` files? — No new dependencies added; this fix only adds a relocation rule for an already-included artifact
  • If adding new dependencies to the code, are these compatible with ASF 2.0? — No new dependencies added

Use of AI

Yes — Claude (Anthropic) was used to help identify the root cause and draft this fix.

org.jspecify:jspecify was added as a shaded artifact in 1.5.0 but without
a corresponding relocation rule, causing its classes to be bundled at their
original org/jspecify/annotations/ path. This produces classpath collisions
in projects that also depend on the standalone org.jspecify:jspecify jar.
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.

1 participant