Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

eclipse error

 
Jason Hocker
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new to Eclipse. How do I get this warning to go away? I am writing an exception that extends Exception

The serializable class DuplicateKeyException does not declare a static final serialVersionUID field of type long
 
KArol Muszynski
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jay,

Eclipse also shows You how to repair suchproblem. Open Your DuplicateKeyException class. In the left editor column, before line numbering, You will see yellow bulb with warning symbol. Click on it and Eclipse offer You how it can be repaired.


If You're not interested to see warnings about this kind of problems, it is possible to turn this mechanism off:

1. from menu choose Window -> Preferences
2. in preferences window, in left tree choose Java -> Compiler -> Errors/Warnings
3. on the right side choose PotentialProgrammingProblems -> Serializable class without serialVersionUID and change Warning to Ignore


Best Regards,
KArol Muszynski
[ November 05, 2005: Message edited by: KArol Muszynski ]
 
Adam Richards
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Another alternative: Use the Serial Version tool to create the value, then add the value to your class.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic