Author: mrglavas
Date: Sun May 25 19:25:25 2008
New Revision: 660084
URL: http://svn.apache.org/viewvc?rev=660084&view=rev
Log:
Miscellaneous code clean-up.
Modified:
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/util/XSNamedMap4Types.java
Modified:
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/util/XSNamedMap4Types.java
URL:
http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/util/XSNamedMap4Types.java?rev=660084&r1=660083&r2=660084&view=diff
==============================================================================
---
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/util/XSNamedMap4Types.java
(original)
+++
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/util/XSNamedMap4Types.java
Sun May 25 19:25:25 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]