Issues

Select view

Select search mode

 

BigDecimal cfswitch regression

Description

If myVar is a BigDecimal (e.g. from dbQuery) with value of 2.00 then

<cfswitch expression="#myVar#"> <cfcase value="2" >MATCHED</cfcase> </cfswitch>

doesn’t match.

This snippet does work in Lucee 5.2.9.31 with Java 8.

Possibly introduced with https://github.com/lucee/Lucee/commit/ec467ba609bf8d61f3afb3068a04e94fe17be92e

More info: https://dev.lucee.org/t/bigdecimal-cfswitch-unexpected-behaviour/12634

Environment

Lucee 5.3.10.120

Java 11.0.16 (Amazon.com Inc.) 64bit

Apache Tomcat/9.0.71

OS Windows

relates to

Details

Assignee

Reporter

Priority

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Affects versions

Created 25 May 2023 at 15:44
Updated 29 May 2023 at 06:59

Activity

Show:

Pothys - MitrahSoft29 May 2023 at 06:59
Edited

I've checked this ticket and confirmed the issue happened on the lucee version 5.3.10.143-SNAPSHOT.
This commit causes this issue https://github.com/lucee/Lucee/commit/ec467ba609bf8d61f3afb3068a04e94fe17be92e.
The regression starts from 5.3.9.157-SNAPSHOT onwards and BigDecimal issue with cfswitch works fine with lucee latest version 6.0.0.406-SNAPSHOT.

Michael Offner26 May 2023 at 19:54

Added test case (enabled) to Lucee 6, works fine

https://github.com/lucee/Lucee/commit/03de60e8e37daabe16d80e6a781f5f44ab87f185

So a Lucee 5 issue only.

Daniel25 May 2023 at 16:44

<cfset bd = createObject("java", "java.math.BigDecimal").init("2.00") >

 

Reproduces the issue for me

Zac Spitzer25 May 2023 at 16:20

initial cut of a test case, doesn’t reproduce the problem yet

https://github.com/lucee/Lucee/commit/75bd4af228c6c9ac082f46f9121568df0358529f

Flag notifications