The children of the Criterion class can through ClassCastExceptions because
different parts of the implementation disagree over what the rules are. One
solution to this would be to use generics in a fashion similar to the attached
patch, but the current implementation depends on adhoc polymorphism to store an
EvalError object of a different type.
Another possibility would be go the route used by Java Collators and have a
CollationKey type which knows how to do its own comparison.
A third, less satisfactory, option is to just clean up the current code without
changing the API and depend on convention and documentation to keep future
developers from introducing problems.
Original issue reported on code.google.com by tfmorris on 12 Dec 2010 at 6:52
Original issue reported on code.google.com by
tfmorris
on 12 Dec 2010 at 6:52Attachments: