Thank you, Prasanta! Could you please add this or similar explanation to that JDK-8058316? Please use all the words/phrases a desperate tester would search. If we cannot have a regression test we should have enough search terms to find this bug in case of (apparent) regression.
-yan On 03/03/2016 01:39 PM, prasanta sadhukhan wrote:
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