Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A0F2110A91 for ; Sun, 20 Apr 2014 01:03:44 +0000 (UTC) Received: (qmail 34094 invoked by uid 500); 20 Apr 2014 01:03:41 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 33913 invoked by uid 500); 20 Apr 2014 01:03:38 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 33678 invoked by uid 99); 20 Apr 2014 01:03:33 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 20 Apr 2014 01:03:33 +0000 Date: Sun, 20 Apr 2014 01:03:33 +0000 (UTC) From: "Hudson (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-11030) HBaseTestingUtility.getMiniHBaseCluster should be able to return null MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HBASE-11030?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13975004#comment-13975004 ] Hudson commented on HBASE-11030: -------------------------------- SUCCESS: Integrated in hbase-0.96-hadoop2 #271 (See [https://builds.apache.org/job/hbase-0.96-hadoop2/271/]) HBASE-11030 HBaseTestingUtility.getMiniHBaseCluster should be able to return null. (larsh: rev 1588615) * /hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java > HBaseTestingUtility.getMiniHBaseCluster should be able to return null > --------------------------------------------------------------------- > > Key: HBASE-11030 > URL: https://issues.apache.org/jira/browse/HBASE-11030 > Project: HBase > Issue Type: Bug > Reporter: Lars Hofhansl > Assignee: Lars Hofhansl > Fix For: 0.99.0, 0.94.19, 0.98.2, 0.96.3 > > Attachments: 11030-trunk.txt > > > Right now we have this logic: > {code} > public MiniHBaseCluster getMiniHBaseCluster() { > if (this.hbaseCluster instanceof MiniHBaseCluster) { > return (MiniHBaseCluster)this.hbaseCluster; > } > throw new RuntimeException(hbaseCluster + " not an instance of " + > MiniHBaseCluster.class.getName()); > } > {code} > Since null is not actually an instance of MiniHBaseCluster we'll throw the RuntimeException rather than returning null. > Some tests call this method and check for null, which is pointless. -- This message was sent by Atlassian JIRA (v6.2#6252)