Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#216 distinct-values() fails with heterogeneous keys

v7.9.1
closed
Michael Kay
5
2012-10-08
2004-05-25
Michael Kay
No

If the sequence presented as input to the
distinct-values() function contains two items that are
not comparable (e.g. a string and an integer) then a
ClassCastException may occur. This only happens if the
two values have the same Java hashCode. This is
infrequent but not impossible: for example the string
"2" has the same hashCode as the integer 50.

Source code fixed, test case added (qxmp141)

Discussion