Re: [patch] fix for de-serialisation issue with SQueryResult
Franck Routier <[email protected]> Tue, 09 Nov 2010 14:12:56 +0100
| Newsgroups | gmane.comp.java.orm.simpleorm |
|---|---|
| Organization | Axège sarl |
| Message-ID | <1289308376.5354.21.camel@franck-laptop> |
Ok, I included your test. In fact what bothered me is that SDataSet clone() method relies on serialization and is covered by the tests (and I even do use it in my code without problem). But what you are trying to do is serialzing the SQueryResult (ie a list of SRecordInstance that all belong to the same SDataSet), not the SDataSet. So this was not covered by the tests. Thanks for your contribution, Best regards, Franck Le mardi 09 novembre 2010 à 14:51 +0200, Noel Grandin a écrit : > > [Attachment(s) from Noel Grandin included below] > Oops, sorry, correct one attached. > > > > Franck Routier wrote: > > > > > > I think this is the wrong attachment > > > > Le mardi 09 novembre 2010 à 14:19 +0200, Noel Grandin a écrit : > > > > > > [Attachment(s) from Noel Grandin included below] > > > Hi > > > > > > Franck Routier wrote: > > > > > > > > > > > > Noël, I've commited your patch, that seems to be inspired by the > > > > workaround mentionned in sun's bug report. > > > > > > > > However I'm not sure I understand the out.writeObject(sDataSet); > > > > part. > > > > Can you explain this ? > > > > > > > > > > > > > > > > > > > Because I've made the sDataSet field transient, the class needs to > > > handle writing and reading that field itself. This works around > > the > > > problem because it forces the ObjectInputStream to initialise the > > rest > > > of the object's fields before it tries to initialise the sDataSet > > > field. > > > > Also, our current tests did not trigger the bug, so either we > > are > > > > missing some tests on serialization, or this bug is limited to > > only > > > > some > > > > JVM implementations (I personaly mainly use OpenJDK6). > > > > Do the tests break for you without your patch, or do you have an > > > > idea of > > > > a better test ? > > > > > > > > > > > > > > > > > > > I'm attaching a patch with a new test that can trigger this > > problem. > > > > > > Regards, Noel. > > > > > > > > > > > > __________________________________________________________ > > > Disclaimer: http://www.peralex.com/disclaimer.html > > > > > > > > > > > > > > > > > > > -- > > Franck Routier > > Logo Axège > > Axège > > 23,rue Saint-Simon > > 63000 Clermont-Ferrand > > Tél: +33 (0)4 63 05 95 40 > > Fax: +33 (0)4 73 70 65 29 > > Email: [email protected] > > > > > > > > > > > > > ______________________________________________________________________ > Disclaimer: http://www.peralex.com/disclaimer.html > > > > > ------------------------------------ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/SimpleORM/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/SimpleORM/join (Yahoo! ID required) <*> To change settings via email: [email protected] [email protected] <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/