You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by mu...@apache.org on 2007/09/10 19:27:50 UTC

svn commit: r574306 - /xml/security/trunk/src_unitTests/org/apache/xml/security/test/utils/resolver/ResourceResolverTest.java

Author: mullan
Date: Mon Sep 10 10:27:49 2007
New Revision: 574306

URL: http://svn.apache.org/viewvc?rev=574306&view=rev
Log:
Fixed bug 42865: Problem with empty BaseURI in ResolverLocalFilesystem

Modified:
    xml/security/trunk/src_unitTests/org/apache/xml/security/test/utils/resolver/ResourceResolverTest.java

Modified: xml/security/trunk/src_unitTests/org/apache/xml/security/test/utils/resolver/ResourceResolverTest.java
URL: http://svn.apache.org/viewvc/xml/security/trunk/src_unitTests/org/apache/xml/security/test/utils/resolver/ResourceResolverTest.java?rev=574306&r1=574305&r2=574306&view=diff
==============================================================================
--- xml/security/trunk/src_unitTests/org/apache/xml/security/test/utils/resolver/ResourceResolverTest.java (original)
+++ xml/security/trunk/src_unitTests/org/apache/xml/security/test/utils/resolver/ResourceResolverTest.java Mon Sep 10 10:27:49 2007
@@ -85,6 +85,20 @@
 	} catch (Exception e) { }
     }
 
+    public static void testLocalFileWithEmptyBaseURI() throws Exception {
+	Document doc = 
+        DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
+	Attr uriAttr = doc.createAttribute("URI");
+	uriAttr.setValue("file:/tmp/foo.xml");
+	ResourceResolver res = 
+	    ResourceResolver.getInstance(uriAttr, "file:/tmp/foo.xml");
+	try {
+	    res.resolve(uriAttr, "");
+	} catch (Exception e) {
+	    fail(e.getMessage());
+	}
+    }
+
     static {
 	org.apache.xml.security.Init.init();
     }