You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Edouard Hue (JIRA)" <ji...@codehaus.org> on 2010/05/03 21:50:12 UTC
[jira] Created: (MNG-4657) SettingsUtils.copySettings does not
perform a deep copy
SettingsUtils.copySettings does not perform a deep copy
-------------------------------------------------------
Key: MNG-4657
URL: http://jira.codehaus.org/browse/MNG-4657
Project: Maven 2 & 3
Issue Type: Bug
Components: Settings
Affects Versions: 2.2.1
Reporter: Edouard Hue
Priority: Minor
The org.apache.maven.settings.SettingsUtils.copySettings method only creates a new Settings instance and then copies all its attributes by reference, including lists such as profiles or proxies. Hence, modifying the copy can produce unexpected side effects on the original object.
Expected behavior is that a deep copy is returned, or documentation should mention this behaviour. Maybe make it implement Clonable ?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Closed: (MNG-4657) SettingsUtils.copySettings does not
perform a deep copy
Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-4657?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Benjamin Bentmann closed MNG-4657.
----------------------------------
Resolution: Fixed
Fix Version/s: 3.0-alpha-3
Assignee: Benjamin Bentmann
Made {{Settings}} clonable in [r810165|http://svn.apache.org/viewvc?view=revision&revision=810165].
> SettingsUtils.copySettings does not perform a deep copy
> -------------------------------------------------------
>
> Key: MNG-4657
> URL: http://jira.codehaus.org/browse/MNG-4657
> Project: Maven 2 & 3
> Issue Type: Bug
> Components: Settings
> Affects Versions: 2.2.1
> Reporter: Edouard Hue
> Assignee: Benjamin Bentmann
> Priority: Minor
> Fix For: 3.0-alpha-3
>
>
> The org.apache.maven.settings.SettingsUtils.copySettings method only creates a new Settings instance and then copies all its attributes by reference, including lists such as profiles or proxies. Hence, modifying the copy can produce unexpected side effects on the original object.
> Expected behavior is that a deep copy is returned, or documentation should mention this behaviour. Maybe make it implement Clonable ?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira