jt2594838 commented on a change in pull request #32: fix sonar issues
URL: https://github.com/apache/incubator-iotdb/pull/32#discussion_r251725329
 
 

 ##########
 File path: 
iotdb/src/main/java/org/apache/iotdb/db/engine/memcontrol/RecordMemController.java
 ##########
 @@ -137,16 +159,21 @@ public void reportFree(Object user, long freeSize) {
       } else {
         memMap.remove(user);
       }
-      logger.info("{} freed from {}, it is using {}, total usage {}",
-          MemUtils.bytesCntToStr(freeSize),
-          user.getClass(), MemUtils.bytesCntToStr(usage - freeSize),
-          MemUtils.bytesCntToStr(newTotalMemUsage));
+      if (logger.isInfoEnabled()) {
+        logger.info("{} freed from {}, it is using {}, total usage {}",
+                MemUtils.bytesCntToStr(freeSize),
+                user.getClass(), MemUtils.bytesCntToStr(usage - freeSize),
+                MemUtils.bytesCntToStr(newTotalMemUsage));
+      }
     }
   }
 
   private static class InstanceHolder {
 
+    private InstanceHolder() {
+    }
+
     private static final RecordMemController INSTANCE = new 
RecordMemController(
-        IoTDBDescriptor.getInstance().getConfig());
+            IoTDBDescriptor.getInstance().getConfig());
 
 Review comment:
   参数的缩进和一般的缩进不一样。

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to