You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Cyrille Artho <c....@aist.go.jp> on 2014/04/07 12:09:21 UTC

Bugs in Apache commons collections, version 3.2.1

Dear developers,
We have found several issues in Apache commons collections, version
3.2.1. However, in the meantime that version has been superseded by
version 4.0.

Is there still interest in bug reports on the previous version?

The bugs are not very serious but it would still be good to fix them.
The case which looks like an internal state problem as the following
one. It throws a NullPointerException even though the data passed is not
null (the exact value of the data is not important here).

If there is interest in such bug reports, we will post them on the issue
tracker:

import junit.framework.*;

public class Bug extends TestCase {

	public void test1() throws Throwable {
		org.apache.commons.collections.map.ReferenceIdentityMap var0 = new
org.apache.commons.collections.map.ReferenceIdentityMap();
		java.util.Set var1 = org.apache.commons.collections.set.MapBackedSet
				.decorate((java.util.Map) var0);
		boolean var3 = var1
				.add((java.lang.Object) "");
	}
}

-- 
Regards,
Cyrille Artho - http://artho.com/
Those who will not reason, are bigots, those who cannot,
are fools, and those who dare not, are slaves.
		-- George Gordon Noel Byron

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: Bugs in Apache commons collections, version 3.2.1

Posted by Thomas Neidhart <th...@gmail.com>.
Hi Cyrille,

I do not think that the outlined testcase really illustrates a bug.
By default, a MapBackedSet will use "null" as dummy value to put into the
actual Map, but a ReferenceMap does not allow such null values (as
indicated by the message in the NullPointerException that is thrown).

You have two choices:

 * either use a different map that supports such null values
 * create a MapBackedSet with a different dummy value

Regarding the other bugs that you have found. It would be really great if
you could test these bugs against the latest release and report them on the
issue tracker.
It is very unlikely that there will be another release for the 3.2 branch.

Best regards,

Thomas



On Mon, Apr 7, 2014 at 12:09 PM, Cyrille Artho <c....@aist.go.jp> wrote:

> Dear developers,
> We have found several issues in Apache commons collections, version
> 3.2.1. However, in the meantime that version has been superseded by
> version 4.0.
>
> Is there still interest in bug reports on the previous version?
>
> The bugs are not very serious but it would still be good to fix them.
> The case which looks like an internal state problem as the following
> one. It throws a NullPointerException even though the data passed is not
> null (the exact value of the data is not important here).
>
> If there is interest in such bug reports, we will post them on the issue
> tracker:
>
> import junit.framework.*;
>
> public class Bug extends TestCase {
>
>         public void test1() throws Throwable {
>                 org.apache.commons.collections.map.ReferenceIdentityMap
> var0 = new
> org.apache.commons.collections.map.ReferenceIdentityMap();
>                 java.util.Set var1 =
> org.apache.commons.collections.set.MapBackedSet
>                                 .decorate((java.util.Map) var0);
>                 boolean var3 = var1
>                                 .add((java.lang.Object) "");
>         }
> }
>
> --
> Regards,
> Cyrille Artho - http://artho.com/
> Those who will not reason, are bigots, those who cannot,
> are fools, and those who dare not, are slaves.
>                 -- George Gordon Noel Byron
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>