Return-Path: Delivered-To: apmail-hc-dev-archive@www.apache.org Received: (qmail 74585 invoked from network); 14 May 2010 15:12:08 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 14 May 2010 15:12:08 -0000 Received: (qmail 89336 invoked by uid 500); 14 May 2010 15:12:08 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 89297 invoked by uid 500); 14 May 2010 15:12:08 -0000 Mailing-List: contact dev-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list dev@hc.apache.org Received: (qmail 89265 invoked by uid 99); 14 May 2010 15:12:08 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 May 2010 15:12:08 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 May 2010 15:12:06 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o4EFBiYV021706 for ; Fri, 14 May 2010 15:11:44 GMT Message-ID: <31908260.43551273849904528.JavaMail.jira@thor> Date: Fri, 14 May 2010 11:11:44 -0400 (EDT) From: "Oleg Kalnichevski (JIRA)" To: dev@hc.apache.org Subject: [jira] Updated: (HTTPCLIENT-942) ClientConnectionRelease example is incorrect In-Reply-To: <20496270.43331273848705033.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HTTPCLIENT-942?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Oleg Kalnichevski updated HTTPCLIENT-942: ----------------------------------------- Fix Version/s: 4.1 Alpha3 Priority: Minor (was: Major) Component/s: Examples > 1. if error happens in BufferedReader constructor (OutOfMemoryError, StackOverflowError), reader.close() > is not called and connection is not released If your application throws OutOfMemoryError or StackOverflowError, you have much more to worry about than a leaked connection, but strictly speaking you are correct > 2. if error happens in reader.readLine(), reader.close() is called, but httpget.abort() is not. This is incorrect. HttpClient will automatically release the underlying connection upon an I/O error. Calling HttpGet#abort is not necessary. Oleg > ClientConnectionRelease example is incorrect > -------------------------------------------- > > Key: HTTPCLIENT-942 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-942 > Project: HttpComponents HttpClient > Issue Type: Bug > Components: Examples > Reporter: Stepan Koltsov > Priority: Minor > Fix For: 4.1 Alpha3 > > > http://svn.apache.org/repos/asf/httpcomponents/httpclient/tags/4.0.1/httpclient/src/examples/org/apache/http/examples/client/ClientConnectionRelease.java > is incorrect: > 1. if error happens in BufferedReader constructor (OutOfMemoryError, StackOverflowError), reader.close() is not called and connection is not released > 2. if error happens in reader.readLine(), reader.close() is called, but httpget.abort() is not. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org For additional commands, e-mail: dev-help@hc.apache.org