Return-Path: Delivered-To: apmail-jakarta-httpclient-dev-archive@www.apache.org Received: (qmail 68407 invoked from network); 7 Aug 2006 11:11:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 7 Aug 2006 11:11:57 -0000 Received: (qmail 82039 invoked by uid 500); 7 Aug 2006 11:11:57 -0000 Delivered-To: apmail-jakarta-httpclient-dev-archive@jakarta.apache.org Received: (qmail 81925 invoked by uid 500); 7 Aug 2006 11:11:56 -0000 Mailing-List: contact httpclient-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "HttpClient Project" Reply-To: "HttpClient Project" Delivered-To: mailing list httpclient-dev@jakarta.apache.org Received: (qmail 81914 invoked by uid 99); 7 Aug 2006 11:11:56 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Aug 2006 04:11:56 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Aug 2006 04:11:55 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 5D1077142A7 for ; Mon, 7 Aug 2006 11:09:15 +0000 (GMT) Message-ID: <17756915.1154948955378.JavaMail.jira@brutus> Date: Mon, 7 Aug 2006 04:09:15 -0700 (PDT) From: "Oleg Kalnichevski (JIRA)" To: httpclient-dev@jakarta.apache.org Subject: [jira] Assigned: (HTTPCLIENT-593) ProtocolSocketFactory equals and hashCode don't support subclassing In-Reply-To: <2542346.1154535436542.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/HTTPCLIENT-593?page=all ] Oleg Kalnichevski reassigned HTTPCLIENT-593: -------------------------------------------- Assignee: Oleg Kalnichevski > ProtocolSocketFactory equals and hashCode don't support subclassing > ------------------------------------------------------------------- > > Key: HTTPCLIENT-593 > URL: http://issues.apache.org/jira/browse/HTTPCLIENT-593 > Project: HttpComponents HttpClient > Issue Type: Bug > Components: HttpClient > Affects Versions: 3.1 Alpha 1, Nightly Builds > Reporter: Chris Audley > Assigned To: Oleg Kalnichevski > Priority: Minor > Fix For: 3.1 Beta 1 > > Attachments: socketfactory.patch > > > In the implemenation of equals and hashCode for the classes > org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory > org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory > The implementation of equals and hashCode attempts to make all instances of the classes equal. However, the manner in which the methods are coded makes it necessary for any subclass to implement equals and hashCode themselves. A minor change to the methods in these classes will make possible to subclass these factories without re-implementing the equals and hashCode. The method equals should be written as > return ((obj != null) && obj.getClass().equals(getClass())); > rather than > return ((obj != null) && obj.getClass().equals(DefaultProtocolSocketFactory.class)); > And similarly, the hashCode method should be > return getClass().hashCode(); > rather than > return DefaultProtocolSocketFactory.class.hashCode(); -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: httpclient-dev-help@jakarta.apache.org