The following issue has been updated:

    Updater: Joshua Davies (mailto:[EMAIL PROTECTED])
       Date: Wed, 21 Jul 2004 11:51 AM
    Comment:
The attached file was generated with "diff -u", and has been tested with the command:

patch -p0 < MarshallingContext.diff

relative to the "jibx" directory of a freshly unzipped version of jibx-beta3c.zip.
    Changes:
             Attachment changed to MarshallingContext.diff
    ---------------------------------------------------------------------
For a full history of the issue, see:

  http://jira.codehaus.org/browse/JIBX-32?page=history

---------------------------------------------------------------------
View the issue:
  http://jira.codehaus.org/browse/JIBX-32

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: JIBX-32
    Summary: Provide more info when nulls are passed to marshalling context
       Type: Improvement

     Status: Unassigned

 Original Estimate: Unknown
 Time Spent: Unknown
  Remaining: Unknown

    Project: JiBX

   Assignee: 
   Reporter: Joshua Davies

    Created: Wed, 21 Jul 2004 11:11 AM
    Updated: Wed, 21 Jul 2004 11:51 AM

Description:
>From the JiBX FAQ:

  Q. Why do I get a java.lang.NullPointerException when I try to   
  marshal a document?
  A. The most likely cause is that you've got a null value for an 
  object that's not marked as optional in the binding definition. 
  ... snip ...
  add a pre-get method to that class for debugging purposes 
  ... snip ...

It occurs to me that it's relatively simple to change that NPE to a jibx exception 
that identifies that "name" value that was passed into MarshallingContext.element with 
a null value so that the user doesn't have to modify his bindings file just to figure 
out which item was null (which isn't always possible, especially when it happens in 
production).

I've already applied this patch to beta3c (which we're using here); I'll attach the 
same patch to this issue.


---------------------------------------------------------------------
JIRA INFORMATION:
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



-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
jibx-devs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jibx-devs

Reply via email to