fanhualta commented on a change in pull request #33: Fix sonar problems
URL: https://github.com/apache/incubator-iotdb/pull/33#discussion_r251847961
 
 

 ##########
 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("".equals(timestampsStr.trim())
 
 Review comment:
   It's the same problem with last comment, it's better to be 
{timestampsStr.trim().isEmpty()}

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