R
Rhino
I'm trying to resolve some compiler warnings that I've simply ignored for
quite a long time. Many of them are pretty obvious but I've come across a
few that aren't clear to me at all. One of these involves Serializable.
I have several occurrences of warnings of this type: "The serializable class
Foo does not declare a final serialVersionUID field of type long."
I've got dozens of messages of this kind and the classes that get the
warning message extend a variety of different classes, including JFrame,
JDialog, JApplet, but also classes that have nothing to do with GUIs, like
some homegrown Exception classes.
Can someone explain what this message is about: what it means, why I get it,
and how I can prevent it?
I've read the article about Serializable in the API but most of it goes
right over my head. I'm particularly foggy on which value I'm supposed to
use in the serialVersionUID constant if I choose to code one, which is
apparently highly-recommended.
I'm also unclear on what Bad Things are going to happen if I don't change my
code to prevent this warning.
I'd appreciate it if anyone can clarify this for me.
quite a long time. Many of them are pretty obvious but I've come across a
few that aren't clear to me at all. One of these involves Serializable.
I have several occurrences of warnings of this type: "The serializable class
Foo does not declare a final serialVersionUID field of type long."
I've got dozens of messages of this kind and the classes that get the
warning message extend a variety of different classes, including JFrame,
JDialog, JApplet, but also classes that have nothing to do with GUIs, like
some homegrown Exception classes.
Can someone explain what this message is about: what it means, why I get it,
and how I can prevent it?
I've read the article about Serializable in the API but most of it goes
right over my head. I'm particularly foggy on which value I'm supposed to
use in the serialVersionUID constant if I choose to code one, which is
apparently highly-recommended.
I'm also unclear on what Bad Things are going to happen if I don't change my
code to prevent this warning.
I'd appreciate it if anyone can clarify this for me.