On Tue, 29 Nov 2022 20:05:49 GMT, Harshitha Onkar <hon...@openjdk.org> wrote:
>> Updated Metal Border code for JInternalFrame. >> >> - Added instanceof check before casting Graphics to G2D. >> - Replaced roundHalfDown with Region.clipRound() > > Harshitha Onkar has updated the pull request incrementally with one > additional commit since the last revision: > > added scaleFactor src/java.desktop/share/classes/javax/swing/plaf/metal/MetalBorders.java line 277: > 275: at = g2d.getTransform(); > 276: scaleFactor = at.getScaleX(); > 277: oldColor = g2d.getColor(); Color wasn't preserved before [JDK-8015739](https://bugs.openjdk.org/browse/JDK-8015739). Getting and setting the color doesn't require `Graphics2D`, so, if it's to be preserved, it should be preserved outside of `instanceof`. ------------- PR: https://git.openjdk.org/jdk/pull/11305