Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
3.1.6, 3.1.7, 3.1.8
-
Unknown
-
Patch, Important
Description
If I use following API call
JAXBUtils.nameToIdentifier("XML_Transfer",IdentifierType.CLASS)
It returns: XML_Transfer
But according to JAXB mapping algorithm,
it should return XMLTransfer
Expected:XMLTransfer
Actual: XML_Transfer
For API call "JAXBUtils.nameToIdentifier("xML_Transfer", IdentifierType.CLASS)".
It returns: XMLTransfer
Expected:XMLTransfer
Actual: XMLTransfer
Observations
There is a bug in the implementation of this method, it fails if element name starts with upper case and contains special character such as _.
It will also not work for any element name that starts with upper case and contains one of the following character in it.
- A hyphen ('-', \u002D, HYPHEN-MINUS),
- A period ('.', \u002E, FULL STOP),
- A colon (':', \u003A, COLON),
- An underscore ('_', \u005F, LOW LINE),
- A dot ('.', \u00B7, MIDDLE DOT),
- \u0387, GREEK ANO TELEIA,
- \u06DD, ARABIC END OF AYAH, or
- \u06DE, ARABIC START OF RUB EL HIZB.
[This is taken from JAXB 2.0 specification]