- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
SerialVersionUID and closures
Mon, 2011-01-03, 04:54
Examining changes in the bytecode, I notice that since r23627 closures
are no longer given a SerialVersionUID: the code which added the
serializable annotation was snipped and took that with it. By itself
that is possibly unimportant, but this change also had the effect of
removing the static initializer since that was the only thing in it.
There are 1771 classes which have a like this:
public static {};
Code:
Stack=2, Locals=0, Args_size=0
0: lconst_0
1: putstatic #11; //Field serialVersionUID:J
4: return
in 2.8.1 and no at all in trunk.
I do not know what consequences if any this has, but it makes my spidey
sense tingle. So:
* did we lose the serialversionUID intentionally?
* anyone know of some interesting impact the presence or absence of a
static initializer might have?
On Mon, Jan 3, 2011 at 04:53, Paul Phillips <paulp@improving.org> wrote:
No, that was an oversight. Thanks for pointing it out,I'll have a look at it.
Lukas