bvahdat commented on code in PR #9339:
URL: https://github.com/apache/camel/pull/9339#discussion_r1104699561
##########
core/camel-support/src/main/java/org/apache/camel/support/resume/AdapterHelper.java:
##########
@@ -41,9 +42,9 @@ private AdapterHelper() {
}
public static ResumeAdapter eval(CamelContext context, ResumeAware
resumeAware, ResumeStrategy resumeStrategy) {
- assert context != null;
- assert resumeAware != null;
- assert resumeStrategy != null;
+ ObjectHelper.notNull(context, "context");
+ ObjectHelper.notNull(resumeAware, "resumeAware");
+ ObjectHelper.notNull(resumeStrategy, "resumeStrategy");
Review Comment:
My same reasoning as very top 👆.
Other than that when we run Camel's own tests (where Java assertion through
surefire/failsafe plugins are enabled) then it could be that all these
assertions are properly fulfilled which is given through a **concrete test
setup**, but what if the setup and data of a given Camel user's production
environment is different than what we had by our tests which suddenly they
would end up with null values here. So using `ObjectHelper.notNull` guarantees
we always verify these, no matter if through Camel test **setup and
configuration** or the ones from the users.
--
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]