-
Notifications
You must be signed in to change notification settings - Fork 70
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
1.19.0 version > Warning during library use in JUnit 4 about illegal access operations #87
Comments
@olivierlemee I am having same issues , any resolution or fix you got ? |
It seems that 1.19.0 is not compatible with newer JDKs. We are trying to upgrade to JDK 17 and we also get this error in our JUnit 4 tests.
Are there any plans to bring this quite useful library up to work with newer JDKs? |
This is also blocking JVM version upgrading for me. Here's a quick work around if you're using Gradle, but surely the JVM devs have a recommended work around going forward for the Java APIs. test {
// Allow com.github.stefanbirkner:system-rules to work until the Java 17+ support is fixed - https://github.com/stefanbirkner/system-rules/issues/87
jvmArgs ('--add-opens', 'java.base/java.util=ALL-UNNAMED', '--add-opens', 'java.base/java.lang=ALL-UNNAMED')
} |
Hello, when we use the library for environment variable into a JUnit 4 (4.13.2 version) test case, a warning log is thrown as:
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.junit.contrib.java.lang.system.EnvironmentVariables (file:/Users/olivier/.m2/repository/com/github/stefanbirkner/system-rules/1.19.0/system-rules-1.19.0.jar) to field java.util.Collections$UnmodifiableMap.m
WARNING: Please consider reporting this to the maintainers of org.junit.contrib.java.lang.system.EnvironmentVariables
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
The text was updated successfully, but these errors were encountered: