Skip to content

Update: replace removed Thread.stop() with stream-close cancellation#3851

Open
gian21391 wants to merge 2 commits into
ControlSystemStudio:masterfrom
gian21391:update-replace-thread-stop
Open

Update: replace removed Thread.stop() with stream-close cancellation#3851
gian21391 wants to merge 2 commits into
ControlSystemStudio:masterfrom
gian21391:update-replace-thread-stop

Conversation

@gian21391

Copy link
Copy Markdown

Download cancellation in Update relied on Thread.stop(), which is removed in
recent JDKs and already throws UnsupportedOperationException at runtime on the
JDK 21 target, so cancelling was a silent no-op. The download watcher now closes
the source stream on cancel to abort the in-progress Files.copy. This is a step
towards improving support for JDK 26, where the old code no longer compiles.

Checklist

  • Testing:

    • The feature has automated tests
    • Tests were run
    • If not, explain how you tested your changes
  • Documentation:

    • The feature is documented
    • The documentation is up to date
    • Release notes:
      • Added an entry if the change is breaking or significant
      • Added an entry when adding a new feature

@sonarqubecloud

Copy link
Copy Markdown

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.

2 participants