[infinispan-issues] [JBoss JIRA] Created: (ISPN-1359) SetExternalizer Cannot Properly Handle TreeSets Constructed With Comparator

Ryan Scharer (JIRA) jira-events at lists.jboss.org
Tue Aug 30 11:34:26 EDT 2011


SetExternalizer Cannot Properly Handle TreeSets Constructed With Comparator
---------------------------------------------------------------------------

                 Key: ISPN-1359
                 URL: https://issues.jboss.org/browse/ISPN-1359
             Project: Infinispan
          Issue Type: Bug
          Components: Marshalling
    Affects Versions: 5.0.0.FINAL
         Environment: OSX 10.7.1, System JDK
            Reporter: Ryan Scharer
            Assignee: Manik Surtani


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.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the infinispan-issues mailing list