| Summary: | xml enum value invalid lexical value has a null text range | ||
|---|---|---|---|
| Product: | [WebTools] Dali JPA Tools | Reporter: | Karen Butzke <karenfbutzke> |
| Component: | JAXB | Assignee: | Karen Butzke <karenfbutzke> |
| Status: | VERIFIED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | jolene.moffitt |
| Version: | 3.1 | ||
| Target Milestone: | 3.1 RC1 | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
fixed for RC1 Verified in Build S-3.1.0-20111117042513 Verified when you add the above schema and class an error appears and an error marker appears but no error is error pane appears. See the link to view test steps for verification. http://wiki.eclipse.org/Dali_3.1_RC1 |
The following schema simple type and corresponding enum gives a validation error on the USState enum 'Invalid lexical value "CA" for schema type 'USState''. The validation error is correct, but it does not have a valid text range, so you don't see a marker in the java editor. In the error log: java.lang.IllegalArgumentException: Null text range for message ID: XML_ENUM_VALUE__INVALID_LEXICAL_VALUE <xsd:simpleType name="USState"> <xsd:restriction base="xsd:NCName"> <xsd:enumeration value="AK"/> <xsd:enumeration value="AL"/> </xsd:restriction> </xsd:simpleType> @XmlType(name = "USState") @XmlEnum public enum USState { AK, AL, CA; public String value() { return name(); } public static USState fromValue(String v) { return valueOf(v); } }