orpiske commented on PR #9339: URL: https://github.com/apache/camel/pull/9339#issuecomment-1428397142
One last reason for using the native assert instead of `ObjectHelper.notNull`: the native assert throws an [`AssertionError`](https://docs.oracle.com/javase/8/docs/api/java/lang/AssertionError.html) instead of an [`IllegalArgumentException`](https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html). As a descendant of `Error` it properly conveys the abnormality of the condition that raised it (granted: many places try to incorrectly catch `Throwable` - but that's a completely different discussion). -- 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]
