Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2007-08-10 00:52:17 -0400
committerslewis2007-08-10 00:52:17 -0400
commit426933cf2ac8ec5952c37dffcbe5fa2f7281beb6 (patch)
tree81a94cccff96ffd7f34ae3beb13b324b45f2ec35 /framework/bundles/org.eclipse.ecf.identity/src
parentd1c0df28a6d3cdac60f09c027e6c33bc9a5818c0 (diff)
downloadorg.eclipse.ecf-426933cf2ac8ec5952c37dffcbe5fa2f7281beb6.tar.gz
org.eclipse.ecf-426933cf2ac8ec5952c37dffcbe5fa2f7281beb6.tar.xz
org.eclipse.ecf-426933cf2ac8ec5952c37dffcbe5fa2f7281beb6.zip
Fix in Trace class for handling byte []s
Diffstat (limited to 'framework/bundles/org.eclipse.ecf.identity/src')
-rw-r--r--framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/Trace.java10
1 files changed, 10 insertions, 0 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 3d43914b2..b6c14f48b 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
@@ -188,12 +188,22 @@ public class Trace {
public static String getArgumentString(Object argument) {
if (argument == null)
return "null"; //$NON-NLS-1$
+ if (argument instanceof byte[]) return getStringFromByteArray((byte []) argument);
if (argument.getClass().isArray())
return getArgumentsString((Object[]) argument);
else
return String.valueOf(argument);
}
+ private static String getStringFromByteArray(byte [] bytes) {
+ StringBuffer buf = new StringBuffer("[");
+ for(int i=0; i < bytes.length; i++) {
+ buf.append(bytes[i]);
+ if (i == (bytes.length -1)) buf.append("]");
+ else buf.append(",");
+ }
+ return buf.toString();
+ }
/**
* Retrieves a textual representation of the specified arguments.
*

Back to the top