Skip to content

Commit

Permalink
8214248: (fs) Files:mismatch spec clarifications
Browse files Browse the repository at this point in the history
Reviewed-by: alanb
  • Loading branch information
Brian Burkhalter committed Aug 22, 2023
1 parent ce1ded1 commit 2eae13c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/java.base/share/classes/java/nio/file/Files.java
Original file line number Diff line number Diff line change
Expand Up @@ -1531,7 +1531,8 @@ public static FileStore getFileStore(Path path) throws IOException {
* @throws SecurityException
* In the case of the default provider, and a security manager is
* installed, the {@link SecurityManager#checkRead(String) checkRead}
* method is invoked to check read access to both files.
* method is invoked to check read access to both files when the
* two paths are not equal
*
* @see java.nio.file.attribute.BasicFileAttributes#fileKey
*/
Expand Down Expand Up @@ -1571,6 +1572,9 @@ public static boolean isSameFile(Path path, Path path2) throws IOException {
* and {@code g}, {@code mismatch(f,g)} will return the same value as
* {@code mismatch(g,f)}).
*
* <p> If both {@code Path} objects are equal, then this method returns
* {@code true} without checking if the file exists.
*
* @param path
* the path to the first file
* @param path2
Expand All @@ -1583,7 +1587,8 @@ public static boolean isSameFile(Path path, Path path2) throws IOException {
* @throws SecurityException
* In the case of the default provider, and a security manager is
* installed, the {@link SecurityManager#checkRead(String) checkRead}
* method is invoked to check read access to both files.
* method is invoked to check read access to both files when the
* two paths are not equal
*
* @since 12
*/
Expand Down

1 comment on commit 2eae13c

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.