-
Notifications
You must be signed in to change notification settings - Fork 683
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
fix(tests): issue #1200, added testing compatibility for jdk9+ #1245
Conversation
Hi SomelifeDev, I confirm this solves the There is an additional warning that I'm not qualified enough to say if it's important or not : So, thanks a lot ! I am looking forward this fix to be merged since it would finally allows us to use Play 1.x with more recent versions of JDK. |
I would say that I'm equally unqualified to resolve :) but looking at the javassist release notes, v3.22 introduced support for JDK 9 and the latest GA release is v3.23.1. If it's possible to upgrade javassist then that's probably worth doing. If that's not possible or doesn't resolve it then it's possible to open up the required modules for javaasist which can be found in this migration guide - see slide 16 and 31. |
Hi Chris, thank you for the quick reply ! Please tell me if the pull request is ok or if I should have done something differently, I'm not that much used to contribute, yet ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SomelifeDev is there a unit-test for class Controller
? It would be a good practice to add one more test-case to that unit-test.
Connecting this to #1200 |
Hey, glad it works and great one for the update on the javassist: quite obvious but nobody bothered apparently, until now. @asolntsev hmm, not sure to be honest. This is just to fix the inability to use the built-in play test system on jdk 9+ |
@SomelifeDev it's not that we did not bother, but personally I had no idea of how to fix this initially ! So thank you for having unblocked the situation. |
@tomparle @SomelifeDev Regarding a unit-test. I mean, in normal situation I would
static boolean shouldNotBeEnhanced(String className) {
return className.startsWith("sun.") || className.startsWith("play.");
}
@Test
public void jdkAndPlayClassesShouldNeverBeenEnhanced() {
assertTrue(shouldNotBeEnhanced("sun.blah"));
assertTrue(shouldNotBeEnhanced("play.foo"));
assertFalse(shouldNotBeEnhanced("com.bar"));
} But in this case I guess we can omit this step because there is so much code that is not covered by unit-tests at all. |
@asolntsev thanks for your test suggestion, sounds right to me, especially because it enlightens the "ignore for enhancement" mechanism, which is otherwise kind of hidden in Play internals. |
@asolntsev and @tomparle |
@SomelifeDev Great work, thank you!
|
@asolntsev done and done. |
@SomelifeDev Thank you! Merged. |
@SomelifeDev thank you for the fix and having taken into account @asolntsev 's suggestions ! |
@@ -1252,6 +1252,17 @@ private static void verifyContinuationsEnhancement() { | |||
} | |||
} | |||
|
|||
|
|||
/** | |||
* Checks if the classname is from the jdk, sun or play package and therefore should not be checked for enhancement |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for being late to the party but this comment feels counter intuitive. It states that if the class name package is jdk, sun or play then it should NOT be checked for enhancement. As the method returns true if any of those packages match then shouldn't the method be shouldNotBeCheckedForEnhancement()
? Or am I having a brain fart here :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, good point. I already fixed it in master branch.
@tazmaniax |
…removing the workaround that was fixed in latest version of javassist * upgraded javassist to 3.23.1-GA to suppress warning with JDK9+
[#1245] Fix public/protected testing with Javassist, by removing the workaround that was fixed in latest version of javassist
This solves the "await/Continuations error" when trying to run tests in if you're using jdk9+