Incorrect Equality test on floating point values

Description

From eamonn.w...@gmail.com on November 26, 2013 14:23:09

I have V2.1 sources.

2 places in RuleUtil.java have an invalid floating point comparison logic.

The corrected block(for both cases) is:

if ( Double.compare(Double.parseDouble(s), ((Double)o).doubleValue()) == 0 ) {

return true;

}

Original issue: http://code.google.com/p/owasp-esapi-java/issues/detail?id=313

Environment

None

Status

Assignee

Unassigned

Reporter

Max Gelman

Priority

Configure