You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@iotdb.apache.org by GitBox <gi...@apache.org> on 2019/01/27 03:36:38 UTC
[GitHub] jt2594838 commented on a change in pull request #34: fix sonar
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:
users@infra.apache.org
With regards,
Apache Git Services