Although I\'m not currently planning to serialize anything, I give all serializable outer classes, as well as static nested classes a SerialVersionUID
, because
Give them a serialVersionUID, because:
It's good (for all of the reasons stated in the documentation to which you've linked) that you won't be serializing instances of those inner classes. I suppose, if you were paranoid or worried other developers might not exercise the same good judgement, you could enforce that choice by having a writeObject
method in each inner class that unconditionally throws an exception.