Re: [patch] fix for de-serialisation issue with SQueryResult [1 Attachment]

Noel Grandin <[email protected]> Tue, 09 Nov 2010 14:51:11 +0200
Newsgroups gmane.comp.java.orm.simpleorm
Message-ID <[email protected]>
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] <mailto:franck.routier%40axege.com>
>
> 

Disclaimer: http://www.peralex.com/disclaimer.html