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 2007/12/22 22:00:53 UTC
svn commit: r606491 -
/xerces/java/trunk/src/org/apache/xerces/impl/validation/ValidationManager.java
Author: mrglavas
Date: Sat Dec 22 13:00:53 2007
New Revision: 606491
URL: http://svn.apache.org/viewvc?rev=606491&view=rev
Log:
Some minor performance improvements. Replace the
usage of Vector with the unsynchronized ArrayList.
Modified:
xerces/java/trunk/src/org/apache/xerces/impl/validation/ValidationManager.java
Modified: xerces/java/trunk/src/org/apache/xerces/impl/validation/ValidationManager.java
URL: http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/impl/validation/ValidationManager.java?rev=606491&r1=606490&r2=606491&view=diff
==============================================================================
--- xerces/java/trunk/src/org/apache/xerces/impl/validation/ValidationManager.java (original)
+++ xerces/java/trunk/src/org/apache/xerces/impl/validation/ValidationManager.java Sat Dec 22 13:00:53 2007
@@ -17,7 +17,7 @@
package org.apache.xerces.impl.validation;
-import java.util.Vector;
+import java.util.ArrayList;
/**
* ValidationManager is a coordinator property for validators in the
@@ -33,7 +33,7 @@
*/
public class ValidationManager {
- protected final Vector fVSs = new Vector();
+ protected final ArrayList fVSs = new ArrayList();
protected boolean fGrammarFound = false;
// used by the DTD validator to tell other components that it has a
@@ -46,7 +46,7 @@
* the validation manager.
*/
public final void addValidationState(ValidationState vs) {
- fVSs.addElement(vs);
+ fVSs.add(vs);
}
/**
@@ -54,7 +54,7 @@
*/
public final void setEntityState(EntityState state) {
for (int i = fVSs.size()-1; i >= 0; i--) {
- ((ValidationState)fVSs.elementAt(i)).setEntityState(state);
+ ((ValidationState)fVSs.get(i)).setEntityState(state);
}
}
@@ -75,8 +75,8 @@
} // isCachedDTD(): boolean
- public final void reset (){
- fVSs.removeAllElements();
+ public final void reset () {
+ fVSs.clear();
fGrammarFound = false;
fCachedDTD = false;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org