From ccd57b218a76f0e6060ed590f04ffd69bdf8f583 Mon Sep 17 00:00:00 2001 From: Gavin Cornwell Date: Thu, 16 Feb 2006 16:20:20 +0000 Subject: [PATCH] Fixed NullPointerException git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2417 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../component/debug/BaseDebugComponent.java | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/source/java/org/alfresco/web/ui/common/component/debug/BaseDebugComponent.java b/source/java/org/alfresco/web/ui/common/component/debug/BaseDebugComponent.java index b86fd5839b..b28c67de78 100644 --- a/source/java/org/alfresco/web/ui/common/component/debug/BaseDebugComponent.java +++ b/source/java/org/alfresco/web/ui/common/component/debug/BaseDebugComponent.java @@ -69,16 +69,24 @@ public abstract class BaseDebugComponent extends SelfRenderingComponent out.write(""); out.write(key.toString()); out.write(""); - String value = session.get(key).toString(); - if (value == null || value.length() == 0) + Object obj = session.get(key); + if (obj == null) { - out.write(" "); + out.write("null"); } else { - // replace any ; characters with ; as that will help break up long lines - value = value.replaceAll(";", "; "); - out.write(value); + String value = obj.toString(); + if (value.length() == 0) + { + out.write(" "); + } + else + { + // replace any ; characters with ; as that will help break up long lines + value = value.replaceAll(";", "; "); + out.write(value); + } } out.write(""); }