diff options
author | Paul Pazderski | 2020-02-19 22:54:12 +0000 |
---|---|---|
committer | Karsten Thoms | 2020-03-24 06:48:20 +0000 |
commit | 40f3bf4963dddb1ca71253c6e1c68cc879946f0d (patch) | |
tree | 45e2fbf564762b722f478dda0ce2b9564e5f2f62 | |
parent | 24015b387c3630e603f6eada267ebc6ab79d3c02 (diff) | |
download | eclipse.platform.debug-40f3bf4963dddb1ca71253c6e1c68cc879946f0d.tar.gz eclipse.platform.debug-40f3bf4963dddb1ca71253c6e1c68cc879946f0d.tar.xz eclipse.platform.debug-40f3bf4963dddb1ca71253c6e1c68cc879946f0d.zip |
Bug 559180 - Close stream when NullStreamMonitor finishesI20200326-1800I20200325-1800I20200324-1800
Change-Id: Ifb13a0609c150d2ca1f87e43957068fcec8bb271
Signed-off-by: Paul Pazderski <paul-eclipse@ppazderski.de>
-rw-r--r-- | org.eclipse.debug.core/core/org/eclipse/debug/internal/core/NullStreamsProxy.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/NullStreamsProxy.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/NullStreamsProxy.java index 4ac805433..0bbcdf62e 100644 --- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/NullStreamsProxy.java +++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/NullStreamsProxy.java @@ -59,8 +59,8 @@ public class NullStreamsProxy implements IStreamsProxy2 { private void startReaderThread() { Thread thread = new Thread((Runnable) () -> { byte[] bytes = new byte[1024]; - try { - while (fStream.read(bytes) >= 0) { + try (InputStream stream = fStream) { + while (stream.read(bytes) >= 0) { // do nothing } } catch (IOException e) { |