Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-7165

JAXBUtils.nameToIdentifier(ELEMENT_NAME, IdentifierType.CLASS) returns incorrect result if ELEMENT_NAME starts with Upper Case

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.1.6, 3.1.7, 3.1.8
    • 3.1.13, 3.2.0
    • JAXB Databinding
    • 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]

      Attachments

        Activity

          People

            dkulp Daniel Kulp
            sabiyak Sabiya Kazi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: