Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8036568

Serial incompatibility in java.util.TreeMap.NavigableSubMap

    XMLWordPrintable

Details

    Backports

      Description

        The enhancements done under JDK-8011426 in JDK 8 made some seemingly innocuous changes to the nested serialiable class java.util.TreeMap.NavigableSubMap. The JDK 6 era methods on TreeMap, including subMap, headMap, tailMap, descendingMap, return one or the other subclass of NavigableSubMap.

        Unfortunately, NavigableSubMap did *not* have a serialVersionUID declared so the methods added under JDK-8011426 perturbed the serial hash computation for NavigableSubMap. As a result, while the subclasses of NavigableSubMap do declare serialVersionUIDs themselves, instances of the subclasses cannot be serialized in JDK 6 and successfully reconstituted in JDK 8, or vice versa.

        Attachments

          Issue Links

            Activity

              People

                darcy Joe Darcy
                darcy Joe Darcy
                Votes:
                0 Vote for this issue
                Watchers:
                13 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: