jt2594838 commented on a change in pull request #31: Fix sonar
URL: https://github.com/apache/incubator-iotdb/pull/31#discussion_r251001698
##########
File path:
iotdb/src/main/java/org/apache/iotdb/db/postback/receiver/ServerServiceImpl.java
##########
@@ -144,40 +157,37 @@ public String startReceiving(String md5OfSender,
List<String> filePathSplit,
if (!file.getParentFile().exists()) {
try {
file.getParentFile().mkdirs();
- file.createNewFile();
+ if (file.createNewFile()) {
+ LOGGER.error("IoTDB post back receiver: cannot create file {}",
file.getAbsoluteFile());
+ }
Review comment:
createNewFile() returns true when the file cannot be created?
----------------------------------------------------------------
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