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:24:07 UTC

svn commit: r938636 - /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/dom/ElementImpl.java

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: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org