gnodet commented on code in PR #11284:
URL: https://github.com/apache/maven/pull/11284#discussion_r2436923141
##########
api/maven-api-xml/src/main/java/org/apache/maven/api/xml/XmlNode.java:
##########
@@ -509,40 +506,45 @@ public int hashCode() {
@Override
public String toString() {
try {
- StringWriter writer = new StringWriter();
- XmlService.write(this, writer);
- return writer.toString();
- } catch (IOException e) {
- return toStringObject();
+ return XmlService.write(this, new
StringWriter()).toString();
+ } catch (IOException ignored) {
+ return addToStringField(
+ new StringJoiner(", ", "XmlNode[", "]"),
+ prefix,
+ namespaceUri,
+ name,
+ value,
+ attributes,
+ children,
+ inputLocation)
+ .toString();
}
}
- private String toStringObject() {
Review Comment:
what does that mean ?
--
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]