You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2019/02/02 05:14:57 UTC
[GitHub] jixuan1989 commented on a change in pull request #33: Fix sonar
problems by Beyyes
jixuan1989 commented on a change in pull request #33: Fix sonar problems by Beyyes
URL: https://github.com/apache/incubator-iotdb/pull/33#discussion_r253248804
##########
File path: iotdb-cli/src/main/java/org/apache/iotdb/cli/tool/ImportCsv.java
##########
@@ -283,27 +286,27 @@ private static void loadDataFromCSV(File file, int index) {
StringBuilder sbd = new StringBuilder();
ArrayList<Integer> colIndex = entry.getValue();
sbd.append("insert into " + entry.getKey() + "(timestamp");
- int skipcount = 0;
+ int skipCount = 0;
for (int j = 0; j < colIndex.size(); ++j) {
- if (data[entry.getValue().get(j) + 1].equals("")) {
- skipcount++;
+ if ("".equals(data[entry.getValue().get(j) + 1])) {
+ skipCount++;
continue;
}
sbd.append(", " + colInfo.get(colIndex.get(j)));
}
// define every device null value' number, if the number equal the
// sensor number, the insert operation stop
- if (skipcount == entry.getValue().size()) {
+ if (skipCount == entry.getValue().size()) {
continue;
}
- // TODO when timestampsStr is empty,
+ // TODO when timestampsStr is empty
String timestampsStr = data[0];
- sbd.append(") values(").append(timestampsStr.trim().equals("")
+ sbd.append(") values(").append(timestampsStr.trim().isEmpty()
Review comment:
pls keep the same usage with Line 291.
----------------------------------------------------------------
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