You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by "McMillan, DouglasC" <Do...@cbsa-asfc.gc.ca> on 2006/03/27 21:37:30 UTC

Nil vs. Null

There have been several posts over the last few years about the handling of nil and null values. The part of it that I was never fond of was the assignment of nil to non-nillable elements when a null was passed, as it causes the resulting object to fail validation. The only workaround for this seems to be manual field by field testing for null assignments.

After doing this for a few projects, I got a little irritated and updated SchemaTypeCodePrinter to unset a non-nillable element when a null value is passed. Is there any chance of this being included in the next release of the code, and if so,  how would I go about submitting it?

An alternative thought would be to make the functionality switchable using the command line options, since it only affects generated classes. Thoughts?


Professional squirrel. Closed course. Do not attempt.