wood burning stoves 2.0*
The moose likes Struts and the fly likes action does not declare serialversionuid warning Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "action does not declare serialversionuid warning" Watch "action does not declare serialversionuid warning" New topic
Author

action does not declare serialversionuid warning

anand kumarblr
Greenhorn

Joined: Oct 27, 2006
Posts: 27
when Action extends Action Support i get a warning action does not declare serialversionuid.
Please excuse my ignorance if this was basic questions...

1) what is advantage of declaring serialversionuid in action class?

2) when does the action class gets serialized.Even in Clustered Environment i don't see action needs serialization.
Please tell any scenario where action needs to be serialized.?

3) If my action does not get serialized why do i need to add unnecessary code(declare serialversionuid) to my action making it Big.?

4) I assume serialversionuid makes sense only when the action gets serialized.is this right?

I will be really grateful if someone shares your ideas.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Does a single line of code really make your action appreciably bigger?

You can always turn off the warning with an annotation (also a single line).
anand kumarblr
Greenhorn

Joined: Oct 27, 2006
Posts: 27
Actually i meant if thats really required?

Because i really didnt get when action class gets serialized.
and i am thinking adding that line makes sense only if the action gets serialized.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: action does not declare serialversionuid warning
 
Similar Threads
Compiler Warning when you implement Serializable interface
eclipse error
serializable
ArrayList problem ...
Eclipse Servlet Warning