summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-12-28 14:57:29 (EST)
committerEike Stepper2007-12-28 14:57:29 (EST)
commit50caeeda2025930b254abae263b03066cec15649 (patch)
tree6c02d8e126b193d79cee0fbad93d9f2e87bbccd1
parent4c4972753aaef371a99adaec869df57761b4b68e (diff)
downloadcdo-50caeeda2025930b254abae263b03066cec15649.zip
cdo-50caeeda2025930b254abae263b03066cec15649.tar.gz
cdo-50caeeda2025930b254abae263b03066cec15649.tar.bz2
[213782] Transaction DeadLock
https://bugs.eclipse.org/bugs/show_bug.cgi?id=213782
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/FailOverTest.java10
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/SignalTest.java29
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/TinyData.java2
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/ArrayIndication.java (renamed from plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/Indication2.java)4
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/ArrayRequest.java (renamed from plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/Request2.java)6
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/AsyncIndication.java41
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/AsyncRequest.java43
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/IntFailIndication.java (renamed from plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/Indication3.java)6
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/IntFailRequest.java (renamed from plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/Request1.java)6
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/IntIndication.java (renamed from plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/Indication1.java)4
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/IntRequest.java (renamed from plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/Request3.java)6
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/StringIndication.java43
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/StringRequest.java50
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/TestSignalProtocol.java26
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/Connector.java2
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/stream/BufferInputStream.java9
16 files changed, 247 insertions, 40 deletions
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/FailOverTest.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/FailOverTest.java
index 150f9f4..5d8d386 100644
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/FailOverTest.java
+++ b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/FailOverTest.java
@@ -13,8 +13,8 @@ package org.eclipse.net4j.tests;
import org.eclipse.net4j.IChannel;
import org.eclipse.net4j.signal.FailOverStrategy;
import org.eclipse.net4j.signal.IFailOverStrategy;
-import org.eclipse.net4j.tests.signal.Request1;
-import org.eclipse.net4j.tests.signal.Request3;
+import org.eclipse.net4j.tests.signal.IntRequest;
+import org.eclipse.net4j.tests.signal.IntFailRequest;
import org.eclipse.net4j.tests.signal.TestSignalClientProtocolFactory;
import org.eclipse.net4j.tests.signal.TestSignalServerProtocolFactory;
import org.eclipse.net4j.util.container.IManagedContainer;
@@ -45,7 +45,7 @@ public class FailOverTest extends AbstractTransportTest
IFailOverStrategy failOverStrategy = new FailOverStrategy();
// Exception HERE
- Request1 request = new Request1(channel, data);
+ IntRequest request = new IntRequest(channel, data);
int result = failOverStrategy.send(request);
assertEquals(data, result);
@@ -60,7 +60,7 @@ public class FailOverTest extends AbstractTransportTest
IFailOverStrategy failOverStrategy = new FailOverStrategy();
// Exception HERE
- Request1 request = new Request1(channel, data);
+ IntRequest request = new IntRequest(channel, data);
// Simulate a disconnect from the server.
getAcceptor().deactivate();
@@ -78,7 +78,7 @@ public class FailOverTest extends AbstractTransportTest
IFailOverStrategy failOverStrategy = new FailOverStrategy();
// Exception HERE
- Request3 request = new Request3(channel, data);
+ IntFailRequest request = new IntFailRequest(channel, data);
int result = failOverStrategy.send(request, 1000);
assertEquals(data, result);
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/SignalTest.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/SignalTest.java
index 5379add..337e7a4 100644
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/SignalTest.java
+++ b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/SignalTest.java
@@ -11,11 +11,15 @@
package org.eclipse.net4j.tests;
import org.eclipse.net4j.IChannel;
-import org.eclipse.net4j.tests.signal.Request1;
-import org.eclipse.net4j.tests.signal.Request2;
+import org.eclipse.net4j.tests.signal.ArrayRequest;
+import org.eclipse.net4j.tests.signal.AsyncRequest;
+import org.eclipse.net4j.tests.signal.IntRequest;
+import org.eclipse.net4j.tests.signal.StringRequest;
+import org.eclipse.net4j.tests.signal.TestSignalClientProtocolFactory;
import org.eclipse.net4j.tests.signal.TestSignalProtocol;
import org.eclipse.net4j.tests.signal.TestSignalServerProtocolFactory;
import org.eclipse.net4j.util.container.IManagedContainer;
+import org.eclipse.net4j.util.om.OMPlatform;
import java.util.Arrays;
@@ -28,6 +32,7 @@ public class SignalTest extends AbstractTransportTest
protected IManagedContainer createContainer()
{
IManagedContainer container = super.createContainer();
+ container.registerFactory(new TestSignalClientProtocolFactory());
container.registerFactory(new TestSignalServerProtocolFactory());
return container;
}
@@ -37,7 +42,7 @@ public class SignalTest extends AbstractTransportTest
startTransport();
IChannel channel = getConnector().openChannel(TestSignalProtocol.PROTOCOL_NAME, null);
int data = 0x0a;
- int result = new Request1(channel, data).send();
+ int result = new IntRequest(channel, data).send();
assertEquals(data, result);
}
@@ -46,7 +51,23 @@ public class SignalTest extends AbstractTransportTest
startTransport();
IChannel channel = getConnector().openChannel(TestSignalProtocol.PROTOCOL_NAME, null);
byte[] data = TinyData.getBytes();
- byte[] result = new Request2(channel, data).send();
+ byte[] result = new ArrayRequest(channel, data).send();
assertTrue(Arrays.equals(data, result));
}
+
+ public void testAsync() throws Exception
+ {
+ startTransport();
+ OMPlatform.INSTANCE.setDebugging(false);
+ IChannel channel = getConnector().openChannel(TestSignalProtocol.PROTOCOL_NAME, null);
+ String tiny = TinyData.getText();
+ String huge = HugeData.getText();
+ for (int i = 0; i < 10000; i++)
+ {
+ msg("Loop " + i);
+ new AsyncRequest(channel, tiny).send();
+ String result = new StringRequest(channel, huge).send();
+ assertEquals(huge, result);
+ }
+ }
}
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/TinyData.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/TinyData.java
index e3f0750..83fce51 100644
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/TinyData.java
+++ b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/TinyData.java
@@ -36,6 +36,6 @@ public final class TinyData
public static String getText()
{
- return "Copyright (c) 2004 - 2008 Eike Stepper, Germany. All rights reserved.";
+ return "COPYRIGHT (C) 2004 - 2008 EIKE STEPPER, GERMANY. ALL RIGHTS RESERVED.";
}
}
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/Indication2.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/ArrayIndication.java
index b592acb..4b0c65d 100644
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/Indication2.java
+++ b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/ArrayIndication.java
@@ -19,14 +19,14 @@ import java.io.IOException;
/**
* @author Eike Stepper
*/
-public class Indication2 extends IndicationWithResponse
+public class ArrayIndication extends IndicationWithResponse
{
private byte[] data;
@Override
protected short getSignalID()
{
- return TestSignalProtocol.SIGNAL2;
+ return TestSignalProtocol.SIGNAL_ARRAY;
}
@Override
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/Request2.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/ArrayRequest.java
index 10b8cb1..5a26332 100644
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/Request2.java
+++ b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/ArrayRequest.java
@@ -20,11 +20,11 @@ import java.io.IOException;
/**
* @author Eike Stepper
*/
-public class Request2 extends RequestWithConfirmation<byte[]>
+public class ArrayRequest extends RequestWithConfirmation<byte[]>
{
private byte[] data;
- public Request2(IChannel channel, byte[] data)
+ public ArrayRequest(IChannel channel, byte[] data)
{
super(channel);
this.data = data;
@@ -33,7 +33,7 @@ public class Request2 extends RequestWithConfirmation<byte[]>
@Override
protected short getSignalID()
{
- return TestSignalProtocol.SIGNAL2;
+ return TestSignalProtocol.SIGNAL_ARRAY;
}
@Override
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/AsyncIndication.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/AsyncIndication.java
new file mode 100644
index 0000000..3fc12d1
--- /dev/null
+++ b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/AsyncIndication.java
@@ -0,0 +1,41 @@
+/***************************************************************************
+ * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ **************************************************************************/
+package org.eclipse.net4j.tests.signal;
+
+import org.eclipse.net4j.signal.Indication;
+import org.eclipse.net4j.util.io.ExtendedDataInputStream;
+
+import java.io.IOException;
+
+/**
+ * @author Eike Stepper
+ */
+public class AsyncIndication extends Indication
+{
+ private String data;
+
+ @Override
+ protected short getSignalID()
+ {
+ return TestSignalProtocol.SIGNAL_ASYNC;
+ }
+
+ public String getData()
+ {
+ return data;
+ }
+
+ @Override
+ protected void indicating(ExtendedDataInputStream in) throws IOException
+ {
+ data = in.readString();
+ }
+}
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/AsyncRequest.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/AsyncRequest.java
new file mode 100644
index 0000000..b7415fc
--- /dev/null
+++ b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/AsyncRequest.java
@@ -0,0 +1,43 @@
+/***************************************************************************
+ * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ **************************************************************************/
+package org.eclipse.net4j.tests.signal;
+
+import org.eclipse.net4j.IChannel;
+import org.eclipse.net4j.signal.Request;
+import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
+
+import java.io.IOException;
+
+/**
+ * @author Eike Stepper
+ */
+public class AsyncRequest extends Request
+{
+ private String data;
+
+ public AsyncRequest(IChannel channel, String data)
+ {
+ super(channel);
+ this.data = data;
+ }
+
+ @Override
+ protected short getSignalID()
+ {
+ return TestSignalProtocol.SIGNAL_ASYNC;
+ }
+
+ @Override
+ protected void requesting(ExtendedDataOutputStream out) throws IOException
+ {
+ out.writeString(data);
+ }
+}
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/Indication3.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/IntFailIndication.java
index b3ebe5e..0911916 100644
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/Indication3.java
+++ b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/IntFailIndication.java
@@ -19,11 +19,11 @@ import java.io.IOException;
/**
* @author Eike Stepper
*/
-public class Indication3 extends IndicationWithResponse
+public class IntFailIndication extends IndicationWithResponse
{
private int data;
- public Indication3()
+ public IntFailIndication()
{
}
@@ -35,7 +35,7 @@ public class Indication3 extends IndicationWithResponse
@Override
protected short getSignalID()
{
- return TestSignalProtocol.SIGNAL3;
+ return TestSignalProtocol.SIGNAL_INT_FAIL;
}
@Override
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/Request1.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/IntFailRequest.java
index 0511fe7..fb1b729 100644
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/Request1.java
+++ b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/IntFailRequest.java
@@ -20,11 +20,11 @@ import java.io.IOException;
/**
* @author Eike Stepper
*/
-public class Request1 extends RequestWithConfirmation<Integer>
+public class IntFailRequest extends RequestWithConfirmation<Integer>
{
private int data;
- public Request1(IChannel channel, int data)
+ public IntFailRequest(IChannel channel, int data)
{
super(channel);
this.data = data;
@@ -33,7 +33,7 @@ public class Request1 extends RequestWithConfirmation<Integer>
@Override
protected short getSignalID()
{
- return TestSignalProtocol.SIGNAL1;
+ return TestSignalProtocol.SIGNAL_INT_FAIL;
}
@Override
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/Indication1.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/IntIndication.java
index 587c728..cbf0cb9 100644
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/Indication1.java
+++ b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/IntIndication.java
@@ -19,14 +19,14 @@ import java.io.IOException;
/**
* @author Eike Stepper
*/
-public class Indication1 extends IndicationWithResponse
+public class IntIndication extends IndicationWithResponse
{
private int data;
@Override
protected short getSignalID()
{
- return TestSignalProtocol.SIGNAL1;
+ return TestSignalProtocol.SIGNAL_INT;
}
@Override
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/Request3.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/IntRequest.java
index b0b4f6c..3303a00 100644
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/Request3.java
+++ b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/IntRequest.java
@@ -20,11 +20,11 @@ import java.io.IOException;
/**
* @author Eike Stepper
*/
-public class Request3 extends RequestWithConfirmation<Integer>
+public class IntRequest extends RequestWithConfirmation<Integer>
{
private int data;
- public Request3(IChannel channel, int data)
+ public IntRequest(IChannel channel, int data)
{
super(channel);
this.data = data;
@@ -33,7 +33,7 @@ public class Request3 extends RequestWithConfirmation<Integer>
@Override
protected short getSignalID()
{
- return TestSignalProtocol.SIGNAL3;
+ return TestSignalProtocol.SIGNAL_INT;
}
@Override
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/StringIndication.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/StringIndication.java
new file mode 100644
index 0000000..f750b2c
--- /dev/null
+++ b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/StringIndication.java
@@ -0,0 +1,43 @@
+/***************************************************************************
+ * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ **************************************************************************/
+package org.eclipse.net4j.tests.signal;
+
+import org.eclipse.net4j.signal.IndicationWithResponse;
+import org.eclipse.net4j.util.io.ExtendedDataInputStream;
+import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
+
+import java.io.IOException;
+
+/**
+ * @author Eike Stepper
+ */
+public class StringIndication extends IndicationWithResponse
+{
+ private String data;
+
+ @Override
+ protected short getSignalID()
+ {
+ return TestSignalProtocol.SIGNAL_STRING;
+ }
+
+ @Override
+ protected void indicating(ExtendedDataInputStream in) throws IOException
+ {
+ data = in.readString();
+ }
+
+ @Override
+ protected void responding(ExtendedDataOutputStream out) throws IOException
+ {
+ out.writeString(data);
+ }
+}
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/StringRequest.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/StringRequest.java
new file mode 100644
index 0000000..005fd4d
--- /dev/null
+++ b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/StringRequest.java
@@ -0,0 +1,50 @@
+/***************************************************************************
+ * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ **************************************************************************/
+package org.eclipse.net4j.tests.signal;
+
+import org.eclipse.net4j.IChannel;
+import org.eclipse.net4j.signal.RequestWithConfirmation;
+import org.eclipse.net4j.util.io.ExtendedDataInputStream;
+import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
+
+import java.io.IOException;
+
+/**
+ * @author Eike Stepper
+ */
+public class StringRequest extends RequestWithConfirmation<String>
+{
+ private String data;
+
+ public StringRequest(IChannel channel, String data)
+ {
+ super(channel);
+ this.data = data;
+ }
+
+ @Override
+ protected short getSignalID()
+ {
+ return TestSignalProtocol.SIGNAL_STRING;
+ }
+
+ @Override
+ protected void requesting(ExtendedDataOutputStream out) throws IOException
+ {
+ out.writeString(data);
+ }
+
+ @Override
+ protected String confirming(ExtendedDataInputStream in) throws IOException
+ {
+ return in.readString();
+ }
+}
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/TestSignalProtocol.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/TestSignalProtocol.java
index 36ad8da..82ea5bd 100644
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/TestSignalProtocol.java
+++ b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/TestSignalProtocol.java
@@ -20,11 +20,15 @@ public class TestSignalProtocol extends SignalProtocol
{
public static final String PROTOCOL_NAME = "signal.protocol";
- public static final short SIGNAL1 = 1;
+ public static final short SIGNAL_INT = 1;
- public static final short SIGNAL2 = 2;
+ public static final short SIGNAL_INT_FAIL = 2;
- public static final short SIGNAL3 = 3;
+ public static final short SIGNAL_ARRAY = 3;
+
+ public static final short SIGNAL_STRING = 4;
+
+ public static final short SIGNAL_ASYNC = 5;
public TestSignalProtocol()
{
@@ -40,12 +44,16 @@ public class TestSignalProtocol extends SignalProtocol
{
switch (signalID)
{
- case SIGNAL1:
- return new Indication1();
- case SIGNAL2:
- return new Indication2();
- case SIGNAL3:
- return new Indication3();
+ case SIGNAL_INT:
+ return new IntIndication();
+ case SIGNAL_INT_FAIL:
+ return new IntFailIndication();
+ case SIGNAL_ARRAY:
+ return new ArrayIndication();
+ case SIGNAL_STRING:
+ return new StringIndication();
+ case SIGNAL_ASYNC:
+ return new AsyncIndication();
}
return null;
}
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/Connector.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/Connector.java
index de85d98..ae2c161 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/Connector.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/Connector.java
@@ -183,7 +183,7 @@ public abstract class Connector extends Container<IChannel> implements IConnecto
{
if (TRACER.isEnabled())
{
- TRACER.format("Setting userID {0} for {2}", userID, this); //$NON-NLS-1$
+ TRACER.format("Setting userID {0} for {1}", userID, this); //$NON-NLS-1$
}
this.userID = userID;
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/stream/BufferInputStream.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/stream/BufferInputStream.java
index 39967c2..1400380 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/stream/BufferInputStream.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/stream/BufferInputStream.java
@@ -109,27 +109,28 @@ public class BufferInputStream extends InputStream implements IBufferHandler
{
if (timeout == NO_TIMEOUT)
{
+ // System.out.println("while (currentBuffer == null)");
while (currentBuffer == null)
{
if (buffers == null)
{
- // Stream has been closed
+ // Stream has been closed - shutting down
return false;
}
+ // System.out.println("buffers.poll");
currentBuffer = buffers.poll(check, TimeUnit.MILLISECONDS);
}
}
else
{
- // TODO Consider something faster than currentTimeMillis(), maybe less
- // accurate?
+ // TODO Consider something faster than currentTimeMillis(), maybe less accurate?
final long stop = System.currentTimeMillis() + timeout;
while (currentBuffer == null)
{
if (buffers == null)
{
- // Stream has been closed - shutting sown
+ // Stream has been closed - shutting down
return false;
}