You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2021/09/15 15:04:37 UTC

[GitHub] [iotdb] zyk990424 commented on a change in pull request #3971: [IOTDB-1690] Fix align by device type cast error

zyk990424 commented on a change in pull request #3971:
URL: https://github.com/apache/iotdb/pull/3971#discussion_r709280614



##########
File path: server/src/main/java/org/apache/iotdb/db/metadata/MManager.java
##########
@@ -1241,8 +1241,10 @@ public IMNode getDeviceNodeWithAutoCreate(PartialPath path)
       Template template = node.getUpperTemplate();
 
       for (IMNode child : node.getChildren().values()) {
-        IMeasurementMNode measurementMNode = (IMeasurementMNode) child;
-        res.add(measurementMNode.getSchema());
+        if (child instanceof IMeasurementMNode) {

Review comment:
       It's better use override method child.isMeasurement.
   Java instansof violates OO design and program.




-- 
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: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org