Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
CookieIdentityComparator and CookiePathComparator could/should implement Serializable
As Findbugs suggests:
"Comparator doesn't implement Serializable
This class implements the Comparator interface. You should consider whether or not it should also implement the Serializable interface. If a comparator is used to construct an ordered collection such as a TreeMap, then the TreeMap will be serializable only if the comparator is also serializable. As most comparators have little or no state, making them serializable is generally easy and good defensive programming. "
Neither class has any state, so implementing Serializable would be trivial.