Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEsteban Dugueperoux2015-11-12 14:09:36 +0000
committerEsteban Dugueperoux2015-11-12 14:14:45 +0000
commitd205176345cf81a8b3d9376d861fa1c96b497c69 (patch)
treeafc5fbb6229b218f4d2269e41b08add6b9d415b2
parentc99602465a3f52eb1bc0aa1abcf4ea2cb6cd8e6f (diff)
downloadcdo-d205176345cf81a8b3d9376d861fa1c96b497c69.tar.gz
cdo-d205176345cf81a8b3d9376d861fa1c96b497c69.tar.xz
cdo-d205176345cf81a8b3d9376d861fa1c96b497c69.zip
[477256] Avoid NPE on SignalProtocol.handleBuffer() with stopped signal
- This fix a NPE regression since streams are closed on stopped signal. Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=477256 Signed-off-by: Esteban Dugueperoux <esteban.dugueperoux@obeo.fr> Change-Id: Ib38672ea40d4c9744064ee39ed96e05e7ba0cffe
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/buffer/BufferInputStream.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/buffer/BufferInputStream.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/buffer/BufferInputStream.java
index fd1a9a33e6..52ab739f85 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/buffer/BufferInputStream.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/buffer/BufferInputStream.java
@@ -114,7 +114,11 @@ public class BufferInputStream extends InputStream implements IBufferHandler
public void handleBuffer(IBuffer buffer)
{
- buffers.add(buffer);
+ // Stream has been closed - ignore the new buffer
+ if (buffers != null)
+ {
+ buffers.add(buffer);
+ }
}
@SuppressWarnings("deprecation")

Back to the top