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

Map2Bean ignores the "class" property for maps

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • 6.2.19
    • 6.2.18
    • node2bean
    • Yes
    • DevX 10
    • 3

      Creating an object from Magnolia's configuration calls different mechanisms depending on the way of instantiating it. Performing a manual instantiation calls Map2Bean while Magnolia handles it with Node2Bean.

      However, it seems like Map2Bean is ignoring theĀ class property when converting the configuration structure to their respective beans.

      Bean created by Magnolia automatically:

      Bean created via code:

      Here we can see that the map is taking the class property as another value instead of assigning such value to the map type itself.

      Attached is a simple filter class to reproduce the issue, along two configuration files that help reproduce it as well.

        Acceptance criteria

          1. config.modules.filter-test.config.yaml
            2 kB
            Roberto Gaona
          2. config.server.filters.testFilter.yaml
            0.2 kB
            Roberto Gaona
          3. image-2022-05-09-14-47-44-135.png
            115 kB
            Roberto Gaona
          4. image-2022-05-09-14-49-10-792.png
            144 kB
            Roberto Gaona

              jsimak Jaroslav Simak
              rgaona Roberto Gaona
              DeveloperX
              Votes:
              2 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - Not Specified
                    Not Specified
                    Logged:
                    Time Spent - 1d
                    1d