jt2594838 commented on a change in pull request #34: fix sonar
URL: https://github.com/apache/incubator-iotdb/pull/34#discussion_r251220264
##########
File path:
tsfile/src/main/java/org/apache/iotdb/tsfile/file/footer/ChunkGroupFooter.java
##########
@@ -140,7 +130,8 @@ public int serializeTo(OutputStream outputStream) throws
IOException {
length += ReadWriteIOUtils.write(deviceID, outputStream);
length += ReadWriteIOUtils.write(dataSize, outputStream);
length += ReadWriteIOUtils.write(numberOfChunks, outputStream);
- assert length == getSerializedSize();
+ boolean isEqual = (length == getSerializedSize());
+ assert isEqual;
Review comment:
I don't think using assertion is a good idea, maybe you can convert it to an
exception.
----------------------------------------------------------------
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