C2B too eager when adding items to collections
----------------------------------------------
Key: MAGNOLIA-3165
URL: http://jira.magnolia-cms.com/browse/MAGNOLIA-3165
Project: Magnolia
Issue Type: Bug
Components: cache, content2bean
Affects Versions: 4.3.1
Reporter: Jan Haderka
Assignee: Boris Kraft
C2B adds also items of incorrect types to the typed collections.
To reproduce:
- go to /modules/cache/config/configurations and create new NodeData there
- wait for observation to kick in and reload the module
Result:
{{ClassCastException}} in {{CacheModule:110}} when attempting to cast
{{String}} into a {{CacheConfiguration}}.
since the {{addCacheConfiguration()}} method in the CacheModule provides C2B
with the info that value in the map should be CacheConfiguration, it should not
attempt to add {{String}} as a value (and succeed since generics are erased at
runtime) but only instances of classes that can be cast to
{{CacheConfiguration}}.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.magnolia-cms.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------