Hi,
I've noticed that attempt to replication ConcurentHashMap object causes an
error. With other Map's it works.
Example test:
public void testConcurrentHashMap() {
Cache cache1 = getCache(); //from somewhere, problem appears on many confs
Cache cache2 = getCache();
Map plainMap = new HashMap();
plainMap.put( "plainKey", "plainValue" );
Map concurrentMap = new ConcurrentHashMap();
concurrentMap.put( "concurrentKey", "concurrentValue" );
cache1.put( "plainMap", plainMap );
Map retrPlainMap = ( Map ) cache2.get( "plainMap" );
assertEquals( retrPlainMap, plainMap );
assertEquals( retrPlainMap.get( "plainKey" ), "plainValue" );
cache1.put( "concMap", concurrentMap );
retrPlainMap = ( Map ) cache2.get( "concMap" );
assertEquals( retrPlainMap, concurrentMap );
assertEquals( retrPlainMap.get( "concurrentKey" ), "concurrentValue"
);
}
Cheers,
Lukasz Moren