You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by qi...@apache.org on 2020/04/27 02:51:07 UTC

[incubator-iotdb] branch master updated: format code

This is an automated email from the ASF dual-hosted git repository.

qiaojialin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git


The following commit(s) were added to refs/heads/master by this push:
     new 867a3e1  format code
867a3e1 is described below

commit 867a3e174d92f735f81a63f808b329e9c7db25df
Author: qiaojialin <64...@qq.com>
AuthorDate: Mon Apr 27 10:50:58 2020 +0800

    format code
---
 .../java/org/apache/iotdb/db/metadata/MTree.java   | 39 +++++-----------------
 1 file changed, 9 insertions(+), 30 deletions(-)

diff --git a/server/src/main/java/org/apache/iotdb/db/metadata/MTree.java b/server/src/main/java/org/apache/iotdb/db/metadata/MTree.java
index 3f6922f..7acaf4b 100644
--- a/server/src/main/java/org/apache/iotdb/db/metadata/MTree.java
+++ b/server/src/main/java/org/apache/iotdb/db/metadata/MTree.java
@@ -529,19 +529,13 @@ public class MTree implements Serializable {
    *
    * @param timeseriesSchemaList List<timeseriesSchema>
    */
-  private void findPath(
-      MNode node,
-      String[] nodes,
-      int idx,
-      String parent,
-      List<String[]> timeseriesSchemaList,
-      boolean hasLimit)
-      throws MetadataException {
+  private void findPath(MNode node, String[] nodes, int idx, String parent,
+      List<String[]> timeseriesSchemaList, boolean hasLimit) throws MetadataException {
     if (node instanceof LeafMNode) {
       if (nodes.length <= idx) {
         if (hasLimit) {
           curOffset.set(curOffset.get() + 1);
-          if (curOffset.get() < offset.get() || count.get() == limit.get()) {
+          if (curOffset.get() < offset.get() || count.get().intValue() == limit.get().intValue()) {
             return;
           }
         }
@@ -572,26 +566,16 @@ public class MTree implements Serializable {
     String nodeReg = MetaUtils.getNodeRegByIdx(idx, nodes);
     if (!nodeReg.contains(PATH_WILDCARD)) {
       if (node.hasChild(nodeReg)) {
-        findPath(
-            node.getChild(nodeReg),
-            nodes,
-            idx + 1,
-            parent + node.getName() + PATH_SEPARATOR,
-            timeseriesSchemaList,
-            hasLimit);
+        findPath(node.getChild(nodeReg), nodes, idx + 1, parent + node.getName() + PATH_SEPARATOR,
+            timeseriesSchemaList, hasLimit);
       }
     } else {
       for (MNode child : node.getChildren().values()) {
         if (!Pattern.matches(nodeReg.replace("*", ".*"), child.getName())) {
           continue;
         }
-        findPath(
-            child,
-            nodes,
-            idx + 1,
-            parent + node.getName() + PATH_SEPARATOR,
-            timeseriesSchemaList,
-            hasLimit);
+        findPath(child, nodes, idx + 1, parent + node.getName() + PATH_SEPARATOR,
+            timeseriesSchemaList, hasLimit);
       }
     }
   }
@@ -631,13 +615,8 @@ public class MTree implements Serializable {
       if (idx == length) {
         res.add(parent + node.getName());
       } else {
-        findChildNodePathInNextLevel(
-            node.getChild(nodeReg),
-            nodes,
-            idx + 1,
-            parent + node.getName() + PATH_SEPARATOR,
-            res,
-            length);
+        findChildNodePathInNextLevel(node.getChild(nodeReg), nodes, idx + 1,
+            parent + node.getName() + PATH_SEPARATOR, res, length);
       }
     } else {
       if (node instanceof InternalMNode && node.getChildren().size() > 0) {