From dev-return-17032-apmail-openjpa-dev-archive=openjpa.apache.org@openjpa.apache.org Sun Aug 01 21:55:38 2010 Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 24402 invoked from network); 1 Aug 2010 21:55:38 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 1 Aug 2010 21:55:38 -0000 Received: (qmail 73524 invoked by uid 500); 1 Aug 2010 21:55:38 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 73386 invoked by uid 500); 1 Aug 2010 21:55:37 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Received: (qmail 73369 invoked by uid 99); 1 Aug 2010 21:55:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Aug 2010 21:55:37 +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; Sun, 01 Aug 2010 21:55:36 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o71LtGUf024049 for ; Sun, 1 Aug 2010 21:55:16 GMT Message-ID: <2630793.109741280699716638.JavaMail.jira@thor> Date: Sun, 1 Aug 2010 17:55:16 -0400 (EDT) From: "Patrick Linskey (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Updated: (OPENJPA-1755) MultiClassLoader relies on its underlying ClassLoaders for hashCode In-Reply-To: <22043028.109721280699595853.JavaMail.jira@thor> 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/OPENJPA-1755?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Patrick Linskey updated OPENJPA-1755: ------------------------------------- Attachment: (was: OPENJPA-1755.txt) > MultiClassLoader relies on its underlying ClassLoaders for hashCode > ------------------------------------------------------------------- > > Key: OPENJPA-1755 > URL: https://issues.apache.org/jira/browse/OPENJPA-1755 > Project: OpenJPA > Issue Type: Bug > Reporter: Patrick Linskey > Attachments: OPENJPA-1755.txt > > > The MultiClassLoader relies on its underlying ClassLoaders in its hashing algorithm. This is problematic if the underlying classloaders refuse to return a hash or if the classloader list changes over time. > I ran into a problem that demanded a resolution to this issue when doing some work with OpenJPA in a Google AppEngine context. I don't have a stack trace handy. > An effective-yet-ugly fix was to simply change the hashCode() implementation to return a constant value (I chose '1'). This clearly is a crappy hashing algorithm, but will always respect the hashing contract. And I don't think that we really put MultiClassLoaders into big maps or anything. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.