From 1c3a0e9dd9f5bb14378d99eee9ed261ce24fc4d3 Mon Sep 17 00:00:00 2001 From: Jonathan Cowper-Andrewes Date: Mon, 12 Oct 2009 11:53:18 +0100 Subject: 6876517 PRINTMGR still produces java.lang.NullPointerException error --- .../cmd/print/printmgr/com/sun/admin/pm/server/DoPrinterView.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'usr/src/cmd/print') diff --git a/usr/src/cmd/print/printmgr/com/sun/admin/pm/server/DoPrinterView.java b/usr/src/cmd/print/printmgr/com/sun/admin/pm/server/DoPrinterView.java index 6f4f37cc15..d3446bb6bd 100644 --- a/usr/src/cmd/print/printmgr/com/sun/admin/pm/server/DoPrinterView.java +++ b/usr/src/cmd/print/printmgr/com/sun/admin/pm/server/DoPrinterView.java @@ -19,9 +19,8 @@ * CDDL HEADER END */ /* - * ident "%Z%%M% %I% %E% SMI" * - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. * * DoPrinterView class @@ -223,7 +222,7 @@ public class DoPrinterView { o = o.concat("\n"); comment = getToken(o, "\tDescription:"); - if (comment.equals("")) { + if (comment == null || comment.equals("")) { comment = null; } @@ -415,7 +414,7 @@ public class DoPrinterView { // If the device is in URI form (scheme:// ...), set the protocol // for the "network attached" modify screen. // - if (device.indexOf("://") != -1) { + if (device != null && device.indexOf("://") != -1) { protocol = "uri"; destination = device; device = null; -- cgit v1.2.3