HHH-12515 LocalXsdResolver should attempt local resource loading before attempting it via URL
This commit is contained in:
parent
2d1bec72c9
commit
5367a1c8a6
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue