Skip to content

Commit

Permalink
Correct remove method of QualifiedNameMap
Browse files Browse the repository at this point in the history
  • Loading branch information
prakanth97 committed May 27, 2024
1 parent 326535a commit 98bf3a4
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,19 @@ public V remove(QualifiedName qName) {
if (!fields.containsKey(localName)) {
return null;
}

List<QualifiedName> qNames = fields.get(localName);
for (QualifiedName qualifiedName : fields.get(localName)) {
if (qualifiedName.getNamespaceURI().equals(Constants.NS_ANNOT_NOT_DEFINED)) {
field = this.members.remove(qualifiedName);
qNames.remove(qualifiedName);
break;
}
}

if (qNames.isEmpty()) {
fields.remove(localName);
}
}
return field;
}
Expand Down

0 comments on commit 98bf3a4

Please sign in to comment.