cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sabiya Kazi (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CXF-7165) JAXBUtils.nameToIdentifier(ELEMENT_NAME, IdentifierType.CLASS) returns incorrect result if ELEMENT_NAME starts with Upper Case
Date Tue, 06 Dec 2016 13:40:59 GMT
Sabiya Kazi created CXF-7165:
--------------------------------

             Summary: JAXBUtils.nameToIdentifier(ELEMENT_NAME, IdentifierType.CLASS) returns
incorrect result if ELEMENT_NAME starts with Upper Case
                 Key: CXF-7165
                 URL: https://issues.apache.org/jira/browse/CXF-7165
             Project: CXF
          Issue Type: Bug
          Components: JAXB Databinding
    Affects Versions: 3.1.8, 3.1.7, 3.1.6
            Reporter: Sabiya Kazi
            Priority: Minor


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]??




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message