On Mon, 11 Mar 2024 10:05:41 GMT, Tejesh R <t...@openjdk.org> wrote: > Fix suggested in bug > [8210807](https://github.com/openjdk/jdk/commit/38bbbe7588c94d3a0edd1c120ba49cbd0851a720) > had a regression in Nimbus L&F yet it resolved the issue in other L&F. The > better approach would be to handle `MultiResolutionImages `in `PathGraphics` > class `getBufferedImage` method and is suggested here. The fix doesn't cause > any regression and is verified in CI system. The test > javax/swing/JTable/JTableScrollPrintTest.java is verified for all platforms > and all L&F (Except in Windows it doesn't work due an issue introduced in 22, > yet to investigate on it). And also fix > [8210807](https://github.com/openjdk/jdk/commit/38bbbe7588c94d3a0edd1c120ba49cbd0851a720) > has been reverted, retaining the test.
guess we need a testcase even if manual src/java.desktop/share/classes/sun/print/PathGraphics.java line 1137: > 1135: return ((VolatileImage)img).getSnapshot(); > 1136: } else if (img instanceof MultiResolutionImage) { > 1137: return convertToBufferedImage((MultiResolutionImage) img, guess this casting is not needed.. src/java.desktop/share/classes/sun/print/PathGraphics.java line 1138: > 1136: } else if (img instanceof MultiResolutionImage) { > 1137: return convertToBufferedImage((MultiResolutionImage) img, > 1138: img.getWidth(null), > img.getHeight(null)); Any particular reason of using getWidth/getHeight(null) as seems like in spec, this observer parameter is ignored so we can directly use getWIdth/getHeight, I presume... ------------- PR Review: https://git.openjdk.org/jdk/pull/18187#pullrequestreview-1976081715 PR Review Comment: https://git.openjdk.org/jdk/pull/18187#discussion_r1549294617 PR Review Comment: https://git.openjdk.org/jdk/pull/18187#discussion_r1549296560