[ https://issues.apache.org/jira/browse/MNG-7678?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Guillaume Nodet closed MNG-7678. -------------------------------- Resolution: Fixed > Settings (v3) and Settings.Builder() cannot unset a non-null field > ------------------------------------------------------------------ > > Key: MNG-7678 > URL: https://issues.apache.org/jira/browse/MNG-7678 > Project: Maven > Issue Type: Bug > Components: Core, Settings > Affects Versions: 4.0.0-alpha-4 > Reporter: James Z.M. Gao > Assignee: Guillaume Nodet > Priority: Major > Fix For: 4.0.0-alpha-5 > > > > Testing code: > {noformat} > final Settings s = new Settings(); > s.setLocalRepository("xxx"); > assertEquals("xxx", s.getLocalRepository()); // OK > s.setLocalRepository("yyy"); > assertEquals("yyy", s.getLocalRepository()); // OK > s.setLocalRepository(null); > assertNull(s.getLocalRepository()); // FAIL{noformat} > > It seems related to the the build() method of Model Builder with forceCopy = > false : > > {noformat} > ${field.name} != null ? ${field.name} : ( base != null ? base.${field.name} : > null )${sep} > {noformat} > -- This message was sent by Atlassian Jira (v8.20.10#820010)