Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-1359

SetExternalizer Cannot Properly Handle TreeSets Constructed With Comparator

    XMLWordPrintable

    Details

    • Workaround:
      Workaround Exists
    • Workaround Description:
      Hide

      Don't use an externaliser for TreeSets, and it will fall back to more traditional (and slower) forms of serialization.

      Show
      Don't use an externaliser for TreeSets, and it will fall back to more traditional (and slower) forms of serialization.
    • Estimated Difficulty:
      Medium

      Description

      TreeSets can be used to hold objects that don't implement Comparable, so long as you provide a Comparator during construction. The current implementation of SetExternalizer doesn't support this pattern... trying to deserialize a TreeSet that holds objects that don't implement Comparable results in a ClassCastException. This seriously reduces the flexibility of TreeSet.

      JBoss Cache doesn't have this limitation, presumably because it delegates to native Java serialization.

        Attachments

          Activity

            People

            Assignee:
            galder.zamarreno Galder ZamarreƱo
            Reporter:
            rlscharer Ryan Scharer (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: