Update of /var/cvs/src/org/mmbase/util In directory james.mmbase.org:/tmp/cvs-serv29425
Modified Files: LocalizedEntryListFactory.java Log Message: avoid NPE if node happens to be null See also: http://cvs.mmbase.org/viewcvs/src/org/mmbase/util Index: LocalizedEntryListFactory.java =================================================================== RCS file: /var/cvs/src/org/mmbase/util/LocalizedEntryListFactory.java,v retrieving revision 1.54 retrieving revision 1.55 diff -u -b -r1.54 -r1.55 --- LocalizedEntryListFactory.java 4 Sep 2008 11:49:20 -0000 1.54 +++ LocalizedEntryListFactory.java 26 Jan 2009 16:35:09 -0000 1.55 @@ -38,7 +38,7 @@ * partially by explicit values, though this is not recommended. * * @author Michiel Meeuwissen - * @version $Id: LocalizedEntryListFactory.java,v 1.54 2008/09/04 11:49:20 michiel Exp $ + * @version $Id: LocalizedEntryListFactory.java,v 1.55 2009/01/26 16:35:09 michiel Exp $ * @since MMBase-1.8 */ public class LocalizedEntryListFactory<C> implements Serializable, Cloneable { @@ -325,7 +325,8 @@ public Map.Entry<C, String> next() { org.mmbase.bridge.Node next = nodeIterator.nextNode(); if (query instanceof NodeQuery) { - return new Entry<C, String>((C) next, next.getFunctionValue("gui", null).toString()); + String gui = next == null ? "NULL_NODE" : next.getFunctionValue("gui", null).toString(); + return new Entry<C, String>((C) next, gui); } else { String alias = Queries.getFieldAlias(query.getFields().get(0)); log.debug("using field " + alias); _______________________________________________ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs