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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to