Blame SOURCES/dom4j-1.6.1-Remove-references-to-ConcurrentReaderHashMap.patch

37c724
From cc644b2c2073acac30cc80d3a160c1007bad4213 Mon Sep 17 00:00:00 2001
37c724
From: Michal Srb <msrb@redhat.com>
37c724
Date: Tue, 2 Jul 2013 12:54:37 +0200
37c724
Subject: [PATCH] Remove references to ConcurrentReaderHashMap
37c724
37c724
File ConcurrentReaderHashMap.java has been removed due to unclear licensing
37c724
---
37c724
 src/java/org/dom4j/tree/NamespaceCache.java | 8 ++++----
37c724
 1 file changed, 4 insertions(+), 4 deletions(-)
37c724
37c724
diff --git a/src/java/org/dom4j/tree/NamespaceCache.java b/src/java/org/dom4j/tree/NamespaceCache.java
37c724
index 89ff316..9b716de 100644
37c724
--- a/src/java/org/dom4j/tree/NamespaceCache.java
37c724
+++ b/src/java/org/dom4j/tree/NamespaceCache.java
37c724
@@ -9,7 +9,9 @@ package org.dom4j.tree;
37c724
 
37c724
 import java.lang.ref.WeakReference;
37c724
 import java.lang.reflect.Constructor;
37c724
+import java.lang.UnsupportedOperationException;
37c724
 import java.util.Map;
37c724
+import java.util.concurrent.ConcurrentHashMap;
37c724
 
37c724
 import org.dom4j.Namespace;
37c724
 
37c724
@@ -59,9 +61,7 @@ public class NamespaceCache {
37c724
                 cache = (Map) clazz.newInstance();
37c724
                 noPrefixCache = (Map) clazz.newInstance();
37c724
             } catch (Throwable t2) {
37c724
-                /* If previous implementations fail, use internal one */
37c724
-                cache = new ConcurrentReaderHashMap();
37c724
-                noPrefixCache = new ConcurrentReaderHashMap();
37c724
+                throw new UnsupportedOperationException("ConcurrentReaderHashMap is not available");
37c724
             }
37c724
         }
37c724
     }
37c724
@@ -154,7 +154,7 @@ public class NamespaceCache {
37c724
                 answer = (Map) cache.get(uri);
37c724
 
37c724
                 if (answer == null) {
37c724
-                    answer = new ConcurrentReaderHashMap();
37c724
+                    answer = new ConcurrentHashMap();
37c724
                     cache.put(uri, answer);
37c724
                 }
37c724
             }
37c724
-- 
37c724
1.8.1.4
37c724