HBASE-451 FSUtils.getTableInfoModtime() should check fs.listStatus() against null return

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1147914 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Zhihong Yu 2011-07-18 15:00:03 +00:00
parent 8ae3106b95
commit 8f2fde07c7
1 changed files with 3 additions and 1 deletions

View File

@ -886,7 +886,9 @@ public class FSUtils {
throws IOException {
Path p = getTableInfoPath(rootdir, tablename);
FileStatus [] status = fs.listStatus(p);
if (status.length < 1) throw new FileNotFoundException("No status for " + p.toString());
if (status == null || status.length < 1) {
throw new FileNotFoundException("No status for " + p.toString());
}
return status[0].getModificationTime();
}