The collections for primitves has dangerous behaviour in the methods where you recieve an Object
as an argument, where it just tries to cast the argument to an Integer (or Float etc). This
will result in a ClassCastException, which could be appropriate somtimes, but not in all cases.
Shouldn\'t myIntList.contains( \"Foo\") result in false?
Shouldn\'t myIntList.[lastI | i]ndexOf( \"Foo\") result in -1?
Shouldn\'t myIntList.add( \"Foo\") result in false, indicating that the object couldn\'t be
added?
And so on (remove() etc)?
Should I fix this and send a patch to someone, or is it the desired behaviour? If it is desired,
I could make javadoc comments about it instead.
/O
--------------------
ola.berg@arkitema.se
0733 - 99 99 17
--
To unsubscribe, e-mail: <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>
|