-
Notifications
You must be signed in to change notification settings - Fork 21
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
Java 1.11 Compatibility #29
Comments
This might be of help. https://blog.codefx.org/java/java-9-migration-guide/ |
Actually, better to target Java 11 now... |
A lot of the problem seems to be down to the use of reflection and new security settings. It's not clear that there is a way to avoid reflection in this case (that major culprit is adding timeouts to junit tests - this needs access to java.lang.reflect.Executable in JUnitBridge.annotateTestWithTimeout()) You can see the warning if you build gin and run this: A workaround is using the JVM option Like this: I've implemented some fixes to kill the warnings for the unit tests. I would appreciate if someone can try the origin/java11-debug branch and report two things:
|
before upgrade release stable version with Java 8 and create a branch for future bug fixing with Java 8 |
The plan is to upgrade to Java 14 at this point. Working version ready - the profiler - hprof no longer supportedm, so needs an upgrade. https://docs.oracle.com/en/java/javase/14/troubleshoot/diagnostic-tools.html#GUID-CBC97A20-7379-4762-BA17-FB1A560D02E4 |
let's stick to LTS releases |
I just pushed a new branch (https://github.com/gintool/gin/tree/no-reflection-junit5). With this new code, the need for reflection is removed by simply adding a configuration parameter with a global timeout. However, the new requirement is that test cases MUST be written with JUnit 5's annotations. The timeout configuration parameter only works with the JUnit 5's engine, not with JUnit 4's. JUnit 4's test cases must still be changed with reflection to include timeouts. Another detail: when a test case has a @timeout annotation, it overwrites the configuration parameter set by me. It kind of makes sense, since the author of the test case might want to set a timeout for a slow test anyway. |
PR #91 has updated the profiler to support Java Flight Recorder for Java versions >8. Test timeout / reflection issue seems to be the only remaining upgrade needed for newer Java. |
Woo hoo! Support for 17 added by 16b2b89 |
A few people have reported problems with future versions of the JDK and Gin. This could be a regression, but we should do some proper evaluation and work out what's going on.
The text was updated successfully, but these errors were encountered: