Skip to content

Commit

Permalink
Support Java 20 (Backport of #2501) (#2546)
Browse files Browse the repository at this point in the history
Ignore the `UnsupportedOperationException` of `Thread.stop`. This is a
quick fix to de-block users from using Java 20.

* Original Pull request: #2501

Pull request:. #2546
  • Loading branch information
lefou authored Jun 1, 2023
1 parent e55488d commit e3328bc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ jobs:
- cmd /C %GITHUB_WORKSPACE%\ci\mill.bat -i -d -k "integration.thirdparty.{local,forked}"
- cmd /C %GITHUB_WORKSPACE%\ci\mill.bat -i -d -k "contrib.__.test"


runs-on: windows-latest

steps:
Expand Down
2 changes: 2 additions & 0 deletions main/src/mill/main/MillServerMain.scala
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,8 @@ class Server[T](
Thread.sleep(5)
try t.stop()
catch {
case e: UnsupportedOperationException =>
// nothing we can do about, removed in Java 20
case e: java.lang.Error if e.getMessage.contains("Cleaner terminated abnormally") =>
// ignore this error and do nothing; seems benign
}
Expand Down

0 comments on commit e3328bc

Please sign in to comment.