The warning means you're not doing what you "agree" to do when you extend that class. That class trusts that you'll have a static final serialVersionUID field of type long
in your class if you extend it. That's because it implements Serializable
which is an interface requiring this variable.
To supress the warning add:
@SuppressWarnings("serial")
above the line where you declare the class (public class Foo
)
To fix the warning declare the variable as follows:
private static final long serialVersionUID = 1812107715815332895L;
And make sure the long you use is randomly generated.
Eclipse allows both of these options as a quick-fix by clicking on the yellow lightbulb next to the line number.