[
https://issues.apache.org/jira/browse/FREEMARKER-183?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17784635#comment-17784635
]
Dániel Dékány commented on FREEMARKER-183:
------------------------------------------
Yeah, it was some hasty answer from me, and I have missed quite a few things
there. And actually, we already have this {{methodAppearanceFineTuner}}
setting, and we should consider useing that for this
So if we change the question into what we expose as properties, then I can
imagine 3 modes people may want. First is the current behavior, merely because
it's backward compatible. The second is where in additionally to Java Bean
properties, we also expose record components as properties, but not other 0-arg
non-void record methods. And the third is where we just do that for all
0-argument non-void (public non-synthetic) methods, even in records. The
theoretically correct approach is the 2nd, but I guess with the 3rd less people
will run into issues that they find confusing (because most developers don't
realize the fine distinctions that exist, like, someone could naively switching
from record to class, breaking things).
> Add support for Java records
> ----------------------------
>
> Key: FREEMARKER-183
> URL: https://issues.apache.org/jira/browse/FREEMARKER-183
> Project: Apache Freemarker
> Issue Type: Task
> Reporter: Dániel Dékány
> Assignee: Dániel Dékány
> Priority: Major
>
> Currently we don't support records (JEP 395), which was finalized in Java 16.
> Users can extend {{DefaultObjectWrapper}} for that of course, but it should
> be supported out of the box.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)