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

NPE When Mapping two xsd:dates in same object with Aegis Databinding

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.5, 2.2.1, 2.2.2, 2.1.6, 2.2.3, 2.1.7, 2.2.4, 2.1.8, 2.2.5, 2.1.9, 2.2.6, 2.2.7
    • Fix Version/s: 2.2.8
    • Component/s: None
    • Labels:
      None

      Description

      When you use an Aegis mapping file to map multiple properties of an object to an xsd:date using the DateType class, an NPE occurs. This actually occurs due to the .equals() method of the Type class. The equals() is checking the schema and the typeClass attributes, however due to the manner in which XmlBeanTypeInfo is generating the Type, it never sets the typeClass attribute, and therefore an NPE occurs.

      I erroneously identified this a the fix for CXF-2728, however it turns out this isn't the case. I applied the patch to v2.1.5 locally and tested it, and it still occured. This tag is where type attribute of the ageis mapping file is actually being used for the first time.

      I have attached a JUnit test case (Eclipse/Maven project) as well as a patch. I made an assumption, which is hopefully valid.

      -B

        Attachments

        1. XMLBeanTypeInfo.java.patch
          0.6 kB
          Bryan Stopp
        2. cxf-binding-bug.zip
          6 kB
          Bryan Stopp

          Activity

            People

            • Assignee:
              dkulp Daniel Kulp
              Reporter:
              panth13 Bryan Stopp
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: