Community
Participate
Working Groups
+++ This bug was initially created as a clone of Bug #345031 +++ (For tracking post 3.0.1 fix) Build Identifier: I20110428-0848 When trying to apply @XmlType to a field, the following CCE would be thrown: ---------------- java.lang.ClassCastException: org.eclipse.jpt.jaxb.core.internal.resource.java.source.SourceField cannot be cast to org.eclipse.jpt.jaxb.core.resource.java.JavaResourceAbstractType at org.eclipse.jpt.jaxb.core.internal.resource.java.XmlTypeAnnotationDefinition.buildAnnotation(XmlTypeAnnotationDefinition.java:47) at org.eclipse.jpt.jaxb.core.internal.GenericAnnotationProvider.buildAnnotation(GenericAnnotationProvider.java:84) at org.eclipse.jpt.jaxb.core.internal.resource.java.source.SourceAnnotatedElement.buildAnnotation(SourceAnnotatedElement.java:219) at org.eclipse.jpt.jaxb.core.internal.resource.java.source.SourceAnnotatedElement.addOrSyncAnnotation_(SourceAnnotatedElement.java:286) <snip> -------------- Similar exception would be thrown when trying to apply @XmlType to a property complaining org.eclipse.jpt.jaxb.core.internal.resource.java.source.SourceField cannot be cast to org.eclipse.jpt.jaxb.core.resource.java.JavaResourceAbstractType. Reproducible: Always
taking this one, my changes to our annotation constructors will fix this bug
fixed for 3.1 M1
Verified in Build I-3.4.0-20110912100409 Verified ClassCastException does not appear when you add @XmlType. See the link to view test steps for verification. http://wiki.eclipse.org/Dali_3.1_M1