pre-set and pre-get do not work withount a value binding inside the mapping.
----------------------------------------------------------------------------
Key: JIBX-173
URL: http://jira.codehaus.org/browse/JIBX-173
Project: JiBX
Issue Type: Bug
Components: core
Affects Versions: JiBX 1.1.5
Environment: Windows XP, Java 6.0
Reporter: dan schmidt
Attachments: jibx-bug.zip
the pre-set and pre-get methods do not get called if there are no attributes
set, as in the following binding:
<binding>
<mapping name="person" class="starter.Person" pre-get="preGet"
pre-set="preSet">
<!-- uncomment next line and it starts working -->
<!--
<value name="place-holder" field="placeholder" style="attribute"
/>
-->
</mapping>
</binding>
I have attached a eclipse project that displays this bug. I found one
workaround was adding the collowing code to ObjectBinding.java:
public boolean hasAttribute() {
return super.hasAttribute() || (m_preGetMethod != null)
|| (m_preSetMethod != null) || (m_postSetMethod
!= null);
}
I hope that is more helpful than confusing.
to run the tests, run the ant task build-and-run.xml. I tried making it a
junit, and the recompiling nature of this product made junits too complex.
--
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
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
-------------------------------------------------------------------------
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-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-devs