mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
fix NPE — url could be in any form, so, parsed can be null
This commit is contained in:
@@ -44,11 +44,16 @@ public final class Urls {
|
||||
|
||||
@NotNull
|
||||
public static Url newFromEncoded(@NotNull String url) {
|
||||
Url result = parse(url, false);
|
||||
Url result = parseEncoded(url);
|
||||
LOG.assertTrue(result != null, url);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public static Url parseEncoded(@NotNull String url) {
|
||||
return parse(url, false);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static Url newHttpUrl(@NotNull String authority, @Nullable String path) {
|
||||
return new UrlImpl("http", authority, path);
|
||||
|
||||
Reference in New Issue
Block a user