You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@archiva.apache.org by "Olivier Lamy (JIRA)" <ji...@codehaus.org> on 2014/08/08 06:43:10 UTC
[jira] (MRM-1434) Suspicious RepositoryMetadataMerge.clonePlugins
[ https://jira.codehaus.org/browse/MRM-1434?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Olivier Lamy updated MRM-1434:
------------------------------
Fix Version/s: (was: 2.1.1)
Backlog
> Suspicious RepositoryMetadataMerge.clonePlugins
> ------------------------------------------------
>
> Key: MRM-1434
> URL: https://jira.codehaus.org/browse/MRM-1434
> Project: Archiva
> Issue Type: Bug
> Reporter: Dave Brosius
> Assignee: Maria Odea Ching
> Priority: Minor
> Fix For: Backlog
>
>
> The method RepositoryMetadataMerge.clonePlugins seems oddly wrong to me, it clones a plugin, but then doesn't use the clone, but uses the original
> private static List<Plugin> clonePlugins(List<Plugin> plugins)
> {
> if (plugins == null)
> {
> return null;
> }
>
> List<Plugin> result = new ArrayList<Plugin>();
>
> for (Plugin plugin : plugins)
> {
> Plugin clonedPlugin = new Plugin();
> clonedPlugin.setArtifactId(plugin.getArtifactId());
> clonedPlugin.setName(plugin.getName());
> clonedPlugin.setPrefix(plugin.getPrefix());
> result.add(plugin); <======= should this be clonedPlugin ?
> }
>
> return result;
> }
--
This message was sent by Atlassian JIRA
(v6.1.6#6162)