Fixed: Goto declaration - exception when exists QName with 0 namespace index

This commit is contained in:
Jindra Petřík
2021-03-05 15:18:00 +01:00
parent 19c836764f
commit 8186245151
2 changed files with 13 additions and 6 deletions

View File

@@ -532,13 +532,19 @@ public class Multiname {
}
Namespace otherNs = other.getSingleNamespace(otherCpool);
Namespace thisNs = getSingleNamespace(thisCpool);
if (otherNs.kind != thisNs.kind) {
return false;
if (thisNs != null && otherNs != null) {
if (otherNs.kind != thisNs.kind) {
return false;
}
if (otherNs.kind == Namespace.KIND_PRIVATE) {
return false;
}
if (!Objects.equals(otherNs.getName(otherCpool).toRawString(), thisNs.getName(thisCpool).toRawString())) {
return false;
}
}
if (otherNs.kind == Namespace.KIND_PRIVATE) {
return false;
}
if (!Objects.equals(otherNs.getName(otherCpool).toRawString(), thisNs.getName(thisCpool).toRawString())) {
if ((thisNs == null && otherNs != null) || (otherNs == null && thisNs != null)) {
return false;
}