[MAGNOLIA-3346] Change Node2BeanTransformerImpl#setProperty for better fail safety Created: 28/Oct/10 Updated: 04/Mar/19 Resolved: 04/Nov/15 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | core |
| Affects Version/s: | 4.5 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Minor |
| Reporter: | Daniel Lipp | Assignee: | Unassigned |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | quickwin | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| 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)
|
| Date of First Response: |
| Description |
|
Current implementation can produce misleading logs/exceptions in case you have an error in the adder-method: right now we'll call the setter on any exception of the call of the adder. If there was an exception in the adder, nothing is put out but we try to call the setter with the same params. This will most likely fail and you'll get this in the logs. So logs tell there's been a problem with the setter but actually the adder is the culprit. That's why the setter should only be called in case the adder does not exist. In case there is an adder and calling it throws an exception, we should properly output this exception and not try to call the setter at all. |
| Comments |
| Comment by Tobias Mattsson [ 02/Dec/13 ] |
|
This is also the case for Node2BeanTransformerImpl. |
| Comment by Daniel Lipp [ 03/Dec/13 ] |
|
Thx for the hint Tobias - I rephrased to say we should fix for Node2BeanTransformerImpl. Content2Bean is deprecated since a while so there it's not a must. |
| Comment by Michael Mühlebach [ 04/Nov/15 ] |
|
Given the thousands of other issues we have open that are more highly requested, we won't be able to address this issue in the foreseeable future. Instead we will focus on issues with a higher impact, and more votes. |