Skip to content

Commit 596946e

Browse files
committed
SWS-594 - SchemaCollection issue when XSD files are in the classpath, in different JAR artifacts
1 parent 3091109 commit 596946e

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

xml/src/main/java/org/springframework/xml/xsd/commons/CommonsXsdSchemaCollection.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -257,16 +257,14 @@ else if (StringUtils.hasLength(baseUri)) {
257257
}
258258
}
259259
catch (IOException e) {
260-
// fall through to super.resolveEntity
260+
// fall through
261261
}
262262
}
263-
else {
264-
// let's try and find it on the classpath, see SWS-362
265-
String classpathLocation = ResourceLoader.CLASSPATH_URL_PREFIX + "/" + schemaLocation;
266-
resource = resourceLoader.getResource(classpathLocation);
267-
if (resource.exists()) {
268-
return createInputSource(resource);
269-
}
263+
// let's try and find it on the classpath, see SWS-362
264+
String classpathLocation = ResourceLoader.CLASSPATH_URL_PREFIX + "/" + schemaLocation;
265+
resource = resourceLoader.getResource(classpathLocation);
266+
if (resource.exists()) {
267+
return createInputSource(resource);
270268
}
271269
}
272270
return super.resolveEntity(namespace, schemaLocation, baseUri);

0 commit comments

Comments
 (0)