Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 6948C200A5B for ; Wed, 25 May 2016 22:13:26 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 68036160A29; Wed, 25 May 2016 20:13:26 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id A60F2160A0F for ; Wed, 25 May 2016 22:13:25 +0200 (CEST) Received: (qmail 3988 invoked by uid 500); 25 May 2016 19:54:21 -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 3340 invoked by uid 99); 25 May 2016 19:49:13 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 May 2016 19:49:13 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id DECE42C14DC for ; Wed, 25 May 2016 19:49:12 +0000 (UTC) Date: Wed, 25 May 2016 19:49:12 +0000 (UTC) From: "Sean Mackrory (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (HBASE-15891) Closeable resources potentially not getting closed if exception is thrown MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 25 May 2016 20:13:26 -0000 Sean Mackrory created HBASE-15891: ------------------------------------- Summary: Closeable resources potentially not getting closed if exception is thrown Key: HBASE-15891 URL: https://issues.apache.org/jira/browse/HBASE-15891 Project: HBase Issue Type: Bug Reporter: Sean Mackrory Priority: Minor Static code analysis reports several instances of Closeable resources getting closed outside of 'finally' blocks - so if an Exception is thrown it may not get closed. {code} ZKUtil.getServerStats CoprocessorClassLoader.init LogLevel.process JarFinder.createJar RpcClientImpl.setupIOstreams {code} Most of these are straightforward. RpcClientImpl wraps the resource potentially multiple times and the resource needs to remain open after the method returns, so I intend to not fix that. Really, any use of that class should be wrapped in a finally and IT should get closed. -- This message was sent by Atlassian JIRA (v6.3.4#6332)