Topic: That this warning means

Here the warning
The serializable class does not declare a static final serialVersionUID field on type long
And how it to avoid? And whether it is strong badly?


Re: That this warning means

Reptor, 4/16/2007, 17:52, post1101123 wrote:

and how it to avoid?

To add  in a class
static final long serialVersionUID = 2345234523L;
it is able  the automatic machine. It is necessary to distinguish two  the successor of one parent. To put it briefly, if you do not know, what for it hammer.


Re: That this warning means

Couple of days ago it was considered .
Use search before to create a subject!


Re: That this warning means

It is the class version.
If you do not set it is it  automatically.
It is necessary for: the client + the server. In between on a network we flies  object of class MyTransferObject. At it a couple of fields and getterov/setters.
We add system, we change this class (car   already another (!)), we spread on the server, on the client we forget.
At deserialising (object recovery) in a client class,  defines that  differ... That is you send, actually, one object, and accept another. That is forgot to update the library with this class on the client. That is whether it is not enough that there changed and as it will work now and that generally for object came.
And if did not forget - if you please - update and on the client.
Type such here skazochki-proverochki.
And if you set it independently should support him numbering.
The minus - changed a class - change number.
Plus - you can change a class insignificantly, all will be as before. But if something was in essence replaced - then only change  to show that a class already "as a matter of fact" another
[mergetime] 1176740338 [/mergetime]
And, About! It is exact! Described after all  smile