We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 13a4bf9 commit ae74e23Copy full SHA for ae74e23
xml/src/main/java/org/springframework/xml/sax/SaxUtils.java
@@ -17,6 +17,7 @@
17
package org.springframework.xml.sax;
18
19
import java.io.IOException;
20
+import java.net.URI;
21
import java.net.URISyntaxException;
22
23
import org.xml.sax.InputSource;
@@ -50,7 +51,7 @@ public static InputSource createInputSource(Resource resource) throws IOExceptio
50
51
/** Retrieves the URL from the given resource as System ID. Returns <code>null</code> if it cannot be openened. */
52
public static String getSystemId(Resource resource) {
53
try {
- return resource.getURL().toURI().toString();
54
+ return new URI(resource.getURL().toExternalForm()).toString();
55
}
56
catch (IOException e) {
57
return null;
0 commit comments