Jaxb generated class used JAXBElement instead of specified type

后端 未结 1 2080
隐瞒了意图╮
隐瞒了意图╮ 2021-02-08 18:51

This question has been asked in various guises - but I feel there is still room to catalogue this further.

I have an xsd with two element definitions

<         


        
相关标签:
1条回答
  • 2021-02-08 19:11

    If nillable="true" together with minOccurs="0" it is impossible to represent the values with just a String. What would null mean? Does it mean that it was null, or that it occurred 0 times? But I guess that is somewhat moot when it comes to just a String.

    Compare with empty list. A null list is certainly different to an empty one.

    0 讨论(0)
提交回复
热议问题