From 36f5c84ded1ad93834af5145d924f54ae9d1cb6a Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Wed, 17 Aug 2011 01:17:00 +0800 Subject: [PATCH] Fixed potential NPE in toString, there's no guarantee that getValue() is always not null. (transplanted from 225e3d761e2706d6c95c0cd4a1e269cea528392e) --- .../WEB-INF/src/org/adempiere/webui/component/ListItem.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ListItem.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ListItem.java index 9b8d069903..b515501161 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ListItem.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ListItem.java @@ -1,5 +1,5 @@ /****************************************************************************** - * Product: Posterita Ajax UI * + * Product: Posterita Ajax UI * * Copyright (C) 2007 Posterita Ltd. All Rights Reserved. * * This program is free software; you can redistribute it and/or modify it * * under the terms version 2 of the GNU General Public License as published * @@ -62,7 +62,7 @@ public class ListItem extends org.zkoss.zul.Listitem @Override public String toString() { - return getValue().toString(); + return getValue() != null ? getValue().toString() : ""; } - + }