[jboss-jira] [JBoss JIRA] (JGRP-2075) SYM/ASYM_ENCRYPT: don't use WeakHashMap for old ciphers

Bela Ban (JIRA) issues at jboss.org
Mon Jun 6 02:34:00 EDT 2016


Bela Ban created JGRP-2075:
------------------------------

             Summary: SYM/ASYM_ENCRYPT: don't use WeakHashMap for old ciphers
                 Key: JGRP-2075
                 URL: https://issues.jboss.org/browse/JGRP-2075
             Project: JGroups
          Issue Type: Task
            Reporter: Bela Ban
            Assignee: Bela Ban
            Priority: Minor
             Fix For: 3.6.10, 4.0


Currently we use WeakHashMap, but should not, reasons outlined below. We could replace it with a LazyRemovalCache.

Andrew Haley's email:
{quote}
TL/DR: Please don't use WeakReferences, SoftReferences, etc. to cache
any data which might point to native memory. In particular, never do
this with instances of java.security.Key. Instead, implement either
some kind of ageing strategy or a fixed-size cache.
{quote}



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jboss-jira mailing list