Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Won't Fix
-
Affects Version/s: 1.0-RC2
-
Fix Version/s: None
-
Component/s: core
-
Labels:None
-
Environment:jdk 1.5
-
Number of attachments :
Description
if the binding is:
<value name="parallelism-level" field="parallelismLevel" style="attribute" usage="optional" />
and java field is initialized:
private int parallelismLevel=1;
and XML instance does not contain attribute parallelism-level, then, after unmarshalling, the parallelismLevel==0
This behavior is by design for JiBX. Part of the reason for this is that JiBX reuses existing objects where available, so good programming practice says it should initialize all fields based on the input (rather than leaving their states indeterminant). If you'd like other options, please enter an enhancement request.
See http://jira.codehaus.org/browse/JIBX-35 for a related discussion.