Fix a few of our FindBugs "high" warnings.

RuleBasedBreakIterator was breaking the equals/hashCode contract.

Various classes were calling toString on arrays, which isn't very useful.

GregorianCalendar was missing a null/instanceof check. (FindBugs complained about
the former, but the super.equals would actually take care of that. The lack of
the explicit "instanceof" did mean that we could throw ClassCastException if you
had a Calendar that wasn't a GregorianCalendar, though. [Not easily testable,
and I hope we'll replace our calendars with ICU4J's before we actually have
another Calendar subclass.])

Collator's cache was broken, but luckily never had anything inserted into it
anyway.
5 files changed