-
Notifications
You must be signed in to change notification settings - Fork 16
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 9 compatibility broken for QuaquaTextFieldFocusHandler #11
Comments
Not currently as I wasn’t aware of the issue! Could you please provide more details? If you’d like to provide a fix it would be welcome. |
I am not sure how this could be solved without breaking the compatibility with earlier versions than Java 9... Here is the actual code from master that is compatible with Java 8:
And here is the code that is compatible with Java 9 but breaks Java 8 compatibility:
The problem is that in Java 9 the class sun.awt.CausedFocusEvent does not exist anymore (it was removed) while in Java 8 the method java.awt.event.FocusEvent.getCause() is not available since it was added in Java 9. Any idea how we could solve this problem? |
We can test for the existence of |
I do not think this is possible because you get an error even when you just import that class... The right solution I think it would be to generate a multi-release jar with both implementations. But that would mean more changes regarding the structure of the project and the ant scripts. Details at http://openjdk.java.net/jeps/238 |
Is the error that you get when you import the class about it being restricted? |
This is the error on import: "The type sun.awt.CausedFocusEvent is not visible". And the same goes for class sun.awt.CausedFocusEvent.Cause... It is pretty easy to see these errors if you take the latest code from master and use it with Java 9. |
Could the code that uses CausedFocusEvent be changed to work purely with reflection? In that way it wouldn't need to import the restricted class and could avoid this error. |
I was trying Quaqua 9.1 with Java 9 today & i've got the same issue! |
Are there plans for fixing the compatibility with Java 9 for class QuaquaTextFieldFocusHandler?
The text was updated successfully, but these errors were encountered: