Skip to content

Commit

Permalink
Merge pull request #184 from dicej/zip-available
Browse files Browse the repository at this point in the history
remove redundant decrement in ZipFile.getInputStream inner class
  • Loading branch information
joshuawarner32 committed Feb 26, 2014
2 parents 2036eea + 094af1e commit e837502
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions classpath/java/util/zip/ZipFile.java
Expand Up @@ -103,11 +103,9 @@ public InputStream getInputStream(ZipEntry entry) throws IOException {
int remaining = uncompressedSize(window, pointer); int remaining = uncompressedSize(window, pointer);


public int read() throws IOException { public int read() throws IOException {
int c = super.read(); byte[] buffer = new byte[1];
if (c >= 0) { int c = read(buffer);
-- remaining; return (c < 0 ? c : (buffer[0] & 0xFF));
}
return c;
} }


public int read(byte[] buffer) throws IOException { public int read(byte[] buffer) throws IOException {
Expand Down

0 comments on commit e837502

Please sign in to comment.