elharo commented on PR #10952:
URL: https://github.com/apache/maven/pull/10952#issuecomment-4100338057
working on the first four.
On #5 I see the point. It's not immediately obvious to me whether ns or
namespace is the namespace of the element. Digging.
```
private void checkNamespace(XMLStreamReader parser, boolean strict,
String namespace) throws XMLStreamException {
if (strict) {
String ns = parser.getNamespaceURI();
if (!Objects.equals(namespace, ns)) {
throw new XMLStreamException(
String.format("Unexpected namespace for element '%s':
found '%s' but expected '%s'",
parser.getLocalName(),
ns != null ? ns : "no namespace",
namespace),
parser.getLocation(),
null
);
}
}
}
```
--
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]