-
Notifications
You must be signed in to change notification settings - Fork 781
Open
Labels
Description
Description of the problem / feature request:
Files.isDirectory, Files.isRegularFile and Files.isSymbolicLink ignore all IOExceptions (not just FileNotFound). This is almost never what you want; you want genuine IOExceptions like "the hard drive is on fire", or "the network is down, so NFS is not working" to get propagated.
These functions should not be used. ErrorProne should suggest Files.readAttributes instead. Automatic rewriting is hard because readAttributes throws IOException while the functions to be replaced do not.
Feature requests: what underlying problem are you trying to solve with this feature?
To replace unsafe functions with safe ones.
What version of Error Prone are you using?
3433532 (HEAD as of Oct 10, 2019)
Have you found anything relevant by searching the web?
I searched the bug tracker and mailing list for Files.isDirectory and found nothing.
Reactions are currently unavailable