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 2010/04/27 22:23:42 UTC
svn commit: r938635 -
/xerces/java/trunk/src/org/apache/xerces/dom/ElementImpl.java
Author: mrglavas
Date: Tue Apr 27 20:23:42 2010
New Revision: 938635
URL: http://svn.apache.org/viewvc?rev=938635&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/trunk/src/org/apache/xerces/dom/ElementImpl.java
Modified: xerces/java/trunk/src/org/apache/xerces/dom/ElementImpl.java
URL: http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/dom/ElementImpl.java?rev=938635&r1=938634&r2=938635&view=diff
==============================================================================
--- xerces/java/trunk/src/org/apache/xerces/dom/ElementImpl.java (original)
+++ xerces/java/trunk/src/org/apache/xerces/dom/ElementImpl.java Tue Apr 27 20:23:42 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: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org