RFR (S): CR 8005926: (thread) Merge ThreadLocalRandom state into java.lang.Thread (original) (raw)

Peter Levart peter.levart at gmail.com
Tue Jan 15 14:11:33 UTC 2013


On 01/15/2013 02:57 PM, Alan Bateman wrote:

On 15/01/2013 13:49, Chris Hegarty wrote:

But wouldn't there be an issue with JDK7 TLR streams being deserialized by JDK8, pad fields would be left in the Object input steam? If so, then we're down the road of having to have a readObject, etc... and possibly back to serialPersistentFields? Technically deleting fields is an incompatible change as the stream will not contain the fields. If someone is crazy enough to serialize with jdk8 TLR and send it to a jdk7 release then the fields will have their default value (as the values aren't in the stream). As the fields aren't used then I don't think this should make a difference. Going the other way shouldn't be an issue either as the pad fields will be ignored. -Alan. Should there also be a change/patch to JDK7 TLR that would "fix" the strange behaviour (by adding readResolve)? This would align the semantics no matter which direction (7/7, 7/8, 8/7, 8/8) of serialization/deserialization is used...

Regards, Peter



More information about the core-libs-dev mailing list