From fc38c8c23e78b366b534e7230b67d0dd683cba66 Mon Sep 17 00:00:00 2001 From: Tuukka Lehtonen Date: Fri, 14 Oct 2016 16:18:06 +0300 Subject: [PATCH 1/1] InputStream returns -1 on EOF instead of throwing IOException ClusterSupport2.getValueStreamBig now returns -1 when EOF is reached. Previously it was invalidly throwing IOException (and before that very invalidly throwing IllegalStateException). refs #6741 Change-Id: I220e6bd26b94d92ae1db5a330ca3304035e7614e --- .../src/org/simantics/acorn/internal/ClusterSupport2.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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); -- 2.43.2