ashutoshcipher commented on code in PR #4446:
URL: https://github.com/apache/hadoop/pull/4446#discussion_r906369399


##########
hadoop-maven-plugins/src/main/java/org/apache/hadoop/maven/plugin/protoc/ProtocRunner.java:
##########
@@ -172,6 +172,10 @@ private long computeChecksum(File file) throws IOException 
{
 
     public void writeChecksums() throws IOException {
       ObjectMapper mapper = new ObjectMapper();
+      boolean folderCreated = checksumFile.getParentFile().mkdirs();
+      if (!folderCreated) {
+        throw new IOException("Unable to create path");
+      }

Review Comment:
   @aajisaka - The other way I can I can think of will be directly doing
   
   ```
   checksumFile.getParentFile().mkdirs();
   ```
   
   and not checking the results at all. But then SpotBug will complain about 
the result not checked.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to