From e4ba71404abcce33d4c56347ac61808e084b45e8 Mon Sep 17 00:00:00 2001 From: Adrian Crum Date: Mon, 21 Jul 2014 07:50:08 +0000 Subject: [PATCH] Fixed a bug in Mini-Language where a NPE could be thrown while using Verbose logging: https://issues.apache.org/jira/browse/OFBIZ-5689. git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1612205 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/org/ofbiz/minilang/method/envops/Iterate.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/framework/minilang/src/org/ofbiz/minilang/method/envops/Iterate.java b/framework/minilang/src/org/ofbiz/minilang/method/envops/Iterate.java index f011241d52..062f5c447f 100644 --- a/framework/minilang/src/org/ofbiz/minilang/method/envops/Iterate.java +++ b/framework/minilang/src/org/ofbiz/minilang/method/envops/Iterate.java @@ -155,8 +155,10 @@ public final class Iterate extends MethodOperation { } } } else { - if (Debug.verboseOn()) - Debug.logVerbose("Cannot iterate over a " + objList.getClass().getName() + ", doing nothing: " + this, module); + if (Debug.verboseOn()) { + Debug.logVerbose("Cannot iterate over a " + objList == null ? "null object" : objList.getClass().getName() + + ", doing nothing: " + this, module); + } return true; } entryFma.put(methodContext.getEnvMap(), oldEntryValue);