Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] serialversionuid

> Under what circumstances does ajc change this field?

Ajc does not change the field. The problem is that when there is *no*
such field, the SUID is a hash which is computed at load-time. How
exactly this is done is written somewhere in the Java Language
Specification IIRC.

> As an example, could adding a logging aspect for a run of a 
> system have the potential to change this field so any objects 
> created when logging was on could be incompatible with the 
> normal Java objects? 
> 

As far as I know only changes to the signatures, i.e. adding/removing
fields/methods or modifying their signatures changes this hash.

> Has anyone had any problems as a result of this???

Certainly some people did, otherwise it would not be written down there
:-)

If you explicitly declare those fields in your classes, you are all
fine. So there is no reason to really worry about it. One should just
keep it in mind when using AspectJ and serialization.

Eric

--
Eric Bodden
Sable Research Group, McGill University
Montreal, Canada 



Back to the top