belliottsmith commented on code in PR #1756:
URL: https://github.com/apache/cassandra/pull/1756#discussion_r930478515
##########
src/java/org/apache/cassandra/service/snapshot/SnapshotLoader.java:
##########
@@ -80,7 +80,7 @@ public Set<TableSnapshot> loadSnapshots()
{
try
{
- if (dataDir.toFile().exists())
+ if (Files.exists(dataDir))
Review Comment:
`java.io.File` rarely throws, and doesn't in this case, so the two are
consistent behaviourally. It even goes so far as to return 0 for most methods
that return a long in the case of error.
Or you could simply do `new File(dataDir).exists()`
--
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]