Re: Serialization problem

2010-01-30 Thread Goktug Gokdogan
I would put the first element to a different field, make periods field transient and implement a readResolve method that calls a constructor. So, something like this should solve your problem easily, right? private final String name private final Duration duration private final PeriodField fir

Serialization problem

2010-01-30 Thread Stephen Colebourne
I thought I'd raise an issue with serialization that I've had a problem with more than once. Perhaps there is an obvious easy solution, but I can't see it (I can see hard workarounds...) In JSR-310 we have lots of immutable classes. One of these stores four fields: private final String name