Currently the resolve method in the IDResolver interface only accepts
one string as argument, assuming all objets unmarshalled will have
distinct IDREFs, but 2 objects of 2 different classes could have the
same id, for example :
<root>
<a id="123"/>
<b id="123"/>
<c id="456">
<a>123</a>
</c>
</root>
Unmarshalling this document will lead to an IllegalArgumentException,
because the reference 123 used in the C element will be resolved to the
instance of B instead of the instance of A as expected.
I suggest adding a java.lang.Class argument to the IDResolver.resolve
method, that would fix this issue. I can provide a patch if needed.
Emmanuel Bourg
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev
- Re: [castor-dev] Should IDResolver.resolve be class aware ... Emmanuel Bourg
- Re: [castor-dev] Should IDResolver.resolve be class a... Arnaud Blandin
- Re: [castor-dev] Should IDResolver.resolve be cla... Emmanuel Bourg
- Re: [castor-dev] Should IDResolver.resolve be class a... Claude Vedovini
- Re: [castor-dev] Should IDResolver.resolve be class a... Keith Visco
- Re: [castor-dev] Should IDResolver.resolve be class a... Keith Visco
