Skip to content

fix(ndk): Keep the interrupt when SentryNdk waits for native libraries (JAVA-552) - #6667

Merged
runningcode merged 2 commits into
9.x.xfrom
no/java-552-restore-interrupts
Nov 19, 2026
Merged

runningcode merged 2 commits into
9.x.xfrom
no/java-552-restore-interrupts

Conversation

@runningcode

@runningcode runningcode commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

📜 Description

SentryNdk.init and SentryNdk.close now restore the interrupt flag before they wrap an InterruptedException in an IllegalStateException. They don't own the calling thread, so the interrupt belongs to the code that does.

💡 Motivation and Context

This is part of the catch (Throwable) audit. It's independent of the other JAVA-552 PRs, so it can merge in any order.

💚 How did you test it?

No new tests, only the existing ones.

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

#skip-changelog

🤖 Generated with Claude Code

SentryNdk.init and close wrap an InterruptedException in an IllegalStateException. They don't own the calling thread, so they now restore its interrupt flag first, for the code that does.

Refs #5513

Refs JAVA-552

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@linear-code

linear-code Bot commented Nov 18, 2026

Copy link
Copy Markdown

JAVA-552

@sentry

sentry Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

📲 Install Builds

Android

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

⚙️ sentry-android Build Distribution Settings

Refs #5513

Refs JAVA-552

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added risk: medium PR risk score: medium and removed risk: medium PR risk score: medium labels Nov 18, 2026
@github-actions github-actions Bot added risk: medium PR risk score: medium and removed risk: medium PR risk score: medium labels Nov 19, 2026
@runningcode
runningcode marked this pull request as ready for review November 19, 2026 15:27
@runningcode
runningcode requested review from a team and adinauer as code owners November 19, 2026 15:27
@runningcode
runningcode requested review from markushi and romtsn and removed request for a team November 19, 2026 15:27
@github-actions github-actions Bot added risk: medium PR risk score: medium and removed risk: medium PR risk score: medium labels Nov 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

PR risk: medium

For commit 9f9c390.

The model rated this change low. It was raised to medium because:

  • R7: the model was not confident enough that the change is low

This label is a hint for reviewers, not an approval.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 9f9c390. Configure here.

@runningcode
runningcode merged commit 162664a into 9.x.x Nov 19, 2026
38 checks passed
@runningcode
runningcode deleted the no/java-552-restore-interrupts branch November 19, 2026 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants