elharo opened a new issue, #388:
URL: https://github.com/apache/maven-shared-utils/issues/388

   `Xpp3Dom.getValue()` is annotated `@NonNull` (line 141) but returns `value` 
which defaults to `null` when constructed with `Xpp3Dom(String name)` (line 
92). This violates the non-null contract — callers who trust the annotation and 
omit a null check will encounter `NullPointerException`.
   
   The builder at `Xpp3DomBuilder.java:201` already works around this:
   ```java
   element.setValue(""); // null in xpp3dom, but we don't do that around here
   ```
   
   Fix: initialize `value` to `""` in the one-arg constructor, or change the 
field declaration to `private String value = "";`.


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