Author: onealj
Date: Fri Feb 17 09:25:49 2017
New Revision: 1783356
URL: http://svn.apache.org/viewvc?rev=1783356&view=rev
Log:
bug 59893: fix a few forgotten unrelated changes
Modified:
poi/trunk/src/java/org/apache/poi/poifs/crypt/ChunkedCipherInputStream.java
poi/trunk/src/java/org/apache/poi/util/BoundedInputStream.java
Modified:
poi/trunk/src/java/org/apache/poi/poifs/crypt/ChunkedCipherInputStream.java
URL:
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/poifs/crypt/ChunkedCipherInputStream.java?rev=1783356&r1=1783355&r2=1783356&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/poifs/crypt/ChunkedCipherInputStream.java
(original)
+++ poi/trunk/src/java/org/apache/poi/poifs/crypt/ChunkedCipherInputStream.java
Fri Feb 17 09:25:49 2017
@@ -77,8 +77,8 @@ public abstract class ChunkedCipherInput
@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
Modified: poi/trunk/src/java/org/apache/poi/util/BoundedInputStream.java
URL:
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/util/BoundedInputStream.java?rev=1783356&r1=1783355&r2=1783356&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/util/BoundedInputStream.java (original)
+++ poi/trunk/src/java/org/apache/poi/util/BoundedInputStream.java Fri Feb 17
09:25:49 2017
@@ -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
* {@inheritDoc}
*/
@Override
+ @SuppressForbidden("just delegating")
public int available() throws IOException {
if (max>=0 && pos>=max) {
return 0;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]