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/05/26 04:24:40 UTC
svn commit: r660083 -
/xerces/java/trunk/src/org/apache/xerces/impl/xs/util/XSNamedMap4Types.java
Author: mrglavas
Date: Sun May 25 19:24:39 2008
New Revision: 660083
URL: http://svn.apache.org/viewvc?rev=660083&view=rev
Log:
Miscellaneous code clean-up.
Modified:
xerces/java/trunk/src/org/apache/xerces/impl/xs/util/XSNamedMap4Types.java
Modified: xerces/java/trunk/src/org/apache/xerces/impl/xs/util/XSNamedMap4Types.java
URL: http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/impl/xs/util/XSNamedMap4Types.java?rev=660083&r1=660082&r2=660083&view=diff
==============================================================================
--- xerces/java/trunk/src/org/apache/xerces/impl/xs/util/XSNamedMap4Types.java (original)
+++ xerces/java/trunk/src/org/apache/xerces/impl/xs/util/XSNamedMap4Types.java Sun May 25 19:24:39 2008
@@ -22,7 +22,7 @@
import org.apache.xerces.util.SymbolHash;
/**
- * Containts the map between qnames and XSObject's.
+ * Contains the map between qnames and XSObject's.
*
* @xerces.internal
*
@@ -36,7 +36,7 @@
private final short fType;
/**
- * Construct an XSNamedMap implmentation for one namespace
+ * Construct an XSNamedMap implementation for one namespace
*
* @param namespace the namespace to which the components belong
* @param map the map from local names to components
@@ -48,7 +48,7 @@
}
/**
- * Construct an XSNamedMap implmentation for a list of namespaces
+ * Construct an XSNamedMap implementation for a list of namespaces
*
* @param namespaces the namespaces to which the components belong
* @param maps the maps from local names to components
@@ -69,8 +69,9 @@
if (fLength == -1) {
// first get the number of components for all types
int length = 0;
- for (int i = 0; i < fNSNum; i++)
+ for (int i = 0; i < fNSNum; i++) {
length += fMaps[i].getLength();
+ }
// then copy all types to an temporary array
int pos = 0;
XSObject[] array = new XSObject[length];
@@ -106,7 +107,7 @@
for (int i = 0; i < fNSNum; i++) {
if (isEqual(namespace, fNamespaces[i])) {
XSTypeDefinition type = (XSTypeDefinition)fMaps[i].get(localName);
- // only return it if it mataches the required type
+ // only return it if it matches the required type
if (type.getTypeCategory() == fType) {
return type;
}
@@ -130,8 +131,9 @@
if (fArray == null) {
getLength();
}
- if (index < 0 || index >= fLength)
+ if (index < 0 || index >= fLength) {
return null;
+ }
return fArray[index];
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org