]> source.dussan.org Git - poi.git/commitdiff
Bug 63431 -- unbug ChunkedCipherInputStream's read()
authorTim Allison <tallison@apache.org>
Wed, 15 May 2019 00:56:15 +0000 (00:56 +0000)
committerTim Allison <tallison@apache.org>
Wed, 15 May 2019 00:56:15 +0000 (00:56 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1859251 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/poi/poifs/crypt/ChunkedCipherInputStream.java

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