Skip to content

chore: try Thread.stop for Java 25#597

Merged
stephenamar-db merged 1 commit intodatabricks:masterfrom
He-Pin:thread
Feb 12, 2026
Merged

chore: try Thread.stop for Java 25#597
stephenamar-db merged 1 commit intodatabricks:masterfrom
He-Pin:thread

Conversation

@He-Pin
Copy link
Copy Markdown
Contributor

@He-Pin He-Pin commented Feb 11, 2026

Thread.stop will throw unsupported operation on Java 25

Copilot AI review requested due to automatic review settings February 11, 2026 03:39
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the sjsonnet server shutdown behavior to avoid runtime failures when running on newer JVMs where Thread.stop() is no longer supported (per PR description, Java 25).

Changes:

  • Adds scala.annotation.nowarn and suppresses deprecation warnings for the server request handler.
  • Wraps Thread.stop() in a try/catch so the server doesn’t crash when stop() is unsupported.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread sjsonnet/server/src/sjsonnet/SjsonnetServerMain.scala
Comment thread sjsonnet/server/src/sjsonnet/SjsonnetServerMain.scala Outdated
Comment thread sjsonnet/server/src/sjsonnet/SjsonnetServerMain.scala
@He-Pin He-Pin changed the title chore: avoid use Thread.stop for Java 25 chore: try Thread.stop for Java 25 Feb 11, 2026
@stephenamar-db stephenamar-db merged commit ebd7d8f into databricks:master Feb 12, 2026
8 of 9 checks passed
@He-Pin He-Pin deleted the thread branch February 13, 2026 22:28
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.

3 participants