jixuan1989 commented on a change in pull request #34: fix sonar 
URL: https://github.com/apache/incubator-iotdb/pull/34#discussion_r251856920
 
 

 ##########
 File path: 
tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/decoder/PlainDecoder.java
 ##########
 @@ -45,11 +49,7 @@ public PlainDecoder(EndianType endianType) {
   @Override
   public boolean readBoolean(ByteBuffer buffer) {
     int ch1 = ReadWriteIOUtils.read(buffer);
-    if (ch1 == 0) {
-      return false;
-    } else {
-      return true;
-    }
+    return !(ch1 == 0);
 
 Review comment:
   how about `return ch1 != 0`

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