Skip to content

Commit

Permalink
Support Java 20 (#2501)
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.

Added a bootstrap CI run using Java 20.

Pull request: #2501
  • Loading branch information
lefou authored May 5, 2023
1 parent bd502f7 commit 514e014
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ jobs:
- java-version: 17
buildcmd: ./mill -i docs.githubPages

# Have one job on latest JVM
- java-version: 20
buildcmd: ci/test-mill-bootstrap.sh

uses: ./.github/workflows/run-mill-action.yml
with:
os: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions runner/src/mill/runner/MillServerMain.scala
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,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 514e014

Please sign in to comment.