smiklosovic commented on code in PR #2215:
URL: https://github.com/apache/cassandra/pull/2215#discussion_r1138350890


##########
src/java/org/apache/cassandra/db/commitlog/CommitLog.java:
##########
@@ -112,6 +114,11 @@ CommitLog start()
         return this;
     }
 
+    public boolean hasFilesToReplay()
+    {
+        return new 
File(segmentManager.storageDirectory).listFiles(unmanagedFilesFilter).length > 
0;

Review Comment:
   IDEA complains that this:
   
   new File(segmentManager.storageDirectory).listFiles(unmanagedFilesFilter)
   
   can produce NPE.
   
   You should rewrite this to use Cassandra's "File", not Java's one. 
   
   I know this is branch 3.11 where that stuff is not in yet but IDE 
complaining about NPE should be fixed anyway somehow I guess.



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