Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 65786 invoked from network); 9 Dec 2009 15:55:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 9 Dec 2009 15:55:41 -0000 Received: (qmail 33973 invoked by uid 500); 9 Dec 2009 15:55:40 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 33897 invoked by uid 500); 9 Dec 2009 15:55:40 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@cocoon.apache.org List-Id: Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 33889 invoked by uid 99); 9 Dec 2009 15:55:40 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Dec 2009 15:55:40 +0000 X-ASF-Spam-Status: No, hits=-10.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Dec 2009 15:55:38 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 2B988234C4AE for ; Wed, 9 Dec 2009 07:55:18 -0800 (PST) Message-ID: <1932468299.1260374118177.JavaMail.jira@brutus> Date: Wed, 9 Dec 2009 15:55:18 +0000 (UTC) From: "Steven Dolg (JIRA)" To: dev@cocoon.apache.org Subject: [jira] Commented: (COCOON3-46) URLConnectionUtils.closeQuietly() complains loudly if servletConnection == null In-Reply-To: <467377389.1260002480618.JavaMail.jira@brutus> 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/COCOON3-46?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12788132#action_12788132 ] Steven Dolg commented on COCOON3-46: ------------------------------------ All the patch does is introduce a null check for closeQuietly(..). Feels like the right thing to do. Applied with minor formatting changes. > URLConnectionUtils.closeQuietly() complains loudly if servletConnection == null > ------------------------------------------------------------------------------- > > Key: COCOON3-46 > URL: https://issues.apache.org/jira/browse/COCOON3-46 > Project: Cocoon 3 > Issue Type: Improvement > Components: cocoon-pipeline > Affects Versions: 3.0.0-alpha-2 > Reporter: Jos Snellings > Assignee: Steven Dolg > Priority: Minor > Fix For: 3.0.0-alpha-3 > > Attachments: closeQuietly-fix.patch > > > finally clause in URLResponse method execute() > contains call to URLConnectionUtils.closeQuietly. > If servletConnection = this.url.openConnection(); fails, servletConnection is null. > In that case closeQuietly causes a stacktrace to be output. > Solution is if (servletConnection != null) URLConnectionUtils.closeQuietly(servletConnection);, guard the call with a test, > or even better, take into account in closeQuietly that the input parameter may be null. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.