[HHH-6442] In the case a URL cannot be reconstructed due to MalformedURLException, use the one passed in (which will already have a URLStreamHandler association)

This commit is contained in:
Andrew Lee Rubinger 2011-07-15 17:02:41 -04:00 committed by Emmanuel Bernard
parent c5b013d368
commit a7f5bc1a7d
1 changed files with 11 additions and 1 deletions

View File

@ -85,7 +85,17 @@ public class JarVisitorFactory {
}
}
else {
jarUrl = new URL( protocol, url.getHost(), url.getPort(), file );
try {
//We reconstruct the URL probably to make it work in some specific environments
//Forgot the exact details, sorry (and the Git history does not help)
jarUrl = new URL( protocol, url.getHost(), url.getPort(), file );
}
//HHH-6442: Arquilian
catch ( final MalformedURLException murle ) {
//Just use the provided URL as-is, likely it has a URLStreamHandler
//associated w/ the instance
jarUrl = url;
}
}
}
catch (MalformedURLException e) {