ColdFusion 2023 Boolean Type Handling Change - Undocumented Breaking Change?
I'm currently from ColdFusion 2021 to 2023 and have encountered what appears to be a breaking change in how ColdFusion handles boolean values when interfacing with Java methods and MongoDB operations.
The Issue:
In ColdFusion 2021, I could pass native ColdFusion boolean values (true/false) directly to Java methods and MongoDB queries without issues. However, in CF 2023, the same code throws errors unless I explicitly cast the booleans using javacast("boolean", true).
Example:
<!-- This worked in CF 2021 but fails in CF 2023 -->
<cfset mongoQuery = {"active": true, "$exists": {"field": true}} />
<!-- Now requires explicit casting in CF 2023 -->
<cfset mongoQuery = {"active": javacast("boolean", true), "$exists": {"field": javacast("boolean", true)}} />
