[infinispan-dev] possible bug in TreeCache.put(Fqn fqn, Map<? extends K, ? extends V> data) when passed an empty map

Scott Marlow smarlow at redhat.com
Fri Sep 10 09:19:24 EDT 2010


Hi,

I am porting some legacy JBC code (JBoss AS ha-jndi) to Infinispan
(http://anonsvn.jboss.org/repos/jbossas/projects/cluster/ha-server-cache-ispn/trunk/src/main/java/org/jboss/ha/jndi/ispn/DistributedTreeManager.java) and ran into a problem that Mircea created ISPN-639 for.  

In discussing ISPN-639 on IRC, Mircea said in reference to ISPN-639 "the
condition only happen in very special situations when a put is not
valid. Are you adding e.g. a null key or a null value in this
operation?"

Could someone clarify whether it is legal to pass an empty map to
TreeCache.put(Fqn, Map).

I am currently calling TreeCache.put as follows (in
DistributedTreeManager.createSubcontext(Name name)):

  this.cache.put(newf, new HashMap<String, Binding>());

newf is a Fqn (I believe it is a valid one).  However, I'm now worried
about passing the empty HashMap as that is probably triggering ISPN-639.

Thanks,
Scott



More information about the infinispan-dev mailing list