fredag 15 december 2006 22:49 skrev Pazu: > Shawn Pearce <spearce <at> spearce.org> writes: > > identical class file given the same input. I've seen times where > > it doesn't thanks to the automatic serialVersionUID field being > > somewhat randomly generated. > > Probably offline, but… serialVersionUID isn't randomly generated. It's > calculated using the types of fields in the class, recursively. The actual > algorithm is quite arbitrary, but not random. The automatically generated > serialVersionUID should change only if you add/remove class fields (either > on the class itself, or to the class of nested objects). Different java compilers (e.g. SUN's javac and Eclipse) generate slipghtly different code for some cases, including somee synthetic member fields. that get involved in the UID calculation. Neither compiler is wrong. The java specifications don't cover all cases. -- robin - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html