You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 5, 2023. It is now read-only.
However, as per the official docs for java.io.File#isFile(), this method returns "true if and only if the file denoted by this abstract pathname exists and is a normal file; false otherwise".
Since java.io.File#isFile() already checks for existence, FileUtil#isFileExists(File) appears unnecessary.
The text was updated successfully, but these errors were encountered:
Probably updated, but not closed though since conceptually the same issue exists, just with a different API. Files#isRegularFile(Path) already checks for file existence, so the call to Files.exists(file), and in fact even the whole isFileExists(Path) helper method, can be removed.
The current method
FileUtil#isFileExists(File)
is basically a combination of two boolean method calls:However, as per the official docs for java.io.File#isFile(), this method returns "true if and only if the file denoted by this abstract pathname exists and is a normal file; false otherwise".
Since
java.io.File#isFile()
already checks for existence,FileUtil#isFileExists(File)
appears unnecessary.The text was updated successfully, but these errors were encountered: