[MGNLUI-4031] Unreferenced properties created by the BasicTransformer (fix for MGNLUI-2494 has side effects) Created: 07/Oct/16 Updated: 08/Mar/21 Resolved: 08/Mar/21 |
|
| Status: | Closed |
| Project: | Magnolia UI |
| Component/s: | dialogs |
| Affects Version/s: | 5.3.10 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Daniel Kasmeroglu | Assignee: | Unassigned |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Linux (Ubuntu 15.10), Java 7 |
||
| 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
|
||||||||
| Date of First Response: | |||||||||
| Description |
|
The fix for property = new DefaultProperty<T>(type, value); // This will replace the previous property (with the wrong type) with the new one (correctly typed). relatedFormItem.addItemProperty(propertyName, property); As the comment mentions this code assumes that the original property will be replaced while calling addItemProperty. I couldn't see any indication of this within the Vaadin documentation which clearly says that a new property will be added. This is somewhat problematic since it's hard to notice. Each call to getOrCreateProperty(Class<T> type) might give an unreferenced property so these locations must be investigated (it's probably a good idea to check JIRA first). One quick fix might be the removal of the property which then essentially implements the replacement operation. If I find the time I will try to create a small project in order to provide an error causing example. |
| Comments |
| Comment by Roman Kovařík [ 08/Mar/21 ] |
|
Closing as M5.3 has reached EOL. |