Return-Path: X-Original-To: apmail-openjpa-dev-archive@www.apache.org Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E2D53104C3 for ; Tue, 18 Feb 2014 15:04:43 +0000 (UTC) Received: (qmail 23086 invoked by uid 500); 18 Feb 2014 15:04:41 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 20727 invoked by uid 500); 18 Feb 2014 15:04:28 -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 19857 invoked by uid 99); 18 Feb 2014 15:04:21 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Feb 2014 15:04:21 +0000 Date: Tue, 18 Feb 2014 15:04:21 +0000 (UTC) From: "Dalia Abo Sheasha (JIRA)" To: dev@openjpa.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (OPENJPA-2441) TestNullSafeConcurrentHashMap fails when running on Oracle Java 8 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-2441?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dalia Abo Sheasha updated OPENJPA-2441: --------------------------------------- Attachment: 2441.patch I have attached a patch where NullSafeConcurrentHashMap is deprecated as well as SizedConcurrentHashMap since it extends NullSafeConcurrentHashMap. Naturally, the tests corresponding to both classes were removed. Any usage of the SizedConcurrentHashMap data structure was replaced by a ConcurrentReferenceHashMap which supports setting a maximum size for the map. Usage of NullSafeConcurrentHashMap was replaced by ConcurrentHashMap. Since this change required replacing some operations, I added some tests to make sure the logic for the method using NullSafeConcurrentHashMap is still working as intended. > TestNullSafeConcurrentHashMap fails when running on Oracle Java 8 > ------------------------------------------------------------------ > > Key: OPENJPA-2441 > URL: https://issues.apache.org/jira/browse/OPENJPA-2441 > Project: OpenJPA > Issue Type: Bug > Components: lib > Affects Versions: 2.4.0 > Environment: >java -version > java version "1.8.0-ea" > Java(TM) SE Runtime Environment (build 1.8.0-ea-b109) > Java HotSpot(TM) 64-Bit Server VM (build 25.0-b51, mixed mode) > Reporter: Rick Curtis > Attachments: 2441.patch > > > While testing with Java 8 I found that org.apache.openjpa.lib.util.concurrent.NullSafeConcurrentHashMap doesn't work on Oracle Java 8 as java.util.ConcurrentHashMap was completely rewritten and it doesn't like playing with our extension. > I'm not sure what the correct solution for this JIRA will be, but I wanted to get it documented. I did a small amount of searching and it appears that NullSafeConcurrentHashMap isn't used very much in our code base so it might be easiest to remove those references and deprecate the data structure. That being said, we'll still need to fix this data structure as it is possible that a user of OpenJPA pulled this structure into app code. -- This message was sent by Atlassian JIRA (v6.1.5#6160)