fanhualta commented on a change in pull request #31: Fix sonar
URL: https://github.com/apache/incubator-iotdb/pull/31#discussion_r251183216
##########
File path:
iotdb/src/main/java/org/apache/iotdb/db/postback/receiver/ServerServiceImpl.java
##########
@@ -129,13 +142,13 @@ public String startReceiving(String md5OfSender,
List<String> filePathSplit,
ByteBuffer dataToReceive, int status) throws TException {
String md5OfReceiver = "";
String filePath = "";
- FileOutputStream fos = null;
FileChannel channel = null;
for (int i = 0; i < filePathSplit.size(); i++) {
if (i == filePathSplit.size() - 1) {
- filePath = filePath + filePathSplit.get(i);
+ filePath = new
StringBuilder().append(filePath).append(filePathSplit.get(i)).toString();
} else {
- filePath = filePath + filePathSplit.get(i) + File.separator;
+ filePath = new
StringBuilder().append(filePath).append(filePathSplit.get(i))
+ .append(File.separator).toString();
Review comment:
I have fixed this problem
----------------------------------------------------------------
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