Simplify XMLEventStreamWriter.writeEndElement()

This commit is contained in:
Сергей Цыпанов 2020-11-19 17:29:16 +02:00 committed by Juergen Hoeller
parent 9ec96f6141
commit c92dccea1b
1 changed files with 1 additions and 2 deletions

View File

@ -161,9 +161,8 @@ class XMLEventStreamWriter implements XMLStreamWriter {
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