[MAGNOLIA-3472] Also handle UnsupportedOperationException for User implementation within the Freemarker model/wrapper when templates calls the getProperty method directly. Created: 17/Dec/10 Updated: 19/Dec/16 Resolved: 04/Nov/15 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | freemarker, templating |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major |
| Reporter: | Magnolia International | Assignee: | Unassigned |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||
| 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)
|
||||||||||||
| Date of First Response: | |||||||||||||
| Description |
|
The info.magnolia.freemarker.models.UserModel is written to "hide" the UnsupportedOperationException (since Some of our templates still do user.getProperty("fullName"), and that falls out of the try/catch block of UserModel. |
| Comments |
| Comment by Magnolia International [ 17/Dec/10 ] |
|
Not actually as easy to fix as I hoped. info.magnolia.freemarker.models.UserModel returns a SimpleMethodModel for key getProperty, which gets executed later, so moving the try statement a few lines up is useless. As far as I can tell, only one our templates is impacted, how about simply fixing that instead ? |
| Comment by Magnolia International [ 17/Dec/10 ] |
|
here's a failing test if anyone wants to tackle this. Now that the template is fixed, probably not so crucial. |
| Comment by Philipp Bärfuss [ 18/Jan/11 ] |
|
We are finalizing 4.4.2 hence I am moving this issue to 4.4.3. |
| 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. |