Skip to content

Commit

Permalink
Simplify XMLEventStreamWriter.writeEndElement()
Browse files Browse the repository at this point in the history
  • Loading branch information
stsypanov authored and jhoeller committed Nov 19, 2020
1 parent 9ec96f6 commit c92dcce
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,8 @@ private void closeEmptyElementIfNecessary() throws XMLStreamException {
public void writeEndElement() throws XMLStreamException {
closeEmptyElementIfNecessary();
int last = this.endElements.size() - 1;
EndElement lastEndElement = this.endElements.get(last);
EndElement lastEndElement = this.endElements.remove(last);
this.eventWriter.add(lastEndElement);
this.endElements.remove(last);
}

@Override
Expand Down

0 comments on commit c92dcce

Please sign in to comment.