Author: mrglavas
Date: Tue Apr 27 20:24:07 2010
New Revision: 938636
URL: http://svn.apache.org/viewvc?rev=938636&view=rev
Log:
JIRA Issue #1424: http://issues.apache.org/jira/browse/XERCESJ-1424. Eliminate
redundant URI validation in getBaseURI(). If the parent node returned a
non-null value it means one of the ancestors already verified that the string
is a valid URI. Patch thanks to Ludger Bünger.
Modified:
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/dom/ElementImpl.java
Modified:
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/dom/ElementImpl.java
URL:
http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/dom/ElementImpl.java?rev=938636&r1=938635&r2=938636&view=diff
==============================================================================
---
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/dom/ElementImpl.java
(original)
+++
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/dom/ElementImpl.java
Tue Apr 27 20:24:07 2010
@@ -232,19 +232,7 @@ public class ElementImpl
// containing the element
// ownerNode serves as a parent or as document
- String baseURI = (this.ownerNode != null) ?
this.ownerNode.getBaseURI() : null;
- // base URI of parent element is not null
- if (baseURI != null) {
- try {
- // return valid absolute base URI
- return new URI(baseURI).toString();
- }
- catch (org.apache.xerces.util.URI.MalformedURIException e) {
- // REVISIT: what should happen in this case?
- return null;
- }
- }
- return null;
+ return (this.ownerNode != null) ? this.ownerNode.getBaseURI() : null;
} //getBaseURI
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]