[ 
https://issues.apache.org/jira/browse/JEXL-472?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Henri Biestro resolved JEXL-472.
--------------------------------
    Resolution: Fixed

Commit 
[07ca868|https://github.com/apache/commons-jexl/commit/07ca868bf933b2712d98f534cbb011e43d7d7a58]

> Add property access for Java record component accessors
> -------------------------------------------------------
>
>                 Key: JEXL-472
>                 URL: https://issues.apache.org/jira/browse/JEXL-472
>             Project: Commons JEXL
>          Issue Type: Improvement
>    Affects Versions: 3.7.0
>            Reporter: Henri Biestro
>            Assignee: Henri Biestro
>            Priority: Major
>             Fix For: 3.7.1
>
>
> Property access (`foo.bar`) never resolves to a record's generated `bar()` 
> accessor — only to `getBar()`/`isBar()`, a public field, or duck-typed 
> `get(Object)`. On a record `Point(int x, int y)`, `point.x` throws 
> JexlException$Property: undefined property 'x'.
> Add a RecordGetExecutor, tried right after PropertyGetExecutor/ 
> BooleanGetExecutor, so an existing getFoo() override still wins. It 
> matches the property to a record component, then resolves the accessor 
> through the normal permission-checked Introspector. Detection uses 
> reflection only (resolved once, cached) so the module still builds on 
> Java 8, where it simply finds nothing.
> Credit: initial patch by Aurélien Mino. ( 
> [https://github.com/apache/commons-jexl/pull/415] )



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

Reply via email to