mdfeist / CMPUT301F12T12

CMPUT301 Class Project
Other
1 stars 0 forks source link

Suppress Warnings? #9

Closed devonwaldon closed 11 years ago

devonwaldon commented 11 years ago

Why are we suppressing all the serial warnings? I did some research (http://stackoverflow.com/questions/4749207/suppresswarningsserial), and the second fix (by Jesper) seems pretty simple. Just wanted to make sure that wouldn't change anything if I went ahead and added the serialVersionUID.

According to this (http://stackoverflow.com/questions/285793/what-is-a-serialversionuid-and-why-should-i-use-it) we can just not declare it, and use the default one. Is there a benefit to using SuppressWarning as opposed to this?

mdfeist commented 11 years ago

If you want to go and put serialVersionUID in each of the classes that use Serializable then go for it but there isn't a need because Eclipse does it for us. Well kind of. It works until we change a something in a class and try to load it from a file.

devonwaldon commented 11 years ago

Oh okay. So don't bother? Or is the serialVersionUID a better idea?

mdfeist commented 11 years ago

I wouldn't bother unless you feel that we are going to be doing updates on those classes while users use our product. So at the moment it's a waste of time.