summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-10-16 04:30:17 (EDT)
committerEike Stepper2007-10-16 04:30:17 (EDT)
commit589af0e0fe3b00c66cbeb4c48a394c8ae17ef631 (patch)
tree03c27614fc1f64ea0592e21b839c1454d97e8a3b
parentfd1c450a19408528d288d9472cd49e0053d84359 (diff)
downloadcdo-589af0e0fe3b00c66cbeb4c48a394c8ae17ef631.zip
cdo-589af0e0fe3b00c66cbeb4c48a394c8ae17ef631.tar.gz
cdo-589af0e0fe3b00c66cbeb4c48a394c8ae17ef631.tar.bz2
[206224] Provide chat example
https://bugs.eclipse.org/bugs/show_bug.cgi?id=206224
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/StringUtil.java1
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/Buffer.java7
2 files changed, 4 insertions, 4 deletions
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/StringUtil.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/StringUtil.java
index 4e5df28..c482256 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/StringUtil.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/StringUtil.java
@@ -16,6 +16,7 @@ package org.eclipse.net4j.util;
public final class StringUtil
{
public static final String EMPTY = "";
+ public static final String NL = System.getProperty("line.separator"); //$NON-NLS-1$
private StringUtil()
{
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/Buffer.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/Buffer.java
index 4640e3b..2309165 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/Buffer.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/Buffer.java
@@ -16,6 +16,7 @@ import org.eclipse.net4j.IBufferProvider;
import org.eclipse.net4j.internal.util.om.trace.ContextTracer;
import org.eclipse.net4j.util.HexUtil;
import org.eclipse.net4j.util.ReflectUtil;
+import org.eclipse.net4j.util.StringUtil;
import org.eclipse.internal.net4j.bundle.OM;
@@ -35,8 +36,6 @@ public class Buffer implements IBuffer
private static final ContextTracer TRACER = new ContextTracer(OM.DEBUG_BUFFER, Buffer.class);
- private static final String NL = System.getProperty("line.separator"); //$NON-NLS-1$
-
private IBufferProvider bufferProvider;
private short channelIndex;
@@ -184,7 +183,7 @@ public class Buffer implements IBuffer
if (TRACER.isEnabled())
{
TRACER.trace("Read " + byteBuffer.limit() + " bytes" //$NON-NLS-1$ //$NON-NLS-2$
- + (eos ? " (EOS)" : "") + NL + formatContent()); //$NON-NLS-1$ //$NON-NLS-2$
+ + (eos ? " (EOS)" : "") + StringUtil.NL + formatContent()); //$NON-NLS-1$ //$NON-NLS-2$
}
byteBuffer.flip();
@@ -243,7 +242,7 @@ public class Buffer implements IBuffer
if (TRACER.isEnabled())
{
TRACER.trace("Writing " + (Math.abs(payloadSize) - 1) + " bytes" //$NON-NLS-1$ //$NON-NLS-2$
- + (eos ? " (EOS)" : "") + NL + formatContent()); //$NON-NLS-1$ //$NON-NLS-2$
+ + (eos ? " (EOS)" : "") + StringUtil.NL + formatContent()); //$NON-NLS-1$ //$NON-NLS-2$
}
byteBuffer.flip();