Summary
-------
Revert an erroneous change to the serialized format of `LinkedHashMap`.
Problem
-------
A new field `putMode` had been added to `LinkedHashMap` in the initial Sequenced Collection implementation (JDK-8266571). Since the class is serializable, this resulted in an unintended change to the serial format.
Solution
--------
The field should be marked `transient` to restore the previous serial format.
Specification
-------------
@@ -330,7 +330,7 @@ public class LinkedHashMap<K,V>
static final int PUT_NORM = 0;
static final int PUT_FIRST = 1;
static final int PUT_LAST = 2;
- int putMode = PUT_NORM;
+ transient int putMode = PUT_NORM;
// Called after update, but not after insertion
void afterNodeAccess(Node<K,V> e) {
(This has the effect of removing the `putMode` field from the serialized form of `LinkedHashMap` as documented on the serialized-form.html page of the specification.)