Return-Path: X-Original-To: apmail-hbase-commits-archive@www.apache.org Delivered-To: apmail-hbase-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C45DC18634 for ; Fri, 26 Feb 2016 23:09:36 +0000 (UTC) Received: (qmail 22117 invoked by uid 500); 26 Feb 2016 23:09:23 -0000 Delivered-To: apmail-hbase-commits-archive@hbase.apache.org Received: (qmail 22046 invoked by uid 500); 26 Feb 2016 23:09:23 -0000 Mailing-List: contact commits-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list commits@hbase.apache.org Received: (qmail 21452 invoked by uid 99); 26 Feb 2016 23:09:22 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Feb 2016 23:09:22 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id A8BE1E8F3E; Fri, 26 Feb 2016 23:09:22 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: syuanjiang@apache.org To: commits@hbase.apache.org Date: Fri, 26 Feb 2016 23:09:43 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [22/37] hbase git commit: HBASE-15311 Prevent NPE in BlockCacheViewTmpl. HBASE-15311 Prevent NPE in BlockCacheViewTmpl. Signed-off-by: stack Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/75c57a04 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/75c57a04 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/75c57a04 Branch: refs/heads/hbase-12439 Commit: 75c57a04ddad2d7cf3435df1eba13541775319fb Parents: 40c5591 Author: Samir Ahmic Authored: Tue Feb 23 11:34:09 2016 +0100 Committer: stack Committed: Thu Feb 25 15:23:28 2016 -0800 ---------------------------------------------------------------------- .../apache/hadoop/hbase/tmpl/regionserver/BlockCacheViewTmpl.jamon | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/75c57a04/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/BlockCacheViewTmpl.jamon ---------------------------------------------------------------------- diff --git a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/BlockCacheViewTmpl.jamon b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/BlockCacheViewTmpl.jamon index fa55f6a..c6d7a61 100644 --- a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/BlockCacheViewTmpl.jamon +++ b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/BlockCacheViewTmpl.jamon @@ -44,7 +44,7 @@ org.apache.hadoop.util.StringUtils; if (bcn.equals("L1")) { bc = bcs == null || bcs.length == 0? bc: bcs[0]; } else { - if (bcs.length < 2) { + if (bcs == null || bcs.length < 2) { System.out.println("There is no L2 block cache"); return; }