JAXB compiler is binding xs:boolean to Java Boolean wrapper class, instead of boolean primitive type

后端 未结 4 1702
天涯浪人
天涯浪人 2020-12-09 10:36

I\'m migrating a project from JAXB 1.0 to JAXB 2.1 and I\'m having problems with the datatype mapping.

I\'m using the Ant xjc binding compiler, and I\'ve su

4条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-09 10:47

    Just to make it complete

    type="xs:boolean" minOccurs="0" maxOccurs="1"                   == Boolean value (object)
    
    type="xs:boolean" minOccurs="0" maxOccurs="1" nillable="true"   == JAXBElement value (object)
    
    type="xs:boolean" minOccurs="1" maxOccurs="1"                   == boolean value (primitive)
    
    type="xs:boolean" minOccurs="1" maxOccurs="1" nillable="true"   == Boolean value (object)
    

提交回复
热议问题