On Fri, 7 Feb 2025 08:24:54 GMT, GennadiyKrivoshein <d...@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: > > replace regexp s+ with space src/java.desktop/share/classes/sun/print/PSPrinterJob.java line 1641: > 1639: execCmd[n++] = "-o job-sheets=standard"; > 1640: } > 1641: if (optionArgs != null) { I see this block is the same in both branches of the if condition. Can we just move it outside the condition to keep it simpler? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23457#discussion_r1951651839