[MGNLGROOVY-25] Assigning a value to a node data only works when the node data is preceded by the @ sign Created: 20/Sep/10  Updated: 25/Nov/13  Resolved: 20/Sep/10

Status: Closed
Project: Magnolia Groovy Module
Component/s: integration
Affects Version/s: 1.0
Fix Version/s: 1.1

Type: Bug Priority: Major
Reporter: Federico Grilli Assignee: Federico Grilli
Resolution: Fixed Votes: 0
Labels: None
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)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled

 Description   

E.g. this would work:
path.to.@mynode = 'foo'
and would even automatically create the mynode property, should it be missing whilst
path.to.mynode = 'foo'
would fail, because currently it erroneously attempts to delegate the setting to the groovy metaclass mechanism. In other words, it tries to set the node data value on the MgnlGroovyNode instance itself and looks via reflection for a class field named after the node data.


Generated at Mon Feb 12 05:54:50 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.