diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/runtime/VMInputStream.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/runtime/VMInputStream.java index 8671e60d229..872776fac02 100644 --- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/runtime/VMInputStream.java +++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/runtime/VMInputStream.java @@ -57,14 +57,16 @@ public boolean markSupported() { } @Override public int read() throws IOException { - try { - return this.input.read(); - } catch (IOException e) { - if (isRunning()) { - return read(); - } - throw e; + while (true) { + try { + return this.input.read(); + } catch (IOException e) { + if (!isRunning()) { + throw e; + } + } } + } @Override public int read(byte b[]) throws IOException {