sunjincheng121 commented on a change in pull request #161:
URL: https://github.com/apache/calcite-avatica/pull/161#discussion_r744099965
##########
File path: core/src/main/java/org/apache/calcite/avatica/AvaticaUtils.java
##########
@@ -235,10 +232,29 @@ public static Class box(Class clazz) {
} catch (NoSuchFieldException e) {
// ignore
}
+ assert pluginClass.isAssignableFrom(clazz);
Review comment:
+1 for your suggestion.
I do not want add assert here, just moved the position from up line to here
. Agree with you, I do not like use assert to do the logical judgment. but I
see that the project seems to favor to use assert. For example, in the
following classes: `avaticaresultset`, `avaticasite`, `avaticaconnection`,
`builtinconnectionproperty`, `connectionconfigimpl` etc.
Do you know any principles for using assert in this project? // I'm new to
this project :)
--
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]