Archived
This forum has been archived. Please start a new discussion on GitHub.
eclipse gives warning about slice generated classes
I don't know if this is an issue or not, but I wanted to share.
I have a slice exception that looks like this:
exception CommError {
int err;
};
I've run slice2java on that particular slice file and generated the corresponding java files. When I import it into eclipse, it gives me a warning on the CommError.java file:
"The serializable class CommError does not declare a static final serialVersionUID field of type long."
The program compiles fine and runs great, but I didn't see this listed in the forums anywhere so I thought I'd share in case it might present any issues.
I have a slice exception that looks like this:
exception CommError {
int err;
};
I've run slice2java on that particular slice file and generated the corresponding java files. When I import it into eclipse, it gives me a warning on the CommError.java file:
"The serializable class CommError does not declare a static final serialVersionUID field of type long."
The program compiles fine and runs great, but I didn't see this listed in the forums anywhere so I thought I'd share in case it might present any issues.
0
Comments
-
That warning is enabled by default in Eclipse, but I almost always disable it because I don't generally use serialization and don't care if the classes I use do or do not have a serialVersionUID. If you go into the preferences, under Java - Errors/Warnings - Potential programming problems you can change the value for "Serializable class without serialVersionUID" from "Warning" to "Ignore".
Possibly for the Ice-generated classes this is important.0 -
Thank you very much for the tip, Mary Ellen.0