You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Joe Kelly (JIRA)" <ji...@apache.org> on 2007/04/20 21:11:15 UTC
[jira] Created: (COLLECTIONS-249) SetUniqueList.addAll(int index,
Collection coll) adds to end of list instead of at specified index
SetUniqueList.addAll(int index, Collection coll) adds to end of list instead of at specified index
--------------------------------------------------------------------------------------------------
Key: COLLECTIONS-249
URL: https://issues.apache.org/jira/browse/COLLECTIONS-249
Project: Commons Collections
Issue Type: Bug
Components: List
Affects Versions: 3.2
Reporter: Joe Kelly
Priority: Minor
When you call SetUniqueList.addAll(int index, Collection coll), it incorrectly adds the new elements to the end of the list instead of at the specified index.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
[jira] Closed: (COLLECTIONS-249) SetUniqueList.addAll(int index,
Collection coll) adds to end of list instead of at specified index
Posted by "Henri Yandell (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COLLECTIONS-249?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Henri Yandell closed COLLECTIONS-249.
-------------------------------------
Resolution: Fixed
Fix Version/s: 3.3
Nice find Joe, patches applied to trunk.
svn ci -m "Applying Joe Kelly's fix for COLLECTIONS-249 - SetUniqueList.addAll(int, Collection> ) was always inserting at the end of the list"
Sending RELEASE-NOTES.html
Sending src/java/org/apache/commons/collections/list/SetUniqueList.java
Sending src/test/org/apache/commons/collections/list/TestSetUniqueList.java
Transmitting file data ...
Committed revision 531027.
> SetUniqueList.addAll(int index, Collection coll) adds to end of list instead of at specified index
> --------------------------------------------------------------------------------------------------
>
> Key: COLLECTIONS-249
> URL: https://issues.apache.org/jira/browse/COLLECTIONS-249
> Project: Commons Collections
> Issue Type: Bug
> Components: List
> Affects Versions: 3.2
> Reporter: Joe Kelly
> Priority: Minor
> Fix For: 3.3
>
> Attachments: SetUniqueList.patch, TestSetUniqueList.patch
>
>
> When you call SetUniqueList.addAll(int index, Collection coll), it incorrectly adds the new elements to the end of the list instead of at the specified index.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
[jira] Updated: (COLLECTIONS-249) SetUniqueList.addAll(int index,
Collection coll) adds to end of list instead of at specified index
Posted by "Joe Kelly (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COLLECTIONS-249?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joe Kelly updated COLLECTIONS-249:
----------------------------------
Attachment: TestSetUniqueList.patch
Here is a patch to TestSetUniqueList, which shows the bug. When you run it, the test fails with the following message "First new element should be at index 0 expected:<2> but was:<1>". The new unique element was added but it was added in the wrong place.
> SetUniqueList.addAll(int index, Collection coll) adds to end of list instead of at specified index
> --------------------------------------------------------------------------------------------------
>
> Key: COLLECTIONS-249
> URL: https://issues.apache.org/jira/browse/COLLECTIONS-249
> Project: Commons Collections
> Issue Type: Bug
> Components: List
> Affects Versions: 3.2
> Reporter: Joe Kelly
> Priority: Minor
> Attachments: TestSetUniqueList.patch
>
>
> When you call SetUniqueList.addAll(int index, Collection coll), it incorrectly adds the new elements to the end of the list instead of at the specified index.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
[jira] Updated: (COLLECTIONS-249) SetUniqueList.addAll(int index,
Collection coll) adds to end of list instead of at specified index
Posted by "Joe Kelly (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COLLECTIONS-249?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joe Kelly updated COLLECTIONS-249:
----------------------------------
Attachment: SetUniqueList.patch
Here is a patch to SetUniqueList, which fixes the bug. In addition, it also includes suggested fixes to the Javadoc comments for addAll(Collection coll) and addAll(int index, Collection coll), which seemed to be incorrect.
After applying the patch, the patched test (see previous attachment) passes.
> SetUniqueList.addAll(int index, Collection coll) adds to end of list instead of at specified index
> --------------------------------------------------------------------------------------------------
>
> Key: COLLECTIONS-249
> URL: https://issues.apache.org/jira/browse/COLLECTIONS-249
> Project: Commons Collections
> Issue Type: Bug
> Components: List
> Affects Versions: 3.2
> Reporter: Joe Kelly
> Priority: Minor
> Attachments: SetUniqueList.patch, TestSetUniqueList.patch
>
>
> When you call SetUniqueList.addAll(int index, Collection coll), it incorrectly adds the new elements to the end of the list instead of at the specified index.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org