From a00aade0e5b6f568104d207e38dbdc3d091416f5 Mon Sep 17 00:00:00 2001 From: Mark Payne Date: Sun, 22 Feb 2015 11:46:00 -0500 Subject: [PATCH] NIFI-335: Fixed bug that returned a byte instead of an int from CompressionInputStream.read(), which resulted in negative values getting returned when it should not have --- .../java/org/apache/nifi/remote/io/CompressionInputStream.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nifi/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/remote/io/CompressionInputStream.java b/nifi/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/remote/io/CompressionInputStream.java index 71cf894daf..d953185f90 100644 --- a/nifi/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/remote/io/CompressionInputStream.java +++ b/nifi/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/remote/io/CompressionInputStream.java @@ -142,7 +142,7 @@ public class CompressionInputStream extends InputStream { return -1; } - return buffer[bufferIndex++]; + return buffer[bufferIndex++] & 0xFF; } @Override