RFR: 8363889: Update sun.print.PrintJob2D to use Disposer [v2]
Phil Race
prr at openjdk.org
Fri Aug 1 21:46:38 UTC 2025
On Fri, 1 Aug 2025 12:40:40 GMT, Alexander Zvegintsev <azvegint at openjdk.org> wrote:
>> 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.
Moving part of this comment back over to PrintJob2D.
> 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.
because the method just returns false the delegate wasn't needed.
I decided to make it call the delegate anyway for consistency so now it is used.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26432#discussion_r2248902770
PR Review Comment: https://git.openjdk.org/jdk/pull/26432#discussion_r2248914068
More information about the client-libs-dev
mailing list