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 — [maven-4.0.x] ImmutableCollections.ROProperties loses Properties defaults chain · Issue #12602 · apache/maven

[maven-4.0.x] ImmutableCollections.ROProperties loses Properties defaults chain #12602

New issue
Copy link
New issue
Copy link
Closed
#12910
Closed
[maven-4.0.x] ImmutableCollections.ROProperties loses Properties defaults chain#12602
#12910
Copy link
Labels
bugSomething isn't workingmvn4
Milestone
4.0.0-rc-7

Description

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

ImmutableCollections.ROProperties loses Properties defaults chain

Found in: maven-4.0.x branch
File: api/maven-api-xml/src/main/java/org/apache/maven/api/xml/ImmutableCollections.java (lines ~168-176)
Severity: Medium

Description

ROProperties constructor calls super() (equivalent to Properties()) instead of preserving the parent defaults chain:

private ROProperties(Properties props) {
    super();      // calls Properties() which sets defaults=null
    if (props != null) {
        for (Map.Entry<Object, Object> e : props.entrySet()) {
            super.put(e.getKey(), e.getValue());
        }
    }
}

java.util.Properties has a defaults field that stores fallback properties. By calling super() instead of super(props != null ? props.defaults : null), the defaults chain is discarded. If props was created as new Properties(defaultsProps) where defaultsProps had key "foo"="bar", after wrapping in ROProperties, getProperty("foo") would return null instead of "bar".

Activity

  1. elharo
    added
    bugSomething isn't working
    on Jul 29, 2026
  2. gnodet
    added
    mvn4
    on Aug 23, 2026
  3. gnodet
    added this to the 4.0.0-rc-7 milestone on Aug 23, 2026
  4. goutamadwant commented on Aug 29, 2026

    @goutamadwant
    goutamadwant
    on Aug 29, 2026
    Contributor
    More actions

    @gnodet I addressed this in #12906, including regression coverage for inherited defaults. Please let me know if you have any feedback. Thanks!

  5. gnodet
    added a commit that references this issue on Aug 30, 2026

    [4.0.x] Fix #12602: Preserve Properties defaults in immutable copies (#…

    This issue will close once commit 3ed59cd is merged into the 'master' branch.
    3ed59cd
  6. gnodet commented on Aug 30, 2026

    @gnodet
    gnodet
    on Aug 30, 2026
    Contributor
    More actions

    Fixed via #12910 (merged to maven-4.0.x).

  7. gnodet
    closed this as completedon Aug 30, 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 workingmvn4

    Type

    No type

    Projects

    No projects

      Milestone

      • 4.0.0-rc-7

      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.