We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 39cc79b commit 4906d90Copy full SHA for 4906d90
src/main/java/com/networknt/schema/uri/URLFactory.java
@@ -40,10 +40,8 @@ public final class URLFactory implements URIFactory {
40
@Override
41
public URI create(final String uri) {
42
try {
43
- return new URL(uri).toURI();
44
- } catch (MalformedURLException e) {
45
- throw new IllegalArgumentException("Unable to create URI.", e);
46
- } catch (URISyntaxException e) {
+ return URI.create(uri);
+ } catch (IllegalArgumentException e) {
47
throw new IllegalArgumentException("Unable to create URI.", e);
48
}
49
0 commit comments