castor
  1. castor
  2. CASTOR-2565

Handling of nill element is not consistent against different types

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2
    • Fix Version/s: 1.3
    • Component/s: XML, XML code generator
    • Labels:
      None
    • Environment:
      Java :D
    • Testcase included:
      yes
    • Number of attachments :
      4

      Description

      I am experiencing problems with nillable elements. The behaviour of Castor is not consistent between xs:string and xs:integer elements. While xs:string elements are defaulted to null, as expected, xs:integer defaults to 0 even if the element is declared as nillable and nill.

      I haven't been able to track down the issue in the code, but I'm attaching a simple test case showing my issue there.

        Activity

        Hide
        Denis Cabasson added a comment -

        Thanks Werner for your very quick reaction and the speed with which you have provided a patch for that.

        I will test it thouroughly on Monday, using it with my real world schema and XML file and let you know how it is working for me.

        Thanks, and keep up the good work!

        Show
        Denis Cabasson added a comment - Thanks Werner for your very quick reaction and the speed with which you have provided a patch for that. I will test it thouroughly on Monday, using it with my real world schema and XML file and let you know how it is working for me. Thanks, and keep up the good work!
        Hide
        Denis Cabasson added a comment -

        Reviewed the patch, and applied it, built a 1.3rc2-SNAPSHOT version. It is now working as expected in regards to nil integer handling.

        Thanks for your work, Werner!

        Show
        Denis Cabasson added a comment - Reviewed the patch, and applied it, built a 1.3rc2-SNAPSHOT version. It is now working as expected in regards to nil integer handling. Thanks for your work, Werner!
        Hide
        Werner Guttmann added a comment -

        Thanks, Denis, for the feedback. I shall commit the changes later on today.

        Show
        Werner Guttmann added a comment - Thanks, Denis, for the feedback. I shall commit the changes later on today.
        Hide
        Werner Guttmann added a comment -

        I still need to commit the patch, as a result of which I will mark the issue as resolved. Once we have made this patch available as part of a AG release, please feel free to mark the issue as closed.

        Show
        Werner Guttmann added a comment - I still need to commit the patch, as a result of which I will mark the issue as resolved. Once we have made this patch available as part of a AG release, please feel free to mark the issue as closed.
        Hide
        Werner Guttmann added a comment -

        fyi, just uploaded a new snapshot release of 1.3rc2 with this patch included.

        Show
        Werner Guttmann added a comment - fyi, just uploaded a new snapshot release of 1.3rc2 with this patch included.

          People

          • Assignee:
            Werner Guttmann
            Reporter:
            Denis Cabasson
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: