-
Notifications
You must be signed in to change notification settings - Fork 14
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
System lambda is incompatible with JDK 16. #23
Comments
See also webcompere/system-stubs#32
At this point, it looks like the JDK folks are closing the loophole which allows us to hack the environment variables. A longer-term solution may be to somehow statically mock |
…nning tests to allow the system-rules package to operate properly
With Java 17 comes JEP 403: Strongly Encapsulate JDK Internals (JDK-8266851). Quoting from the release-notes:
E.g. |
Just wondering if there is any update on this - These mocking rules are invaluable, so it's disappointing to see that they don't play well with the latest Long Term Java release |
According to @TheSnoozer reply, this snippet for maven permits to execute JUnit tests without problems <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<dependencies>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
</dependency>
</dependencies>
<configuration>
<argLine>--add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED</argLine>
</configuration>
</plugin> |
@henryx - this will undoubtedly be a temporary measure - it essentially continues Java supporting the core illegal reflective access that it's trying to rule out. |
https://github.com/webcompere/system-stubs which started life as a fork of this project has now a solution which does not use reflection. However, it does use |
Any news on this? Would love to be able to use jdk17 |
There's limited support (single threaded only) for this in https://github.com/webcompere/system-stubs - @stefanbirkner is welcome to steal the implementation from the above to retrofit to system lambda. System stubs supports all of system lambda's original functionality and to adopt it you'd just need to switch the package imports. |
What does that configuration inside argLine really do? |
I'm seeing:
Any work arounds?
The text was updated successfully, but these errors were encountered: