Return-Path: X-Original-To: apmail-crunch-dev-archive@www.apache.org Delivered-To: apmail-crunch-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0893E18585 for ; Fri, 2 Oct 2015 20:09:32 +0000 (UTC) Received: (qmail 65192 invoked by uid 500); 2 Oct 2015 20:09:26 -0000 Delivered-To: apmail-crunch-dev-archive@crunch.apache.org Received: (qmail 65132 invoked by uid 500); 2 Oct 2015 20:09:26 -0000 Mailing-List: contact dev-help@crunch.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@crunch.apache.org Delivered-To: mailing list dev@crunch.apache.org Received: (qmail 65036 invoked by uid 500); 2 Oct 2015 20:09:26 -0000 Delivered-To: apmail-incubator-crunch-dev@incubator.apache.org Received: (qmail 64995 invoked by uid 99); 2 Oct 2015 20:09:26 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Oct 2015 20:09:26 +0000 Date: Fri, 2 Oct 2015 20:09:26 +0000 (UTC) From: "Sean Owen (JIRA)" To: crunch-dev@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (CRUNCH-567) close() triggers NPE if initialize() fails in 2 classes MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Sean Owen created CRUNCH-567: -------------------------------- Summary: close() triggers NPE if initialize() fails in 2 classes Key: CRUNCH-567 URL: https://issues.apache.org/jira/browse/CRUNCH-567 Project: Crunch Issue Type: Bug Components: Core Affects Versions: 0.12.0 Reporter: Sean Owen Assignee: Josh Wills Priority: Trivial Quite trivial, but just noticed this on a customer project: in AvroRecordReader and HFileInputFormat, close() closes a reader object. However it will be null if initialize() is never called or fails to complete normally, generating an NPE. It ends up being an issue since their close() is called in some kind of finally block at some point. Attaching a patch for now but do we do pull requests here now instead? -- This message was sent by Atlassian JIRA (v6.3.4#6332)