You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@archiva.apache.org by "Dave Brosius (JIRA)" <ji...@codehaus.org> on 2010/11/27 02:10:03 UTC
[jira] Created: (MRM-1434) Suspicious
RepositoryMetadataMerge.clonePlugins
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
[jira] Updated: (MRM-1434) Suspicious
RepositoryMetadataMerge.clonePlugins
Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MRM-1434?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brett Porter updated MRM-1434:
------------------------------
Fix Version/s: 1.4
> Suspicious RepositoryMetadataMerge.clonePlugins
> ------------------------------------------------
>
> Key: MRM-1434
> URL: http://jira.codehaus.org/browse/MRM-1434
> Project: Archiva
> Issue Type: Bug
> Reporter: Dave Brosius
> Priority: Minor
> Fix For: 1.4
>
>
> 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
[jira] Assigned: (MRM-1434) Suspicious
RepositoryMetadataMerge.clonePlugins
Posted by "Maria Odea Ching (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MRM-1434?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Maria Odea Ching reassigned MRM-1434:
-------------------------------------
Assignee: Maria Odea Ching
> Suspicious RepositoryMetadataMerge.clonePlugins
> ------------------------------------------------
>
> Key: MRM-1434
> URL: http://jira.codehaus.org/browse/MRM-1434
> Project: Archiva
> Issue Type: Bug
> Reporter: Dave Brosius
> Assignee: Maria Odea Ching
> Priority: Minor
> Fix For: 1.4
>
>
> 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
[jira] Commented: (MRM-1434) Suspicious
RepositoryMetadataMerge.clonePlugins
Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MRM-1434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=244626#action_244626 ]
Brett Porter commented on MRM-1434:
-----------------------------------
I think you're right - we should look at where the method is used (if at all) for the impact and put some tests around it (or just remove it if it's unused).
> 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