GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Xpp3Dom.getValue() returns null despite @NonNull annotation · Issue #388 · apache/maven-shared-utils

Xpp3Dom.getValue() returns null despite @NonNull annotation #388

New issue
Copy link
New issue
Copy link
Closed
#389
Closed
Xpp3Dom.getValue() returns null despite @NonNull annotation#388
#389
Copy link
Labels
bugSomething isn't working

Description

@elharo
elharo
opened on Jul 1, 2026
Issue body actions

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:

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 = "";.

Activity

  1. elharo
    added
    bugSomething isn't working
    on Jul 1, 2026
  2. elharo
    closed this as completedin #389on Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.