RFR: 8373239: Test java/awt/print/PrinterJob/PageRanges.java fails with incorrect selection of printed pages [v2]

Prasanta Sadhukhan psadhukhan at openjdk.org
Wed Jan 21 06:27:43 UTC 2026


On Tue, 20 Jan 2026 22:36:02 GMT, Phil Race <prr at openjdk.org> wrote:

>> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Remove PageRange attribute if range is not set
>
> src/java.desktop/windows/classes/sun/awt/windows/WPrinterJob.java line 1737:
> 
>> 1735:                 setPageRange(from, to);
>> 1736:             } else {
>> 1737:                 attributes.add(new PageRanges(1, 9999));
> 
> Win32PrintService uses
>  new PageRanges(1, Integer.MAX_VALUE);
> 
> But in this case, don't you just want to remove the attribute (?) if it exists that is.

Yes, I guess it's more apt..Updated..

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/29312#discussion_r2711133712


More information about the client-libs-dev mailing list