Uploaded image for project: 'HttpComponents HttpClient'
  1. HttpComponents HttpClient
  2. HTTPCLIENT-739

CookieIdentityComparator and CookiePathComparator could/should implement Serializable

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.0 Alpha 3
    • HttpClient (classic)
    • 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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            sebb Sebb
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: