Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What algorithm is used by eclipse to generate verison id in Serializable class?

Suppose here is my class :

class B implements Serializable {

    private static final long serialVersionUID = -5186261241138469827L; // what algo is used to generate this
     ..........
}

What algorithm eclipse uses to generate serialVersionUID = -5186261241138469827L ?

like image 987
Prateek Avatar asked Oct 02 '22 19:10

Prateek


1 Answers

Eclipse implements the relevant Java spec to compute Serialization ID.

In Eclipse, this is implemented by calculateSerialVersionId method in org.eclipse.jdt.internal.ui.text.correction.SerialVersionHashOperation class.

like image 95
krishnakumarp Avatar answered Oct 07 '22 22:10

krishnakumarp