summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaspar De Groot2010-02-21 21:31:05 (EST)
committerCaspar De Groot2010-02-21 21:31:05 (EST)
commit3a639d18614497519f4b8581b7bb9f80fcbacfe6 (patch)
tree323fbb3c6d5deca27ee3dd64f434a97d28d7d276
parent0882cad45629dece0f1747286563bec927a031f5 (diff)
downloadcdo-3a639d18614497519f4b8581b7bb9f80fcbacfe6.zip
cdo-3a639d18614497519f4b8581b7bb9f80fcbacfe6.tar.gz
cdo-3a639d18614497519f4b8581b7bb9f80fcbacfe6.tar.bz2
[303037] Net4J stream tracing broken
https://bugs.eclipse.org/bugs/show_bug.cgi?id=303037
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/buffer/BufferOutputStream.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/buffer/BufferOutputStream.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/buffer/BufferOutputStream.java
index 6b277dd..961cabb 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/buffer/BufferOutputStream.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/buffer/BufferOutputStream.java
@@ -98,6 +98,10 @@ public class BufferOutputStream extends OutputStream
flushIfFilled();
ensureBuffer();
+ // If this was called with a primitive byte with a negative value,
+ // the implicit conversion prepended 24 leading 1's. We'll undo those.
+ b = b & 0xFF;
+
if (TRACER.isEnabled())
{
TRACER.trace("--> " + HexUtil.formatByte(b) //$NON-NLS-1$