You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by mr...@apache.org on 2008/10/14 06:19:03 UTC

svn commit: r704305 - /xerces/java/trunk/src/org/apache/xerces/dom/CoreDocumentImpl.java

Author: mrglavas
Date: Mon Oct 13 21:19:02 2008
New Revision: 704305

URL: http://svn.apache.org/viewvc?rev=704305&view=rev
Log:
Use a HashMap for the reversedIdentifiers table. There's no need for the synchronized Hashtable here.

Modified:
    xerces/java/trunk/src/org/apache/xerces/dom/CoreDocumentImpl.java

Modified: xerces/java/trunk/src/org/apache/xerces/dom/CoreDocumentImpl.java
URL: http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/dom/CoreDocumentImpl.java?rev=704305&r1=704304&r2=704305&view=diff
==============================================================================
--- xerces/java/trunk/src/org/apache/xerces/dom/CoreDocumentImpl.java (original)
+++ xerces/java/trunk/src/org/apache/xerces/dom/CoreDocumentImpl.java Mon Oct 13 21:19:02 2008
@@ -22,6 +22,7 @@
 import java.io.ObjectOutputStream;
 import java.lang.reflect.Constructor;
 import java.util.Enumeration;
+import java.util.HashMap;
 import java.util.Hashtable;
 import java.util.Map;
 import java.util.WeakHashMap;
@@ -332,11 +333,10 @@
         }
 
         if (deep) {
-            Hashtable reversedIdentifiers = null;
-
+            HashMap reversedIdentifiers = null;
             if (identifiers != null) {
                 // Build a reverse mapping from element to identifier.
-                reversedIdentifiers = new Hashtable();
+                reversedIdentifiers = new HashMap();
                 Enumeration elementIds = identifiers.keys();
                 while (elementIds.hasMoreElements()) {
                     Object elementId = elementIds.nextElement();
@@ -1502,14 +1502,14 @@
      * methods.
      *
      * The reversedIdentifiers parameter is provided for cloneNode to
-     * preserve the document's identifiers. The Hashtable has Elements as the
+     * preserve the document's identifiers. The HashMap has Elements as the
      * keys and their identifiers as the values. When an element is being
      * imported, a check is done for an associated identifier. If one exists,
      * the identifier is registered with the new, imported element. If
      * reversedIdentifiers is null, the parameter is not applied.
      */
     private Node importNode(Node source, boolean deep, boolean cloningDoc,
-    Hashtable reversedIdentifiers)
+    HashMap reversedIdentifiers)
     throws DOMException {
         Node newnode=null;
 		Hashtable userData = null;



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org