Skip to content

fix: add explicit jsr305 dep for java-client 9.x/10.x compatibility (PER-7786)#358

Open
rishigupta1599 wants to merge 3 commits into
masterfrom
per-7786-appium-version-compat
Open

fix: add explicit jsr305 dep for java-client 9.x/10.x compatibility (PER-7786)#358
rishigupta1599 wants to merge 3 commits into
masterfrom
per-7786-appium-version-compat

Conversation

@rishigupta1599

Copy link
Copy Markdown

What

java-client 8.x supplied javax.annotation.Nullable transitively; java-client 9.x/10.x dropped it, so the SDK no longer compiles (@Nullable in AppAutomate/ScreenshotOptions) against modern clients.

Fix

Declare com.google.code.findbugs:jsr305:3.0.2 explicitly. One line, no source changes, keeps the Java 8 floor (no java-client version bump — java-client 10 requires Java 11+).

Validation

  • Unit suite: 139/139 on java-client 8.6.0 and 10.1.1.
  • End-to-end on BrowserStack App Automate: java-client 7.6.0 / 8.6.0 / 9.5.0 × Appium servers 1.22.0 and 2.15.05/5 passed (valid pairings; client 7 is JSONWP-only).

Note: java-client 9.x + the newest Selenium has an unrelated upstream issue (SupportsContextSwitching references the removed org.openqa.selenium.ContextAware); 8.x and 10.x are unaffected. This PR is the SDK-side fix.

Part of PER-7786.

🤖 Generated with Claude Code

…ility

java-client 8.x provided javax.annotation.Nullable transitively, but
java-client 9.x/10.x dropped that transitive dependency, so the SDK fails to
compile (@nullable in AppAutomate/ScreenshotOptions) against modern clients.

Declare com.google.code.findbugs:jsr305 explicitly so the SDK builds and runs
against all major java-client versions without forcing a version bump that
would drop the Java 8 floor.

Validated: unit suite (139 tests) green on java-client 8.6.0 AND 10.1.1; and
end-to-end on App Automate with java-client 7.6.0 / 8.6.0 / 9.5.0 across
Appium servers 1.22.0 and 2.15.0.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@rishigupta1599 rishigupta1599 requested a review from a team as a code owner June 18, 2026 13:16
rishigupta1599 and others added 2 commits June 22, 2026 17:47
@nullable has CLASS retention; provided scope keeps jsr305 off consumers'
transitive compile classpath while still satisfying the SDK's own compile.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@rishigupta1599

Copy link
Copy Markdown
Author

Claude Code PR Review

PR: #358Reviewers: stack:code-reviewer

Summary

Adds explicit jsr305 so the SDK builds against java-client 8/9/10 (9.x/10.x dropped the transitive javax.annotation.Nullable).

Findings (addressed)

  • [Low] jsr305 should not leak onto consumers’ classpath → scoped as provided (@nullable is CLASS-retention, compile-only).

No source logic change. Validated: 139 unit tests on java-client 8.6.0 and 10.1.1; e2e on App Automate (java-client 7.6.0/8.6.0/9.5.0 × Appium 1.22.0/2.15.0).


Verdict: PASS

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