fix(serialize-xml): Correct message for mismatched closing tag

This commit is contained in:
Johannes Frohnmeyer 2024-04-17 11:05:43 +02:00
parent fb1c0fd3cb
commit a1b0df3caa
Signed by: Johannes
GPG Key ID: E76429612C2929F4
1 changed files with 1 additions and 1 deletions

View File

@ -172,7 +172,7 @@ public class NativeXmlReader implements Closeable {
name = pathNames[stackSize - 2];
} else throw unexpectedTokenError("END_TAG");
if (!name.equals(pathNames[stackSize - 2])) {
if (!lenient) throw syntaxError("Mismatched closing tag: Expected " + pathNames[stackSize - 1] + " but was " + name);
if (!lenient) throw syntaxError("Mismatched closing tag: Expected " + pathNames[stackSize - 2] + " but was " + name);
}
stackSize--;
pathNames[stackSize] = null; // Free the last path name so that it can be garbage collected!