desruisseaux commented on code in PR #397:
URL: 
https://github.com/apache/maven-shared-utils/pull/397#discussion_r3506716139


##########
src/main/java/org/apache/maven/shared/utils/xml/Xpp3DomWriter.java:
##########
@@ -62,6 +63,7 @@ public static void write(XMLWriter xmlWriter, Xpp3Dom dom) 
throws IOException {
      * @throws IOException if writing fails
      */
     public static void write(XMLWriter xmlWriter, Xpp3Dom dom, boolean escape) 
throws IOException {
+        Objects.requireNonNull(dom, "dom must not be null");

Review Comment:
   Is it really solving the problem described in the issue? The next line is 
`dom.getName()`, therefore a `NullPointerException` would happen there anyway. 
The stack trace produced by `Objects` will be even deeper (a little bit) than 
the stack trace produced by the `NullPointerException` on the next line.



-- 
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]

Reply via email to