diff options
author | jfrijters <jfrijters> | 2011-08-17 15:47:18 +0400 |
---|---|---|
committer | jfrijters <jfrijters> | 2011-08-17 15:47:18 +0400 |
commit | 2ea8c376c4c0584f7cad9f5c4f441503714f9eb3 (patch) | |
tree | 13b3bfd0923a5d6cf8d03b4834d58f0c61d40493 /openjdk/sun | |
parent | 810b64d9b333fc02cb55f0dccd5872c2d4b8ccb3 (diff) |
Implemented isSameFile.
Diffstat (limited to 'openjdk/sun')
-rw-r--r-- | openjdk/sun/nio/fs/NetFileSystemProvider.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/openjdk/sun/nio/fs/NetFileSystemProvider.java b/openjdk/sun/nio/fs/NetFileSystemProvider.java index f2cc0615..f7c9274f 100644 --- a/openjdk/sun/nio/fs/NetFileSystemProvider.java +++ b/openjdk/sun/nio/fs/NetFileSystemProvider.java @@ -317,7 +317,15 @@ final class NetFileSystemProvider extends AbstractFileSystemProvider public boolean isSameFile(Path path, Path path2) throws IOException { - throw new NotYetImplementedError(); + if (path.equals(path2)) + { + return true; + } + if (!(path instanceof NetPath && path2 instanceof NetPath)) + { + return false; + } + return path.toRealPath().equals(path2.toRealPath()); } public boolean isHidden(Path path) throws IOException |