]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.acorn/src/org/simantics/acorn/internal/ClusterSupport2.java
InputStream returns -1 on EOF instead of throwing IOException
[simantics/platform.git] / bundles / org.simantics.acorn / src / org / simantics / acorn / internal / ClusterSupport2.java
index b1b1e8365f22bd8da329284a344639add33093cd..20cd6f462da5865109b4dda0ee25278b1f4633e6 100644 (file)
@@ -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);