[ http://jira.codehaus.org/browse/JIBX-36?page=history ]
     
Dennis Sosnoski closed JIBX-36:
-------------------------------


> Custom unmarshallar unmarshal method always gets passed null object reference
> -----------------------------------------------------------------------------
>
>          Key: JIBX-36
>          URL: http://jira.codehaus.org/browse/JIBX-36
>      Project: JiBX
>         Type: Bug
>   Components: core
>     Versions: 1.0-beta3c
>     Reporter: Thomas Jones-Low
>     Assignee: Dennis Sosnoski
>      Fix For: 1.0-RC0

>
>
> When writing a custom unmarshaller the initial call to 
> IUnmarshaller.unmarshal() alwasy has a null object refererence. This is a 
> problem when the object has been instatiated by the constructor of the 
> enclosing object. 
> For example:
> The class file:
> public class Notation {
>    private string name;
>    private HTMLDocument notation;
>    public Notation {
>    notation = new HTMLDocument();
>    }
> }
>     The Binding file:
> <binding>
>     <mapping class="javax.swing.text.html.HTMLDocument" name="comment"
>         marshaller="HTMLListMapper"
>         unmarshaller="HTMLListMapper">
>     </mapping>
>    <mapping name="notation" class="Notation">
>       <value name="name" field="name"/>
>        <structure field="comment" usage="optional"/>
>     </mapping>
> </binding>
> public class HTMLListMapper implements IMarshaller, IUnmarshaller, IAliasable
> {
> public Object unmarshal(Object obj, IUnmarshallingContext ictx);
> }
> When HTMLListMapper.unmarshal() gets called, obj is null and the unmarshal 
> method is expected to create the HTMLDocument. What should happen in the 
> HTMLDocument reference from the Notation class should be passed instead.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
jibx-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-devs

Reply via email to