On Mon, 28 Nov 2022 20:25:19 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: > > review changes src/java.desktop/share/classes/javax/swing/plaf/metal/MetalBorders.java line 267: > 265: } > 266: > 267: AffineTransform at = null; Because we'd no longer be causing a `ClassCastException` from casting this to be a `Graphics2D` object, later down on line 311, if the `Graphics` object isn't a G2D type, then it will throw an NPE. I fear matrices, so I have no idea what the value of `getScaleX()` would be otherwise--replace it with zero if null? ------------- PR: https://git.openjdk.org/jdk/pull/11305