Re: [Simple-support] Deserialization of type Calendar?
Brought to you by:
niallg
|
From: <Nia...@ub...> - 2008-10-01 17:04:26
|
Hi, Yes, this will be fixed very soon in the next version, it is a bug at the moment. Unfortunately it is something I did not spot until recently. Niall -----Original Message----- From: Timo Rumland [mailto:cr...@ol...] Sent: 01 October 2008 17:34 To: sim...@li... Cc: Gallagher, Niall-N Subject: Re: [Simple-support] Deserialization of type Calendar? Hello, > Well, you could change the PackageMatcher so that if it's a Calendar > then it converts to a GregorianCalendar (but this means that if the > field is Calendar then it will always be a GregorianCalendar). this is really bad news for me. Now I must change all those domain model classes to use GregorianCalendar. And not only this, but every single line that sets the Calendar by using someObject.setTime(Calendar.getInstance()); must now have a cast to GregorianCalendar :-/ > The reason this does not work with class= is because non-annotated > types go straight to the Transformer. But what is the real reason behind the scenes? Unfortunately, I don't know much about the internals of the Simple Framework, but isn't it a possible enhancement to let Simple look at the "class=" attribute and then delegate to the correct Transformer? Are you going to have that "fixed" for a future release, or is this behavior inteded and will not be changed? I still don't understand the difference why this works with a List interface (e.g.: List< String > as the member and ArrayList< String > as the concrete type with "class=java.util.ArrayList" attribute in the XML code), since "List" is also non-annotated. Thanks a lot for all the information Best regards, Timo Rumland Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mails are not encrypted and cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. UBS Limited is a company registered in England & Wales under company number 2035362, whose registered office is at 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom. UBS AG (London Branch) is registered as a branch of a foreign company under number BR004507, whose registered office is at 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom. UBS Clearing and Execution Services Limited is a company registered in England & Wales under company number 03123037, whose registered office is at 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom. |