From 2b93640a3ee2f5f9729965682204e054ca722053 Mon Sep 17 00:00:00 2001 From: jgodinez Date: Mon, 19 Aug 2013 11:21:19 -0700 Subject: [PATCH] 8022241: [macosx] [PIT] lookupPrintServices() returns one too long array Reviewed-by: prr, jchen --- .../sun/print/UnixPrintServiceLookup.java | 32 +++++++++++++------ 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/src/solaris/classes/sun/print/UnixPrintServiceLookup.java b/src/solaris/classes/sun/print/UnixPrintServiceLookup.java index 2c2a64062..54dc8b666 100644 --- a/src/solaris/classes/sun/print/UnixPrintServiceLookup.java +++ b/src/solaris/classes/sun/print/UnixPrintServiceLookup.java @@ -245,7 +245,7 @@ public class UnixPrintServiceLookup extends PrintServiceLookup continue; } if ((defaultPrintService != null) - && printers[p].equals(defaultPrintService.getName())) { + && printers[p].equals(getPrinterDestName(defaultPrintService))) { printerList.add(defaultPrintService); defaultIndex = printerList.size() - 1; } else { @@ -270,11 +270,12 @@ public class UnixPrintServiceLookup extends PrintServiceLookup } else { int j; for (j=0; j