On Thu, 25 Sep 2025 07:09:37 GMT, Ravi-Patel8 <[email protected]> wrote:

> Bug Ref: https://bugs.openjdk.org/browse/JDK-8368606
> 
> As part of [JDK-8344057](https://bugs.openjdk.org/browse/JDK-8344057) 
> ("Remove doPrivileged calls from unix platform sources in the java.desktop 
> module"), changes were made to execCmd() in
>  `src/java.desktop/unix/classes/sun/print/PrintServiceLookupProvider.java`.
> In the updated implementation, execCmd(...) code is missing to initialize the 
> results variable. It declares it as null and then tries to results.add(line), 
> which prevents the results list from being populated with printer names.
> 
> Initializing the results variable will resolve the issue.
> 
> 
> Signed-off-by: Ravi.Patel8 <[email protected]>

This pull request has now been integrated.

Changeset: 9b1633de
Author:    Ravi.Patel8 <[email protected]>
Committer: Harshitha Onkar <[email protected]>
URL:       
https://git.openjdk.org/jdk/commit/9b1633ded0e1d952ef13c054b6c507149d22f8cd
Stats:     5 lines in 1 file changed: 4 ins; 0 del; 1 mod

8368606: Printer lookup returns empty on AIX platform due to uninitialized 
results list

Reviewed-by: honkar, serb

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

PR: https://git.openjdk.org/jdk/pull/27482

Reply via email to