From ae74e23d45f8724f66a7e54f49e8e51fd06cc299 Mon Sep 17 00:00:00 2001 From: Arjen Poutsma Date: Tue, 13 Jan 2009 10:53:05 +0000 Subject: [PATCH] SWS-459 --- xml/src/main/java/org/springframework/xml/sax/SaxUtils.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xml/src/main/java/org/springframework/xml/sax/SaxUtils.java b/xml/src/main/java/org/springframework/xml/sax/SaxUtils.java index 02db0129..0ddbfe16 100644 --- a/xml/src/main/java/org/springframework/xml/sax/SaxUtils.java +++ b/xml/src/main/java/org/springframework/xml/sax/SaxUtils.java @@ -17,6 +17,7 @@ package org.springframework.xml.sax; import java.io.IOException; +import java.net.URI; import java.net.URISyntaxException; import org.xml.sax.InputSource; @@ -50,7 +51,7 @@ public abstract class SaxUtils { /** Retrieves the URL from the given resource as System ID. Returns null if it cannot be openened. */ public static String getSystemId(Resource resource) { try { - return resource.getURL().toURI().toString(); + return new URI(resource.getURL().toExternalForm()).toString(); } catch (IOException e) { return null;