RFR: 8363889: Update sun.print.PrintJob2D to use Disposer [v2]
Alexander Zvegintsev
azvegint at openjdk.org
Fri Aug 1 12:42:55 UTC 2025
On Tue, 22 Jul 2025 22:10:37 GMT, Phil Race <prr at openjdk.org> wrote:
>> As laid out in the JBS issue, this updates the java.awt.PrintJob implementation to use a delegate which can be disposed instead of relying on finalize().
>>
>> PrintJob.finalize() is not being removed, and won't be removed until there is a more definite plan for completely removing the finalize() mechanism.
>
> Phil Race has updated the pull request incrementally with one additional commit since the last revision:
>
> 8363889
src/java.desktop/share/classes/sun/print/PrintJobDelegate.java line 824:
> 822: */
> 823: //printGraphics = new ProxyPrintGraphics(currentGraphics.create(), this);
> 824: printGraphics = currentGraphics.create();
Do we need the comment on line 823?
> The returned Graphics also to implement PrintGraphics, so we wrap the Graphics2D instance.
That doesn't seem true anymore.
src/java.desktop/share/classes/sun/print/PrintJobDelegate.java line 876:
> 874: * Returns true if the last page will be printed first.
> 875: */
> 876: public boolean lastPageFirst() {
It appears to be unused.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26432#discussion_r2247879061
PR Review Comment: https://git.openjdk.org/jdk/pull/26432#discussion_r2247857206
More information about the client-libs-dev
mailing list