This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Struts and the fly likes action does not declare serialversionuid warning Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply 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://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: action does not declare serialversionuid warning
 
Similar Threads
Compiler Warning when you implement Serializable interface
Eclipse Servlet Warning
ArrayList problem ...
serializable
eclipse error