bug 59893: fix a few forgotten unrelated changes

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1783356 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Javen O'Neal 2017-02-17 09:25:49 +00:00
parent 1584310ac5
commit ee6677ee56
2 changed files with 5 additions and 2 deletions

View File

@ -77,8 +77,8 @@ public abstract class ChunkedCipherInputStream extends LittleEndianInputStream {
@Override
public int read() throws IOException {
byte[] b = { 0 };
// FIXME: compare against -1 or 1?
return (read(b) == -1) ? -1 : b[0];
// FIXME: compare against -1 or 1? (bug 59893)
return (read(b) == 1) ? -1 : b[0];
}
// do not implement! -> recursion

View File

@ -19,6 +19,8 @@ package org.apache.poi.util;
import java.io.IOException;
import java.io.InputStream;
import org.apache.poi.util.SuppressForbidden;
/**
* This is a stream that will only supply bytes up to a certain length - if its
* position goes above that, it will stop.
@ -146,6 +148,7 @@ public class BoundedInputStream extends InputStream {
* {@inheritDoc}
*/
@Override
@SuppressForbidden("just delegating")
public int available() throws IOException {
if (max>=0 && pos>=max) {
return 0;