diff -r 8769812a294f -r cac81257c657 jdk/src/java.base/share/classes/java/util/zip/InflaterInputStream.java --- a/jdk/src/java.base/share/classes/java/util/zip/InflaterInputStream.java Tue Jul 12 07:58:40 2016 -0700 +++ b/jdk/src/java.base/share/classes/java/util/zip/InflaterInputStream.java Wed Jul 13 16:37:24 2016 -0700 @@ -179,6 +179,10 @@ ensureOpen(); if (reachEOF) { return 0; + } else if (inf.finished()) { + // the end of the compressed data stream has been reached + reachEOF = true; + return 0; } else { return 1; }