Robert Papp created FREEMARKER-230:
--------------------------------------

             Summary: Consider BeansWrapper configuration items re Java records
                 Key: FREEMARKER-230
                 URL: https://issues.apache.org/jira/browse/FREEMARKER-230
             Project: Apache Freemarker
          Issue Type: Improvement
          Components: engine
    Affects Versions: 2.3.33
            Reporter: Robert Papp


Will {code}exposeFields = true{code} expose JVM Record function backing fields?

Should {code}exposureLevel = EXPOSE_PROPERTIES_ONLY{code} expose JVM record 
functions?

Whatever the answer, please document the expected behavior in their Javadoc.
 
I got bitten by this because I have {{EXPOSE_PROPERTIES_ONLY}} and I migrated a 
working model from normal Java bean getters to records. I was greeted with:
 
{code}
FreeMarker template error:
No such bean property: name
---- FTL stack trace ("~" means nesting-related):
- Failed at: ${tag.name?url} [in template "some.ftl" at line 17, column 56]
{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to