Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

java.util.concurrent.ConcurrentHashMap keySet has null values

761993Mar 29 2010 — edited Dec 13 2010
Hi,

This is jrockit version :

BEA JRockit(R) (build R27.3.1-1_CR344434-89345-1.5.0_11-20070925-1628-linux-ia32
, compiled mode)


running on wls10Mp1.

App puts, gets and removes keys from the ConcurrentHashMap instance across different threads:

Get the following exception sometimes :

Exception in thread "T1" java.lang.NullPointerException
at java.util.concurrent.ConcurrentHashMap.hash(ConcurrentHashMap.java:157)
at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:730)
at my.app.class...

The get is based on a Iterator over keySet of ConcurrentHashMap.

App for sure doesn't put any null keys in ConcurrentHashMap.

What could be causing this ?

Thanx,
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 10 2011
Added on Mar 29 2010
4 comments
2,563 views