Skip to content

Commit

Permalink
refactor method name
Browse files Browse the repository at this point in the history
  • Loading branch information
prakanth97 committed Apr 26, 2024
1 parent 7cafb0a commit 6ac4bb1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public Map<QualifiedName, V> getMembers() {
return members;
}

public V removeElement(QualifiedName qName) {
public V remove(QualifiedName qName) {
V field = members.remove(qName);
if (field == null) {
Map<String, List<QualifiedName>> fields = stringToQNameMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ private void readText(XMLStreamReader xmlStreamReader,
}
return;
} else {
currentField = xmlParserData.fieldHierarchy.peek().removeElement(contentQName);
currentField = xmlParserData.fieldHierarchy.peek().remove(contentQName);
}
}

Expand Down Expand Up @@ -949,7 +949,7 @@ private void handleAttributes(XMLStreamReader xmlStreamReader, XmlParserData xml
QName attributeQName = xmlStreamReader.getAttributeName(i);
QualifiedName attQName = new QualifiedName(attributeQName.getNamespaceURI(),
xmlParserData.attributePrefix + attributeQName.getLocalPart(), attributeQName.getPrefix());
Field field = xmlParserData.attributeHierarchy.peek().removeElement(attQName);
Field field = xmlParserData.attributeHierarchy.peek().remove(attQName);
if (field == null) {
Optional<Field> f = getFieldFromFieldHierarchy(attQName, xmlParserData);
if (f.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ private void convertText(String text, XmlAnalyzerData analyzerData) {
if (currentField == null) {
QualifiedName contentQName = new QualifiedName("", textFieldName, "");
if (analyzerData.fieldHierarchy.peek().contains(contentQName)) {
currentField = analyzerData.fieldHierarchy.peek().removeElement(contentQName);
currentField = analyzerData.fieldHierarchy.peek().remove(contentQName);
} else if (analyzerData.restTypes.peek() != null) {
currentField = TypeCreator.createField(analyzerData.restTypes.peek(),
analyzerData.textFieldName, SymbolFlags.REQUIRED);
Expand Down Expand Up @@ -543,7 +543,7 @@ private void handleAttributes(BXmlItem xmlItem, BMap<BString, Object> currentNod
BString key = entry.getKey();
QualifiedName attribute = getAttributePreservingNamespace(nsPrefixMap, key.getValue(),
analyzerData.attributePrefix);
Field field = analyzerData.attributeHierarchy.peek().removeElement(attribute);
Field field = analyzerData.attributeHierarchy.peek().remove(attribute);
if (field == null) {
if (innerElements.contains(attribute.getLocalPart())) {
// Element and Attribute have same name. Priority given to element.
Expand Down

0 comments on commit 6ac4bb1

Please sign in to comment.