asolimando commented on a change in pull request #161:
URL: https://github.com/apache/calcite-avatica/pull/161#discussion_r744143347



##########
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:
       My rule of thumb is to use assertions for situations that should never 
happen, it's more of a "documentation" for me where I state expectations that 
follow logically but are maybe not evident, all the other cases need 
checks+exception




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


Reply via email to