I have a JiBX mapping for a serial port that looks like this:
<mapping abstract="true" class="com.exampleSerialConfig">
<value name="baudRate" get-method="getBaudRate"
set-method="setBaudRate" usage="optional"/>
...
</mapping>
The getBaudRate()/setBaudRate() methods take a value of type int.
I would expect that if the XML contained no <baudRate> element, then
setBaudRate() would not be invoked. The underlying Java class initializes
this property to 9600, so I would expect that to be the default value if not
specified.
However, event when there's no <baudRate> element JiBX is invoking
setBaudRate() with a value of zero!
Where is this zero coming from??
Similarly, in the case of object properties, JiBX is always setting the
value to null if there's no corresponding XML element.
Is this a bug or am I missing something?
Thanks,
-Archie
--
Archie L. Cobbs
------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software
be a part of the solution? Download the Intel(R) Manageability Checker
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users