You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by garydgregory <gi...@git.apache.org> on 2018/11/08 19:04:33 UTC
[GitHub] commons-collections issue #57: COLLECTIONS-701 SetUniqueList.add() crashes d...
Github user garydgregory commented on the issue:
https://github.com/apache/commons-collections/pull/57
Hi @drajakumar ,
I'm not sure this patch makes sense. Take a look at ```org.apache.commons.collections4.list.Collections701Test```: For ```ArrayList``` and ```HashSet```, adding a collection to itself is fine.
In this patch, the argument is not only silently ignored, but the behavior is not even documented. Whatever we do, we really need to document _anything_ that deviates from the standard JRE ```List``` contract.
IMO, the fix should be so that a ```SetUniqueList``` behaves like a ```ArrayList``` and ```HashSet```, it just works.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org