MyXOF commented on a change in pull request #32: fix sonar issues
URL: https://github.com/apache/incubator-iotdb/pull/32#discussion_r251705337
##########
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