Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 60C3E200B7A for ; Sun, 21 Aug 2016 19:19:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 5F2FF160A8E; Sun, 21 Aug 2016 17:19:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id A84DD160AAA for ; Sun, 21 Aug 2016 19:19:21 +0200 (CEST) Received: (qmail 22062 invoked by uid 500); 21 Aug 2016 17:19:20 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 22021 invoked by uid 99); 21 Aug 2016 17:19:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 21 Aug 2016 17:19:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 9A9212C0154 for ; Sun, 21 Aug 2016 17:19:20 +0000 (UTC) Date: Sun, 21 Aug 2016 17:19:20 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (LANG-1230) Remove unnecessary synchronization from registry lookup in EqualsBuilder and HashCodeBuilder MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sun, 21 Aug 2016 17:19:22 -0000 [ https://issues.apache.org/jira/browse/LANG-1230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15429808#comment-15429808 ] ASF GitHub Bot commented on LANG-1230: -------------------------------------- Github user asfgit closed the pull request at: https://github.com/apache/commons-lang/pull/143 > Remove unnecessary synchronization from registry lookup in EqualsBuilder and HashCodeBuilder > -------------------------------------------------------------------------------------------- > > Key: LANG-1230 > URL: https://issues.apache.org/jira/browse/LANG-1230 > Project: Commons Lang > Issue Type: Bug > Components: lang.builder.* > Affects Versions: 2.6 > Reporter: Philippe Marschall > Fix For: 3.5 > > > We're running into contention issues in registry lookup in EqualsBuilder and HashCodeBuilder. We believe the synchronization for the registry lookup is unnecessary. ThreadLocals are thread safe, each thread gets own value. Therefore no other thread can read or change the value of the current thread. As a consequence access to ThreadLocals does not need to be synchronized. > Since IDKey uses object identity and the identity hashCode it does use neither EqualsBuilder nor HashCodeBuilder. This means that recursive calls to register and unregister are not possible even if the registered objects use EqualsBuilder or HashCodeBuilder. This also makes re-reading redundant. > The issue was likely introduced in 2.5 by LANG-586 but 2.6 is the oldest version we can select. -- This message was sent by Atlassian JIRA (v6.3.4#6332)