[ 
https://issues.apache.org/jira/browse/COLLECTIONS-860?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Daniele updated COLLECTIONS-860:
--------------------------------
    Description: 
*CollectionBag.add(E):*

Using "null" as parameter the method throws a "NullPointerException", but not 
signed into the specification.

*CollectionBag.add(E, int):*

A "ClassCastException" can be generated, but not signed into the specification.

*Test used:*
{code:java}
TreeBag<Predicate<Object>> treeBag0 = new TreeBag<Predicate<Object>>();
CollectionBag<Predicate<Object>> collectionBag0 = new 
CollectionBag<Predicate<Object>>(treeBag0);
Predicate<Object> predicate0 = NonePredicate.nonePredicate((Collection<? 
extends Predicate<? super Object>>) collectionBag0);
Boolean methodResult_ = collectionBag0.add(predicate0, 24);
{code}
 

  was:
*CollectionBag.add(E):*

Using "null" as parameter the method throws a "NullPointerException", but not 
signed into the specification.

*CollectionBag.add(E, int):*

A "ClassCastException" can be generated, but not signed into the specification.

*Test used:*
{code:java}
TreeBag<Predicate<Object>> treeBag0 = new TreeBag<Predicate<Object>>();
CollectionBag<Predicate<Object>> collectionBag0 = new 
CollectionBag<Predicate<Object>>(treeBag0);
Predicate<Object> predicate0 = NonePredicate.nonePredicate((Collection<? 
extends Predicate<? super Object>>) collectionBag0);
boolean methodResult_ = collectionBag0.add(predicate0, 24);
{code}
 


> Documentation Bug: CollectionBag.add(E), CollectionBag.add(E, int)
> ------------------------------------------------------------------
>
>                 Key: COLLECTIONS-860
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-860
>             Project: Commons Collections
>          Issue Type: Bug
>            Reporter: Daniele
>            Priority: Minor
>
> *CollectionBag.add(E):*
> Using "null" as parameter the method throws a "NullPointerException", but not 
> signed into the specification.
> *CollectionBag.add(E, int):*
> A "ClassCastException" can be generated, but not signed into the 
> specification.
> *Test used:*
> {code:java}
> TreeBag<Predicate<Object>> treeBag0 = new TreeBag<Predicate<Object>>();
> CollectionBag<Predicate<Object>> collectionBag0 = new 
> CollectionBag<Predicate<Object>>(treeBag0);
> Predicate<Object> predicate0 = NonePredicate.nonePredicate((Collection<? 
> extends Predicate<? super Object>>) collectionBag0);
> Boolean methodResult_ = collectionBag0.add(predicate0, 24);
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to