On 01/08/2013 06:36, Xuelei Fan wrote:
An anonymous class cannot make any guarantees about serialization
compatibility since has a compiler-generated, implementation-specific
name that may vary uncontrollably. It is nonsensical for an anonymous
class to define a serialVersionUID.

Although it can't give guarantees about serialisation, that doesn't mean that it doesn't. We probably don't want to upset anything relying upon it. Having said that, in this case it doesn't seem to be reasonably accessible. Shame there isn't a good way of marking a class non-serialisable.

Tom

Reply via email to