RFR: 8349350: Unable to print using InputSlot and OutputBin print attributes at the same time [v7]
Phil Race
prr at openjdk.org
Mon Mar 10 18:22:07 UTC 2025
On Mon, 10 Mar 2025 13:28:16 GMT, GennadiyKrivoshein <duke at openjdk.org> wrote:
>> Fix for https://bugs.openjdk.org/browse/JDK-8349350. It's impossible to use more that one print option.
>>
>> **Reason of the bug**:
>> execCmd array uses one index per print flag, but 'OPTIONS' flag can use two indexes for the options.
>>
>> **Fix description**:
>> make the size of the execCmd array dependent on the number of options.
>>
>> **Test**:
>> new test PrintExecCmdOptionTest.java created to check execution with multiple options. (run on MacOS, Windows and linux x86_64)
>
> GennadiyKrivoshein has updated the pull request incrementally with one additional commit since the last revision:
>
> align UnixPrintJob with PSPrinterJob
test/jdk/javax/print/UnixPrintJobOptionsTest.java line 131:
> 129: }
> 130: }
> 131: if (!success) {
Maybe it would be more robust to wrap everything in a try block with a finally to restore the printstream.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23457#discussion_r1987803814
More information about the client-libs-dev
mailing list