@@ -1531,7 +1531,8 @@ public static FileStore getFileStore(Path path) throws IOException {
15311531 * @throws SecurityException
15321532 * In the case of the default provider, and a security manager is
15331533 * installed, the {@link SecurityManager#checkRead(String) checkRead}
1534- * method is invoked to check read access to both files.
1534+ * method is invoked to check read access to both files when the
1535+ * two paths are not equal
15351536 *
15361537 * @see java.nio.file.attribute.BasicFileAttributes#fileKey
15371538 */
@@ -1571,6 +1572,9 @@ public static boolean isSameFile(Path path, Path path2) throws IOException {
15711572 * and {@code g}, {@code mismatch(f,g)} will return the same value as
15721573 * {@code mismatch(g,f)}).
15731574 *
1575+ * <p> If both {@code Path} objects are equal, then this method returns
1576+ * {@code true} without checking if the file exists.
1577+ *
15741578 * @param path
15751579 * the path to the first file
15761580 * @param path2
@@ -1583,7 +1587,8 @@ public static boolean isSameFile(Path path, Path path2) throws IOException {
15831587 * @throws SecurityException
15841588 * In the case of the default provider, and a security manager is
15851589 * installed, the {@link SecurityManager#checkRead(String) checkRead}
1586- * method is invoked to check read access to both files.
1590+ * method is invoked to check read access to both files when the
1591+ * two paths are not equal
15871592 *
15881593 * @since 12
15891594 */
0 commit comments