[OpenJDK 2D-Dev] [9]: RFR JDK-8058316, , lookupDefaultPrintService returns null on Solaris 11

prasanta sadhukhan prasanta.sadhukhan at oracle.com
Thu Mar 3 10:39:09 UTC 2016


Hi Phil,

Bug: https://bugs.openjdk.java.net/browse/JDK-8058316
webrev: http://cr.openjdk.java.net/~psadhukhan/8058316/webrev.00/

The issue was on some Solaris 11 hosts lookupDefaultPrintService() 
returns null while lpstat -d reports an ipp printer.
The issue was found to exist in linux too since it uses CUPS.

What was happening was that CUPSPrinter.java#getDefaultPrinter() 
searches for server-defined default destination by connection to CUPS 
server but
if the user sets the default printer using "lpoptions -d <printername>" 
command, server will not have any knowledge of this settings and this 
user-set default printer (which is stored in ~/.cups/lpoptions file) was 
not searched
and getDefaultPrinter() returns null since it could not find any server 
default printer.

Fix is to call cupsGetDest API to search for a lpoptions-defined default 
printer and if not set, then search for server-defined destination.

I could not provide a regression testcase for this as it involves 
setting default printer using lpoptions command.

Regards
Prasanta




More information about the 2d-dev mailing list