bvahdat commented on code in PR #9339:
URL: https://github.com/apache/camel/pull/9339#discussion_r1104665839


##########
components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/consumer/KinesisDefaultResumeAdapter.java:
##########
@@ -46,8 +47,8 @@ public void setRequestBuilder(GetShardIteratorRequest.Builder 
resumable) {
 
     @Override
     public void resume() {
-        assert streamName != null;
-        assert resumable != null;

Review Comment:
   Thanks for your feedback.
   
   IMHO no matter if it's about a user-facing pubic or not-public logic, at the 
end of the day this code would run in a production environment where  typically 
Java assertion is not explicitly enabled. Then having these null guards using 
Java assertion would simply get skipped, then users would only see the **side 
effects** of these null values **later on** on their call stack and they / we 
would need to guess and find out the **root cause** (which was null values not 
being checked early enough). On the other hand having this check eagerly 
through `ObjectHelper#notNull` would not end up in such a scenarios.



-- 
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-unsubscr...@camel.apache.org

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

Reply via email to