From: Greg Farnum Date: Tue, 8 Sep 2009 05:28:12 +0000 (-0700) Subject: Hadoop: Return a couple of unecessary isX calls. X-Git-Tag: v0.14~13 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4347f4a1c7f8a809c50b7d4c73ee6850d392cb46;p=ceph.git Hadoop: Return a couple of unecessary isX calls. --- diff --git a/src/client/hadoop/ceph/CephFileSystem.java b/src/client/hadoop/ceph/CephFileSystem.java index 8987e155201b..9b285e776752 100644 --- a/src/client/hadoop/ceph/CephFileSystem.java +++ b/src/client/hadoop/ceph/CephFileSystem.java @@ -247,7 +247,7 @@ public class CephFileSystem extends FileSystem { boolean path_exists = false; try { isDir = isDirectory(abs_path); - path_exists = exists(abs_path); + if (!isDir) path_exists = exists(abs_path); } catch (IOException e) { @@ -428,10 +428,7 @@ public class CephFileSystem extends FileSystem { debug("listStatus:exit"); return statuses; } - if (isFile(abs_path)) return null; - - //shouldn't get here - throw new FileNotFoundException("listStatus found no such file " + path); + return null; //it's a file, or DNE } @Override