Open Tomas-Kraus opened 10 years ago
@glassfishrobot Commented Reported by pbielicki
@glassfishrobot Commented pbielicki said: patch sent to dev@jaxb.java.net
@glassfishrobot Commented pbielicki said: patch available on github: https://github.com/pbielicki/jaxb/commit/4bafc09fc6a2be203329e3e2423bf9143698828b
@glassfishrobot Commented Was assigned to yaroska
@glassfishrobot Commented This issue was imported from java.net JIRA JAXB-983
JAXB reads annotations directly from scanned classes by calling directly java.lang.Class.getAnnotation(Class) This means that Java classes must be annotated directly by e.g. @XmlRootElement, @XmlType etc.
JAXB should read also meta annotations of scanned class annotations i.e. let's take the following example:
and then a Java bean:
In such case if you execute this:
you will get an error:
IMHO it's a bug. JAXB should support annotations annotated with javax.xml.bind annotations. I will send you a patch for class annotations but it should be also the case for fields and methods, I think.
Affected Versions
[2.2.7]