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

Map2BeanTransformer calls initBean() too early – before properties are set

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Neutral
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.5
    • Component/s: None
    • Labels:
      None
    • Sprint:
      Basel 67
    • Story Points:
      1
    • Magnolia Release:
      5.5

      Description

      Some beans require all properties of a definition to be set in order to act on specific values in their init() method, see for example info.magnolia.templating.imaging.variation.SimpleResizeVariation which sets two different image operations depending on the configured properties.

      In the current Map2BeanTransformer implementation we call #initBean() directly after creating a new instance of target type, which is too early.

      We should instead call #initBean() after the bean is processed.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                pmundt Philip Mundt
                Reporter:
                pmundt Philip Mundt
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: