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/15 06:36:04 UTC

svn commit: r704780 - /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/validation/ValidationState.java

Author: mrglavas
Date: Tue Oct 14 21:36:04 2008
New Revision: 704780

URL: http://svn.apache.org/viewvc?rev=704780&view=rev
Log:
Applying SVN rev 606480.

Some minor performance improvements. Replace the 
usage of Hashtable with the unsynchronized HashMap.

Modified:
    xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/validation/ValidationState.java

Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/validation/ValidationState.java
URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/validation/ValidationState.java?rev=704780&r1=704779&r2=704780&view=diff
==============================================================================
--- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/validation/ValidationState.java (original)
+++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/validation/ValidationState.java Tue Oct 14 21:36:04 2008
@@ -17,15 +17,15 @@
 
 package org.apache.xerces.impl.validation;
 
-import java.util.Enumeration;
-import java.util.Hashtable;
+import java.util.HashMap;
+import java.util.Iterator;
 
 import org.apache.xerces.impl.dv.ValidationContext;
 import org.apache.xerces.util.SymbolTable;
 import org.apache.xerces.xni.NamespaceContext;
 
 /**
- * Implementation of ValidationContext inteface. Used to establish an
+ * Implementation of the ValidationContext interface. Used to establish an
  * environment for simple type validation.
  * 
  * @xerces.internal
@@ -48,8 +48,8 @@
     private SymbolTable fSymbolTable            = null;
 
     //REVISIT: Should replace with a lighter structure.
-    private final Hashtable fIdTable    = new Hashtable();
-    private final Hashtable fIdRefTable = new Hashtable();
+    private final HashMap fIdTable    = new HashMap();
+    private final HashMap fIdRefTable = new HashMap();
     private final static Object fNullValue = new Object();
 
     //
@@ -88,11 +88,10 @@
      * otherwise return the first IDREF value without a matching ID value.
      */
     public String checkIDRefID () {
-        Enumeration en = fIdRefTable.keys();
-
+        Iterator iter = fIdRefTable.keySet().iterator();
         String key;
-        while (en.hasMoreElements()) {
-            key = (String)en.nextElement();
+        while (iter.hasNext()) {
+            key = (String) iter.next();
             if (!fIdTable.containsKey(key)) {
                   return key;
             }



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