You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by "Jin Feng (JIRA)" <ji...@apache.org> on 2014/11/13 04:36:24 UTC
[jira] [Created] (IVY-1496) PomModuleDescriptorBuilder.
overwriteExtraInfoIfExists keeps on adding ExtraInfo, whether it's in the
cache or not
Jin Feng created IVY-1496:
-----------------------------
Summary: PomModuleDescriptorBuilder. overwriteExtraInfoIfExists keeps on adding ExtraInfo, whether it's in the cache or not
Key: IVY-1496
URL: https://issues.apache.org/jira/browse/IVY-1496
Project: Ivy
Issue Type: Bug
Components: Core
Affects Versions: trunk
Reporter: Jin Feng
In [PomModuleDescriptorBuilder.java | https://svn.apache.org/repos/asf/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java]
{code}
private void overwriteExtraInfoIfExists(String key, String value) {
boolean found = false;
for (ExtraInfoHolder extraInfoHolder : ivyModuleDescriptor.getExtraInfos()) {
if (extraInfoHolder.getName().equals(key)) {
extraInfoHolder.setContent(value);
found = false;
}
}
if (!found) {
ivyModuleDescriptor.getExtraInfos().add(new ExtraInfoHolder(key, value));
}
}
{code}
The "found = false" inside the for loop should be "found = true".
As a result of the bug, the list is getting longer and longer, in some cases, the ivy command would run for hours.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)