mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
correct fix WEB-8151
This commit is contained in:
@@ -67,6 +67,11 @@ public final class LocalFileUrl implements Url {
|
||||
return path.equals(((LocalFileUrl)o).path);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equalsIgnoreParameters(@Nullable Url url) {
|
||||
return equals(url);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return path.hashCode();
|
||||
|
||||
@@ -145,14 +145,24 @@ public final class UrlImpl implements Url {
|
||||
return false;
|
||||
}
|
||||
|
||||
UrlImpl url = (UrlImpl)o;
|
||||
return equalsIgnoreParameters(url) && (parameters == null ? url.parameters == null : parameters.equals(url.parameters));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equalsIgnoreParameters(@Nullable Url o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (!(o instanceof UrlImpl)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
UrlImpl url = (UrlImpl)o;
|
||||
if (!scheme.equals(url.scheme)) {
|
||||
return false;
|
||||
}
|
||||
if (authority != null ? !authority.equals(url.authority) : url.authority != null) {
|
||||
return false;
|
||||
}
|
||||
if (parameters != null ? !parameters.equals(url.parameters) : url.parameters != null) {
|
||||
if (authority == null ? url.authority != null : !authority.equals(url.authority)) {
|
||||
return false;
|
||||
}
|
||||
String decodedPath = getPath();
|
||||
|
||||
@@ -25,4 +25,6 @@ public interface Url {
|
||||
|
||||
@Nullable
|
||||
String getParametersPart();
|
||||
|
||||
boolean equalsIgnoreParameters(@Nullable Url url);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user