Accessing boolean Java properties bean-style broken since 6.2

Lucee does support accessing properties of Java objects in a bean-style manner: myObject.prop will call myObject.getProp(). For boolean properties, the expected prefix is ‘is’ instead of ‘get’. This worked fine until Lucee 6.1, since Lucee 6.2 accessing boolean properties does not work anymore when the getter method uses the is-prefix.

The offending commit is this one: LDEV-5095 - improve exception message · lucee/Lucee@caaa7a5 · GitHub. Before the change, the method ‘callGetter’ was used, which supports both the is- and get-prefix. After the change, ‘getGetterEL’ is used, which only supports the get-prefix.

This snippet will reproduce the issue:

<cfset File=createobject("java", "java.io.File")>
<cfset testFile = File.init("/testfile.txt")>
<cfdump var="#testFile.hidden#">

Thanks for bringing this up. Created LDEV-6377 to track the issue.
https://luceeserver.atlassian.net/browse/LDEV-6377

1 Like