Skip to content

Commit

Permalink
HHH-12515 LocalXsdResolver should attempt local resource loading befo…
Browse files Browse the repository at this point in the history
…re attempting it via URL
  • Loading branch information
Sanne committed Apr 23, 2018
1 parent 2d1bec7 commit 5367a1c
Showing 1 changed file with 7 additions and 7 deletions.
Expand Up @@ -45,13 +45,6 @@ public static boolean isValidJpaVersion(String version) {
}

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 ) {
Expand All @@ -74,6 +67,13 @@ public static URL resolveLocalXsdUrl(String resourceName) {
}
}

// Last: we try name as a URL
try {
return new URL( resourceName );
}
catch (Exception ignore) {
}

return null;
}

Expand Down

0 comments on commit 5367a1c

Please sign in to comment.