You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by mu...@apache.org on 2008/11/05 20:18:39 UTC
svn commit: r711668 -
/xml/security/trunk/src/org/apache/xml/security/utils/IdResolver.java
Author: mullan
Date: Wed Nov 5 11:18:38 2008
New Revision: 711668
URL: http://svn.apache.org/viewvc?rev=711668&view=rev
Log:
Fixed 46101: org.apache.xml.security.utils.IdResolver is not thread safe
Slight change to original fix to lock the docMap during a put-if-absent set of
operations.
Modified:
xml/security/trunk/src/org/apache/xml/security/utils/IdResolver.java
Modified: xml/security/trunk/src/org/apache/xml/security/utils/IdResolver.java
URL: http://svn.apache.org/viewvc/xml/security/trunk/src/org/apache/xml/security/utils/IdResolver.java?rev=711668&r1=711667&r2=711668&view=diff
==============================================================================
--- xml/security/trunk/src/org/apache/xml/security/utils/IdResolver.java (original)
+++ xml/security/trunk/src/org/apache/xml/security/utils/IdResolver.java Wed Nov 5 11:18:38 2008
@@ -69,10 +69,8 @@
WeakHashMap elementMap;
synchronized (docMap) {
elementMap = (WeakHashMap) docMap.get(doc);
- }
- if(elementMap == null) {
- elementMap = new WeakHashMap();
- synchronized (docMap) {
+ if (elementMap == null) {
+ elementMap = new WeakHashMap();
docMap.put(doc, elementMap);
}
}