jt2594838 commented on a change in pull request #31: Fix sonar
URL: https://github.com/apache/incubator-iotdb/pull/31#discussion_r251180912
##########
File path:
iotdb/src/main/java/org/apache/iotdb/db/query/reader/sequence/SealedTsFilesReader.java
##########
@@ -90,22 +91,22 @@ public boolean hasNext() throws IOException {
hasCachedData = true;
return true;
} else {
- continue;
+ flag = true;
}
}
// try to get next batch data from next reader
- while (usedIntervalFileIndex < sealedTsFiles.size()) {
+ while (!flag && usedIntervalFileIndex < sealedTsFiles.size()) {
// init until reach a satisfied reader
if (seriesReader == null || !seriesReader.hasNextBatch()) {
IntervalFileNode fileNode =
sealedTsFiles.get(usedIntervalFileIndex++);
if (singleTsFileSatisfied(fileNode)) {
initSingleTsFileReader(fileNode);
} else {
- continue;
+ flag = true;
Review comment:
A more delicate refactoring may be performed.
----------------------------------------------------------------
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