You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2022/03/12 20:26:09 UTC

[GitHub] [camel] essobedo commented on a change in pull request #7192: CAMEL-17774 Added check for null inputStream

essobedo commented on a change in pull request #7192:
URL: https://github.com/apache/camel/pull/7192#discussion_r825346715



##########
File path: components/camel-zipfile/src/main/java/org/apache/camel/dataformat/zipfile/ZipIterator.java
##########
@@ -48,6 +48,11 @@
     public ZipIterator(Exchange exchange, InputStream inputStream) {
         this.exchange = exchange;
         this.allowEmptyDirectory = false;
+
+        if (inputStream == null) {
+            throw new IllegalStateException("Input stream cannot be null");
+        }

Review comment:
       I’m not sure that an IllegalStateException is the right choice in this case, I would rather use ´Objects.requireNonNull´ Instead. 




-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org