]
Brian Stansberry updated JBCACHE-769:
-------------------------------------
Fix Version/s: 1.4.0.SP2
Yep.
JDBCCacheLoader should not directly serialize a map passed to put
-----------------------------------------------------------------
Key: JBCACHE-769
URL:
http://jira.jboss.com/jira/browse/JBCACHE-769
Project: JBoss Cache
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Cache loaders
Affects Versions: 1.2.3, 1.3.0, 1.2.4, 1.4.0, 1.2.4SP1, 1.2.4SP2, 1.3.0.SP1,
1.3.0.SP2, 1.3.0.SP3, 1.4.0.SP1
Reporter: Brian Stansberry
Assigned To: Brian Stansberry
Priority: Minor
Fix For: 2.0.0, 1.4.0.SP2
If a user calls TreeCache.put(Fqn, Map), the passed in Map gets passed to
JDBCCacheLoader.put() which then directly serializes it to the database. Then if a later
put(fqn, key, value) comes in and the cache loader needs to deserialize the node data, the
Map that was originally passed in gets deserialized and directly modified with the new
key/value.
Problem here is if the map originally passed in as an UnmodifiableMap, the update will
fail. Customer reported this happening. FileCacheLoader didn't have the problem, as
it makes a copy of the map before serializing.
Solution is to do what FileCacheLoader does and make a defensive copy of the map before
serializing.
The other cache loaders should be checked as well.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: