java - negative serialVersionUID? -


i came across exception handler class extends exception follows:

public class appfilereaderexception extends exception {     //explicit serialization uid added      private static final long serialversionuid = -2458461415998318236l;      public appfilereaderexception(string msg)      {         super(msg);     } 

the author used explicit serialization version uid , has ignored same in other similar exception handler classes. based on understood so post, can ignore serialization uid if application not using serialization , deserialization. oddly, author used negative uid. curious know if valid or recommended practice. there other reason use negative serialversionuid?

is there other reason use negative serialversionuid?

if see "random looking" explicit serialversionuid, it's been generated ide, typically starting off uid have been generated if explicit version hadn't been provided.

serialization version uids hash codes - magnitude of value irrelevant; positive , negative meaningless, other differentiation between values.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -