Author: sandygao
Date: Tue May 29 20:25:34 2012
New Revision: 1343964
URL: http://svn.apache.org/viewvc?rev=1343964&view=rev
Log:
Fixing XERCESJ-1564: to intern the namespace name of QNames (using the symbol
table) before using it.
Modified:
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java
Modified:
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java
URL:
http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java?rev=1343964&r1=1343963&r2=1343964&view=diff
==============================================================================
---
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java
(original)
+++
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java
Tue May 29 20:25:34 2012
@@ -4020,6 +4020,9 @@ public class XMLSchemaValidator
void processRootTypeQName(final javax.xml.namespace.QName rootTypeQName) {
String rootTypeNamespace = rootTypeQName.getNamespaceURI();
+ // Add namespace to symbol table, to make sure it's interned.
+ // This namespace may be later compared with other values using ==.
+ rootTypeNamespace = fSymbolTable.addSymbol(rootTypeNamespace);
if (rootTypeNamespace != null &&
rootTypeNamespace.equals(XMLConstants.NULL_NS_URI)) {
rootTypeNamespace = null;
}
@@ -4047,6 +4050,9 @@ public class XMLSchemaValidator
void processRootElementDeclQName(final javax.xml.namespace.QName
rootElementDeclQName, final QName element) {
String rootElementDeclNamespace =
rootElementDeclQName.getNamespaceURI();
+ // Add namespace to symbol table, to make sure it's interned.
+ // This namespace may be later compared with other values using ==.
+ rootElementDeclNamespace =
fSymbolTable.addSymbol(rootElementDeclNamespace);
if (rootElementDeclNamespace != null &&
rootElementDeclNamespace.equals(XMLConstants.NULL_NS_URI)) {
rootElementDeclNamespace = null;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]