Uploaded image for project: 'JBoss Marshalling'
  1. JBoss Marshalling
  2. JBMAR-112

TreeMap/Set with custom comparator has incorrect instance cache usage

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.2.3.GA, 1.3.0.CR5
    • 1.2.0.CR4
    • River
    • None

      The following pattern triggers the error:

      writeObject(comparator)
      writeObject(map)

      This is because the map is added to the instance cache BEFORE the nested comparator when writing, resulting in a sequence that is reversed from what the reading side expects. The solution is for the reader to add a placeholder and later fill it.

              jgreene@redhat.com Jason Greene
              jgreene@redhat.com Jason Greene
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: