RFR: 8349350: Unable to print using InputSlot and OutputBin print attributes at the same time

Prasanta Sadhukhan psadhukhan at openjdk.org
Fri Feb 7 07:49:55 UTC 2025


On Wed, 5 Feb 2025 07:03:26 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)

src/java.desktop/share/classes/sun/print/PSPrinterJob.java line 1578:

> 1576:         }
> 1577:         if (options != null && !options.isEmpty()) {
> 1578:             optionArgs = options.trim().split("\\s+");

In what format the options are expected for this regex to work? Is it same for both linux and mac?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23457#discussion_r1946078572


More information about the client-libs-dev mailing list