Return-Path: X-Original-To: apmail-cxf-issues-archive@www.apache.org Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6585718BF8 for ; Thu, 8 Oct 2015 17:04:27 +0000 (UTC) Received: (qmail 23681 invoked by uid 500); 8 Oct 2015 17:04:27 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 23638 invoked by uid 500); 8 Oct 2015 17:04:27 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 23518 invoked by uid 99); 8 Oct 2015 17:04:27 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Oct 2015 17:04:27 +0000 Date: Thu, 8 Oct 2015 17:04:27 +0000 (UTC) From: "Giovanni Borelli (JIRA)" To: issues@cxf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CXF-6632) Memory leak due to literal keys in WSDLDefinition map 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/CXF-6632?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Giovanni Borelli updated CXF-6632: ---------------------------------- Description: Looks like the definitionsMap in WSDLManagerImpl holds the WSDLDefinitions against a weak key, again relying on the WeakHashMap semantics for removal. The loadDefinition(URL) method loads the WSDLDef and puts this in a map against a String key . But this String key, is a literal String and will be present in the constant pool, where garbage collection never happens. This would mean the key would always be referenced from the constant pool, and the entry would never be removed. was: The definitionsMap in WSDLManagerImpl holds the WSDLDefinitions against a weak key, again relying on the WeakHashMap semantics for removal. The loadDefinition(String) method loads the WSDLDef and puts this in a map against a String key. But this String key, is a literal String and will be present in the constant pool, where garbage collection never happens. This would mean the key would always be referenced from the constant pool, and the entry would never be removed. > Memory leak due to literal keys in WSDLDefinition map > ----------------------------------------------------- > > Key: CXF-6632 > URL: https://issues.apache.org/jira/browse/CXF-6632 > Project: CXF > Issue Type: Bug > Components: Core > Affects Versions: 2.7.17 > Reporter: Giovanni Borelli > Assignee: Bharath Ganesh > Priority: Minor > > Looks like the definitionsMap in WSDLManagerImpl holds the WSDLDefinitions against a weak key, again relying > on the WeakHashMap semantics for removal. > The loadDefinition(URL) method loads the WSDLDef and puts this in a map > against a String key . But this String key, is a literal String and will be > present in the constant pool, where garbage collection never happens. This > would mean the key would always be referenced from the constant pool, and > the entry would never be removed. -- This message was sent by Atlassian JIRA (v6.3.4#6332)