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:
parent
8ae3106b95
commit
8f2fde07c7
|
@ -886,7 +886,9 @@ public class FSUtils {
|
||||||
throws IOException {
|
throws IOException {
|
||||||
Path p = getTableInfoPath(rootdir, tablename);
|
Path p = getTableInfoPath(rootdir, tablename);
|
||||||
FileStatus [] status = fs.listStatus(p);
|
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();
|
return status[0].getModificationTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue