Suspicious  RepositoryMetadataMerge.clonePlugins
------------------------------------------------

                 Key: MRM-1434
                 URL: http://jira.codehaus.org/browse/MRM-1434
             Project: Archiva
          Issue Type: Bug
            Reporter: Dave Brosius
            Priority: Minor


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 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

        

Reply via email to