-
Notifications
You must be signed in to change notification settings - Fork 78
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
Replace static com.sun.awt.AWTUtilities
methods with Java 11 equivalents
#544
Replace static com.sun.awt.AWTUtilities
methods with Java 11 equivalents
#544
Conversation
com.sun.awt.AWTUtilities
methods with Java 11 equivalents
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.
Great to see, thanks! I've pushed up a few small polishing commits, mostly to remove the context sensitive templates where we can avoid them (better for type attribution and performance), as well as remove the need to define method patterns in yaml again (less chance of misconfiguration, as we saw a misplaced 1(
slip in.
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.
Looks good. Thanks for working on this Anu
What's changed?
RecipeName: org.openrewrite.java.migrate.ReplaceComSunAWTUtilitiesMethods
The following classes are not available in Java SE 11:
com.sun.awt.AWTUtilities
According to https://bugs.openjdk.org/browse/JDK-8187253, there are replacements available.
This recipe replaces several static calls in
com.sun.awt.AWTUtilities
with the JavaSE 11 equivalent. The methods replaced areAWTUtilities.isTranslucencySupported()
,AWTUtilities.setWindowOpacity()
,AWTUtilities.getWindowOpacity()
,AWTUtilities.getWindowShape()
,AWTUtilities.isWindowOpaque()
,AWTUtilities.isTranslucencyCapable()
andAWTUtilities.setComponentMixingCutoutShape()
.What's your motivation?
Java 11 Migration
Any additional context
Attaching rewrite.patch
rewrite.patch
Checklist