Skip to content

test: Verify Java 8 API check in logback#5746

Closed
adinauer wants to merge 2 commits into
ci/java8-api-compatibilityfrom
test/java8-api-compatibility-floordiv
Closed

test: Verify Java 8 API check in logback#5746
adinauer wants to merge 2 commits into
ci/java8-api-compatibilityfrom
test/java8-api-compatibility-floordiv

Conversation

@adinauer

@adinauer adinauer commented Jul 8, 2026

Copy link
Copy Markdown
Member

📜 Description

Intentionally introduce the Java 9-only Objects.requireNonNullElse(Object, Object) API in the sentry-logback module.

This PR is a validation PR for #5745 and is expected to fail the new Java 8 API compatibility workflow.

💡 Motivation and Context

This verifies that the Codehaus Java 8 Animal Sniffer signature check catches Java 8 runtime incompatibilities outside the core :sentry module too.

💚 How did you test it?

Expected failure:

./gradlew java8ApiCompatibility --init-script .github/gradle/java8-api-compatibility.init.gradle.kts --no-configuration-cache -Dorg.gradle.configureondemand=false

[Undefined reference] io.sentry.logback.(SentryAppender.java:233)
  >> Object java.util.Objects.requireNonNullElse(Object, Object)

Formatting/API generation still passes:

./gradlew spotlessApply apiDump
BUILD SUCCESSFUL

📝 Checklist

  • I added GH Issue ID & Linear ID
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.
  • Public API changes reviewed by another Mobile SDK team member or implemented according to the develop docs spec.

🔮 Next steps

Close this PR after confirming the workflow fails as expected.

#skip-changelog

@sentry

sentry Bot commented Jul 8, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
SDK Size io.sentry.tests.size 8.48.0 (1) release

⚙️ sentry-android Build Distribution Settings

@adinauer adinauer changed the title test: Verify Java 8 API compatibility check test: Verify Java 8 API check in logback Jul 8, 2026
@adinauer adinauer closed this Jul 8, 2026
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 315.59 ms 372.33 ms 56.74 ms
Size 0 B 0 B 0 B

Baseline results on branch: ci/java8-api-compatibility

Startup times

Revision Plain With Sentry Diff
29117d4 315.09 ms 353.43 ms 38.34 ms

App size

Revision Plain With Sentry Diff
29117d4 0 B 0 B 0 B

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