Other |
---|
tbd_majorResolved |
Duplicate :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
Javac doesn't issue a warning if a serialVersionUID is present in an enum or an anonymous subclass. It should issue a warning, since the serialVersionUID of any enum or anon subclass of enum is defined to be 0L. Compiling the following with -Xlint:all generates no warnings. It might be reasonable to have this warning controlled by the "serial" lint option, that is, enabled via -Xlint:serial. ----- Guy.java ----- enum Guy { TOM { private static final long serialVersionUID = 4290774380558885855L; }, DICK { private static final long serialVersionUID = -6849794470754667710L; }, HARRY { private static final long serialVersionUID = -9172774392245257468L; }; private static final long serialVersionUID = 1360826667806852920L; }
|