One of my binding files uses the same name for multiple mappings:
 
<mapping name="RSP" class="com.replaced.XmlResponse">  <value name="rc" 
field="rc" />  <value name="msg" field="msg" usage="optional" />  <value 
name="request" field="method" usage="optional" /> </mapping>
 
 <mapping name="RSP" class="com.replaced.xml.LoginRs" 
extends="com.replaced.XmlResponse">  <value name="rc" field="rc" />  <value 
name="request" field="method" />  <structure name="login">   <value 
name="session" field="session" />  </structure> </mapping>
 
When using JiBX 1.1.3 it works fine, however with JiBX 1.1.5 it throws NPE in 
org.jibx.binding.model.NameAttributes equals method.
 
I have fixed it by replacing 
 
if (m_name.equals(comp.m_name)) {
 
with 
 
if (m_name.equals(comp.m_name) && m_namespace.getUri() != null) {
 
on line 183 of NameAttributes.java and recompiling JiBX. After that it all 
seems to be working correctly.
 
Is that a valid fix? If yes can it be included in the next regular release?
 
thank you
 
Stan
_________________________________________________________________
Call friends with PC-to-PC calling for free!
http://get.live.com/messenger/overview
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to