diff options
author | slewis | 2011-05-09 22:59:04 +0000 |
---|---|---|
committer | slewis | 2011-05-09 22:59:04 +0000 |
commit | 87c2a01f8d12208a981c278ebd2630559a4eba31 (patch) | |
tree | 9a8b987311f3d57079406ad319178efd8693b2aa /framework/bundles/org.eclipse.ecf.identity/src/org | |
parent | 63505c009d0d548c1bd078c5cdcc866cf112679d (diff) | |
download | org.eclipse.ecf-87c2a01f8d12208a981c278ebd2630559a4eba31.tar.gz org.eclipse.ecf-87c2a01f8d12208a981c278ebd2630559a4eba31.tar.xz org.eclipse.ecf-87c2a01f8d12208a981c278ebd2630559a4eba31.zip |
Added null check in Trace support class.
Diffstat (limited to 'framework/bundles/org.eclipse.ecf.identity/src/org')
-rw-r--r-- | framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/Trace.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/Trace.java b/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/Trace.java index 2692b7257..8de74db23 100644 --- a/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/Trace.java +++ b/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/Trace.java @@ -400,7 +400,11 @@ public class Trace { if (shouldTrace(pluginId, option)) { StringBuffer buf = new StringBuffer(PREFIX_CATCHING); - buf.append(throwable.getMessage()).append(SEPARATOR_SPACE); + if (throwable != null) { + String message = throwable.getMessage(); + if (message != null) + buf.append(message).append(SEPARATOR_SPACE); + } buf.append(PARENTHESIS_OPEN).append(clazz.getName()) .append(SEPARATOR_METHOD); buf.append(methodName).append(PARENTHESIS_CLOSE); @@ -431,7 +435,11 @@ public class Trace { if (shouldTrace(pluginId, option)) { StringBuffer buf = new StringBuffer(PREFIX_THROWING); - buf.append(throwable.getMessage()).append(SEPARATOR_SPACE); + if (throwable != null) { + String message = throwable.getMessage(); + if (message != null) + buf.append(message).append(SEPARATOR_SPACE); + } buf.append(PARENTHESIS_OPEN).append(clazz.getName()) .append(SEPARATOR_METHOD); buf.append(methodName).append(PARENTHESIS_CLOSE); |