[MAGNOLIA-6844] Map2BeanTransformer calls initBean() too early – before properties are set Created: 26/Oct/16 Updated: 31/Oct/16 Resolved: 27/Oct/16 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 5.5 |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Philip Mundt | Assignee: | Philip Mundt |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Template: |
|
||||||||
| Acceptance criteria: |
Empty
|
||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
||||||||
| Sprint: | Basel 67 | ||||||||
| Story Points: | 1 | ||||||||
| 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. |