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


##########
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:
   These 2 are [invariants which is why checking for assertions is the correct 
approach](https://docs.oracle.com/javase/7/docs/technotes/guides/language/assert.html#usage-invariants).
 In normal circumstances they should be defined as final members of the 
`KinesisDefaultResumeAdapter` class. Unfortunately our code is made in a way 
that does not favor usage of final variables in many places (which then, would 
make the assert unnecessary) 



-- 
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