[concurrency-interest] ConcurrentHashMap NullPointerException

David Holmes dcholmes at optusnet.com.au
Fri Jan 4 00:58:40 EST 2008


BJ,

Can you provide further information: code sketch, exception stack trace
details. I'm unclear whether get() is returning null unexpectedly or whether
get() is throwing the NPE. The usual source for the latter is misbehaving
equals() methods.

Cheers,
David Holmes

> -----Original Message-----
> From: concurrency-interest-bounces at cs.oswego.edu
> [mailto:concurrency-interest-bounces at cs.oswego.edu]On Behalf Of BJ Low
> Sent: Friday, 4 January 2008 3:08 PM
> To: concurrency-interest at cs.oswego.edu
> Subject: [concurrency-interest] ConcurrentHashMap NullPointerException
>
>
> Hi all,
>
> I am seeing some bizarre behavior in the ConcurrentHashMap where one
> thread constructs an objects and puts it into a the map and another
> thread gets the object and sees it as null. Has any one encountered
> this problem before. I believe this problem is posted sometime ago by
> Eric Zoerner to this mailing list however there is no reply.
>
> Any help is greatly appreciated.
>
> --
> Regards,
> BJ Low
> _______________________________________________
> Concurrency-interest mailing list
> Concurrency-interest at altair.cs.oswego.edu
> http://altair.cs.oswego.edu/mailman/listinfo/concurrency-interest
>



More information about the Concurrency-interest mailing list