XmlPullUtil: fix virtual end tag of empty element isn't consumed in optValueTag()

This commit is contained in:
Andreas Schildbach 2024-06-25 18:23:09 +02:00
parent 0013bdff08
commit 0e1c04f88d

View file

@ -204,6 +204,9 @@ public final class XmlPullUtil {
return defaultValue;
if (pp.isEmptyElementTag()) {
pp.next();
if (pp.getEventType() != XmlPullParser.END_TAG)
throw new IllegalStateException("expected (virtual) end tag on empty element");
pp.next();
return defaultValue;
}
final String value = valueTag(pp, tagName);