[Engine-devel] jaxb annotations
Laszlo Hornyak
lhornyak at redhat.com
Fri Dec 16 10:24:49 UTC 2011
Hi!
I ran into some jaxb-annotated beans in engine, and the annotations seemed to be a bit unsettled.
- Some annotations are on the field, some on the getter.
- I have also found a case where the setter is private, it is actually dead code. I was puzzled for a minute :-) It seems in this case jaxb actually sets the value through reflection, so the setter really is dead code.
- Some annotations state name, others just build on the defaults
Is there an agreement for the annotations?
It would be great if we could annotate the getter always and use a proper name in the @XmlElement annotation even if it is equal to the default, so it is less likely to break at refactoring.
Laszlo
More information about the Engine-devel
mailing list