From 8f2fde07c79583b1398f48dd9a37b45c6a260d94 Mon Sep 17 00:00:00 2001 From: Zhihong Yu Date: Mon, 18 Jul 2011 15:00:03 +0000 Subject: [PATCH] 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 --- src/main/java/org/apache/hadoop/hbase/util/FSUtils.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java b/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java index 0646ca51e91..3c361de0149 100644 --- a/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java +++ b/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java @@ -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(); }