There is a some unused code in SunGraphics2D which can be removed: - The private static variable `slowTextTransformMask` is never used. - In `checkFontInfo`, the variable `txFontType` is never used. - The public static method `isRotated` is never used. - The commented out method `XcopyArea` is never used (and has been commented out for 19+ years). - The method `transformBounds` is never used (it was used by `XcopyArea` but was never deleted or commented out).
Additionally, there are quite a few `instanceof`s + casts which could benefit from `instanceof` pattern matching. (I've been spending some time in this area of the code figuring out some of the remaining macOS printing issues, and these rough edges kept catching my eye, so I figured it was better to spin them out into a small, independent PR.) ------------- Commit messages: - Remove unused code, use instanceof pattern matching Changes: https://git.openjdk.org/jdk/pull/30191/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=30191&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8379778 Stats: 128 lines in 1 file changed: 0 ins; 103 del; 25 mod Patch: https://git.openjdk.org/jdk/pull/30191.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/30191/head:pull/30191 PR: https://git.openjdk.org/jdk/pull/30191
