Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thread.stop unsupported on JDK 20 #2429

Closed
nihil-admirari opened this issue Apr 10, 2023 · 2 comments · Fixed by #2501
Closed

Thread.stop unsupported on JDK 20 #2429

nihil-admirari opened this issue Apr 10, 2023 · 2 comments · Fixed by #2501
Milestone

Comments

@nihil-admirari
Copy link

Running mill --version under JDK 20 results in:

java.lang.UnsupportedOperationException
	at java.base/java.lang.Thread.stop(Thread.java:1705)
	at mill.main.Server.handleRun(MillServerMain.scala:209)
	at mill.main.Server.$anonfun$run$2(MillServerMain.scala:117)
	at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
	at mill.main.Server$.lockBlock(MillServerMain.scala:227)
	at mill.main.Server.$anonfun$run$1(MillServerMain.scala:98)
	at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
	at mill.main.Server$.tryLockBlock(MillServerMain.scala:235)
	at mill.main.Server.run(MillServerMain.scala:95)
	at mill.main.MillServerMain$.main(MillServerMain.scala:53)
	at mill.main.MillServerMain.main(MillServerMain.scala)
@Sailsman63
Copy link

Interestingly, the Oracle release notes point out that Thread.stop() has been deprecated since JDK 1.2 as inherently unsafe.

@zhutmost
Copy link

zhutmost commented May 4, 2023

I met the same situation.
My mill version is 0.11.0-M8 & 0.10.12, OS platform is macOS.
My JDK version is:

$ java -version
openjdk version "20.0.1" 2023-04-18
OpenJDK Runtime Environment Temurin-20.0.1+9 (build 20.0.1+9)
OpenJDK 64-Bit Server VM Temurin-20.0.1+9 (build 20.0.1+9, mixed mode, sharing)

@lefou lefou mentioned this issue May 5, 2023
@lefou lefou added this to the 0.11.0-M9 milestone May 5, 2023
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 a pull request may close this issue.

4 participants