From: Jani Simomaa Date: Mon, 17 Oct 2016 07:41:11 +0000 (+0300) Subject: Merge "InputStream returns -1 on EOF instead of throwing IOException" X-Git-Tag: v1.25.0~68 X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=commitdiff_plain;h=80d69fc3f7a2e14c5b9e44a601ba15b0434454a8;hp=e67e00d01d30f362e7a4f599cbcf24770ce13e22 Merge "InputStream returns -1 on EOF instead of throwing IOException" --- diff --git a/bundles/org.simantics.acorn/src/org/simantics/acorn/internal/ClusterSupport2.java b/bundles/org.simantics.acorn/src/org/simantics/acorn/internal/ClusterSupport2.java index b1b1e8365..20cd6f462 100644 --- a/bundles/org.simantics.acorn/src/org/simantics/acorn/internal/ClusterSupport2.java +++ b/bundles/org.simantics.acorn/src/org/simantics/acorn/internal/ClusterSupport2.java @@ -258,8 +258,7 @@ public class ClusterSupport2 implements ClusterSupport, IClusterTable { @Override public int read() throws IOException { - if(left <= 0) - throw new IOException("left <= 0 for " + _s); + if(left <= 0) return -1; if(offset == _s.bytes.length) { short slen = (short)Math.min(left, IMAX);