HHH-12515 LocalXsdResolver should attempt local resource loading before attempting it via URL

This commit is contained in:
Sanne Grinovero 2018-04-23 09:59:38 +01:00
parent 2d1bec72c9
commit 5367a1c8a6
1 changed files with 7 additions and 7 deletions

View File

@ -45,13 +45,6 @@ public class LocalXsdResolver {
}
public static URL resolveLocalXsdUrl(String resourceName) {
// first we try name as a URL
try {
return new URL( resourceName );
}
catch (Exception ignore) {
}
try {
final URL url = LocalXsdResolver.class.getClassLoader().getResource( resourceName );
if ( url != null ) {
@ -74,6 +67,13 @@ public class LocalXsdResolver {
}
}
// Last: we try name as a URL
try {
return new URL( resourceName );
}
catch (Exception ignore) {
}
return null;
}