Sounds like a bug. If products is null (not just empty) nothing should
be marshalled, so most likely you've run across a bug, in which case you
can file a bugzilla (http://bugzilla.exolab.org) report if you wish to
track progress on the issue.
--Keith
"Liu, Victor" wrote:
>
> Can anyone help me with a question regarding null handling.
>
> If I have a class:
>
> class SOMECLASS
> {
>
> public Product products[];
>
> public Product[] getProducts() { return products; }
>
> public void setProducts(Product products[]) { this.products =
> products; }
>
> }
>
> and I have an xml mapping with:
> ......
> <field name="products" type="com.gs.eq.pb.wte.Product"
> collection="array" container="false">
> <bind-xml name="Products" node="element"/>
> </field>
> ......
>
> Is there a way to have castor not generate "<Products/>" when the field
> "products" is null ? I am using 0.9.4.1
>
> Any help is appreciated.
> Victor
>
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
> unsubscribe castor-dev
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev