Frequency class Javadoc is ambiguous; need more tests
-----------------------------------------------------
Key: MATH-258
URL: https://issues.apache.org/jira/browse/MATH-258
Project: Commons Math
Issue Type: Bug
Reporter: Sebb
Fix For: 2.0
[Extracted from mailing list so it does not get lost]
The Javadoc is ambiguous - can one add both int and char to the same instance
of Frequency?
Depending on how one reads the class Javadoc, this should be allowed,
as one can compare "int" and "char" in the same way that one can
compare "int" and "long" - i.e. both are "comparable". Now "int" and
"char" are not Comparable, but then neither are "int" and "long".
I think the Javadoc needs to make the intention clear, and then the
tests can be enhanced to enforce the documented behaviour.
At present, there's no check to show what happens when int and char are mixed.
There are other tests that should be added, to show what is expected when
mixing different Comparable classes.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.