What happened if there is no value for some class fields in xml file during JAXB unmarshalling? JAXB just “omit” this value and left them uninitialized?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
they will get initialized.
Initial values for fields will be set and the no-arg constructor will also run.
for example:
if the values in the xml for x, y, z and object are omitted there valus will be:
x: 100 (the constructor runs after the field value initialization)
y: 16 (from the field value initialization)
object: null (objects get initialized to null if no value is given)