kevins-29 commented on code in PR #4585:
URL: https://github.com/apache/hadoop/pull/4585#discussion_r938704526
##########
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/zlib/BuiltInGzipCompressor.java:
##########
@@ -102,7 +103,15 @@ public int compress(byte[] b, int off, int len) throws
IOException {
if (state == BuiltInGzipDecompressor.GzipStateLabel.INFLATE_STREAM) {
// now compress it into b[]
- int deflated = deflater.deflate(b, off, len);
+ int deflated;
+ try {
+ deflated = deflater.deflate(b, off, len);
+ } catch (NullPointerException npe) {
Review Comment:
Thank you, I wasn't too comfortable with this either.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]