Issue 1: Plugin does not generate getters for boolean primitive fields (and does not respect default values).
Status:  New
Owner: ----
Reported by mattias....@gmail.com, Nov 7, 2011
Take a simple schema like:
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.example.org/test" xmlns="http://www.example.org/test" elementFormDefault="qualified">

  <xsd:element name="test" type="Test"/>

  <xsd:complexType name="Test">
    <xsd:attribute name="requiredBooleanAttribute" type="xsd:boolean" use="required"/>
    <xsd:attribute name="optionalBooleanAttribute" type="xsd:boolean"/>
    <xsd:attribute name="defaultValuedBooleanAttribute" type="xsd:boolean" default="true"/>
  </xsd:complexType>

</xsd:schema>

The plugin will generate the following code:

    public Boolean getOptionalBooleanAttribute() {
        return this.optionalBooleanAttribute;
    }

    public Boolean getDefaultValuedBooleanAttribute() {
        return this.defaultValuedBooleanAttribute;
    }

The following code is *missing* from the output:

    public boolean getRequiredBooleanAttribute() {
        return this.requiredBooleanAttribute;
    }

Attached is a sample Maven project that shows the issue, along with a "proof-of-concept" patch that solves the issue (and also leverages existing is-style accessors to get default values).

bg-test.zip
3.1 KB   Download
primitive-boolean-getter.patch
4.1 KB   View   Download