Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-3165

C2B and N2B too eager when adding items to collections

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 4.4.10, 4.5.8, 5.0
    • 4.4.9, 4.5.7, 5.0
    • cache, content2bean
    • None

      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.

        Acceptance criteria

              jsimak Jaroslav Simak
              had Jan Haderka
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD