From c2aba135c237eea1e05859802322aa6cb9e565a9 Mon Sep 17 00:00:00 2001 From: Jennifer Godinez 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/jdk/src/solaris/classes/sun/print/UnixPrintServiceLookup.java b/jdk/src/solaris/classes/sun/print/UnixPrintServiceLookup.java index 2c2a6406293..54dc8b666fc 100644 --- a/jdk/src/solaris/classes/sun/print/UnixPrintServiceLookup.java +++ b/jdk/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