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

UnsupportedOperationException with jdk-18 #85

Open
siom79 opened this issue Jan 30, 2022 · 5 comments
Open

UnsupportedOperationException with jdk-18 #85

siom79 opened this issue Jan 30, 2022 · 5 comments

Comments

@siom79
Copy link

siom79 commented Jan 30, 2022

Under jdk-18 I get a UnsupportedOperationException:

java.lang.UnsupportedOperationException: The Security Manager is deprecated and will be removed in a future release

	at java.base/java.lang.System.setSecurityManager(System.java:416)
	at org.junit.contrib.java.lang.system.ProvideSecurityManager.before(ProvideSecurityManager.java:39)
	at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:50)
	at org.junit.contrib.java.lang.system.internal.PrintStreamRule$1$1.evaluate(PrintStreamRule.java:39)
	at org.junit.contrib.java.lang.system.internal.PrintStreamHandler$3.evaluate(PrintStreamHandler.java:44)
	at org.junit.contrib.java.lang.system.internal.PrintStreamRule$1.evaluate(PrintStreamRule.java:35)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
	at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
	at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:220)
	at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:53)
@siom79 siom79 changed the title Does not run with jdk-18 UnsupportedOperationException with jdk-18 Jan 30, 2022
@ottlinger
Copy link

Same issue while trying to upgrade to JDK18 - is there a simple workaround available or a plan to get this wonderful library to work with JDK18? Thanks

@judovana
Copy link

For now you can use -Djava.security.manager=allow but on longer run it would need majore rework - https://openjdk.java.net/jeps/411

@dkfellows
Copy link

See also: https://bugs.openjdk.org/browse/JDK-8199704 (and maybe others)

@zanzanYL
Copy link

zanzanYL commented Jan 3, 2024

Bumped into same error when upgrading to jdk 21

@zanzanYL
Copy link

zanzanYL commented Jan 3, 2024

I am only using ExpectedSystemExit from system-rules. If there is alternative to this, please let me know!

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

No branches or pull requests

5 participants