Home Bug Reports

eclipse gives warning about slice generated classes

ctennisctennis Member Caleb TennisOrganization: AEIProject: Project GINA ✭✭✭
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.

Comments

  • mefostermefoster Member Mary Ellen FosterOrganization: Heriot-Watt University, EdinburghProject: ECHOES learning environment ✭✭✭
    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.
  • ctennisctennis Member Caleb TennisOrganization: AEIProject: Project GINA ✭✭✭
    Thank you very much for the tip, Mary Ellen.
Sign In or Register to comment.