Lambdas and serialization
crazybob at crazybob.org
Tue Oct 19 10:18:09 PDT 2010
FWIW, anonymous inner classes can technically be serializable (insofar as
they can implement Serializable), but it's typically not safe to do so
because their internal state is unspecified. In other words, the
serializable form of an anonymous inner class from one compiler may not be
compatible with another.
I've personally always wanted anonymous classes to be safely serializable so
I could use them in HTTP sessions, RPCs, etc.
More information about the lambda-dev