[ https://issues.apache.org/jira/browse/JEXL-420?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17815979#comment-17815979 ]
Henri Biestro edited comment on JEXL-420 at 2/9/24 9:09 AM: ------------------------------------------------------------ * Added specific CoercionException (subclass of ArithmeticException) to be ignored during comparisons to allow fall through. * Throw CoercionException from parse\{Number*} methods. * Added consistency in treating NaN and '' in all cases * Avoid going through parse(value.toString()) since type system is (seems) stable enough Commit [f5bf27ca|https://github.com/apache/commons-jexl/commit/f5bf27caaf7c577ed039232e5db81bcb835bc228] was (Author: henrib): Commit [f5bf27ca|https://github.com/apache/commons-jexl/commit/f5bf27caaf7c577ed039232e5db81bcb835bc228] > Error while comparing float and string value > -------------------------------------------- > > Key: JEXL-420 > URL: https://issues.apache.org/jira/browse/JEXL-420 > Project: Commons JEXL > Issue Type: Bug > Affects Versions: 3.3 > Reporter: Xu Pengcheng > Assignee: Henri Biestro > Priority: Major > Fix For: 3.3.1 > > > code: > {code:java} > 1.2 == ''{code} > returns false > > code: > {code:java} > 1.2 == 'a'{code} > causes exception > {code:java} > Caused by: java.lang.ArithmeticException: Double coercion: (a){code} > > Is it possible to check the right side is a number like string and return > false if not? -- This message was sent by Atlassian Jira (v8.20.10#820010)