reta commented on a change in pull request #887:
URL: https://github.com/apache/cxf/pull/887#discussion_r775245477
##########
File path:
core/src/main/java/org/apache/cxf/staxutils/transform/InTransformReader.java
##########
@@ -261,13 +261,22 @@ private void handleDefaultMode(QName name, QName
expected) {
}
private void handleDeepDrop() throws XMLStreamException {
- final int depth = getDepth();
- while (depth != getDepth() || super.next() !=
XMLStreamConstants.END_ELEMENT) {
- // get to the matching end element event
+ int read = 0;
+ while (hasNext()) {
+ // get to the matching end element event (accounting for all inner
elements)
+ final int event = super.next();
+ if (event == XMLStreamConstants.START_ELEMENT) {
+ ++read;
+ } else if (event == XMLStreamConstants.END_ELEMENT) {
+ if (read == 0) {
Review comment:
Matter of preferences, I will keep it the way it is now
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]