Right, so today I added a null check condition on the getters and setters,
that solved the problem. However, it seems like a workaround - shouldn't
beanlib check for corner cases like these? For example, build a dependency
tree between getters and copy them in the correct order. Should I forward
this report to the beanlib developers?

On Thu, Mar 12, 2009 at 12:49 PM, noon <bruno.marches...@gmail.com> wrote:

>
> Hi,
>
> First, thanks for the feedback : it is always nice to read that Gilead
> is used and helps :)
>
> About your issue, your analysis is right.
> Possible workarounds would be :
>    - add @ServerOnly annotation on your statusName getter and setter
> (Gilead will prevent it to be cloned and merged by beanlib)
>    - just add a null check condition in your statusName getter and
> setter
>
> Regards
> Bruno
>
> On 12 mar, 00:06, Itamar Ravid <itamar.ira...@gmail.com> wrote:
> > Hi Bruno - first off, thanks for all of your hard work. Your project is a
> > real life-saver, and we're using it extensively in our project.
> >
> > I'd like to report a bug. I have not tested yet with gilead 1.2.2, but
> I'd
> > like to report it anyway.
> >
> > Assume two classes:
> >
> > public class Status {
> >     Long id;
> >     String name;
> >
> >     public Long getId() { ... }
> >     public Long setId(Long id) { ... }
> >     public String getName() { ... }
> >     public Long setName(String name) { ... }
> >
> > }
> >
> > public class Ticket {
> >     Status status;
> >
> >     public Status getStatus() { ... }
> >     public Status setStatus(Status status) { ... }
> >
> >     public String getStatusName() { return getStatus().getName(); }
> >     public String setStatusName(String name) { getStatus().setName(name);
> }
> >
> > }
> >
> > I've omitted the getters and setters for brevity, as I assume their
> contents
> > is well known. The problem occurs when serializing a Ticket instance. I
> > suspect that the problem lies in beanlib, though I wanted to consult you
> > first.
> >
> > While serializing a Ticket, I receive a NullPointerException, while
> beanlib
> > tries to access the delegate method getStatusName in Ticket. I've come to
> > suspect, through debugging, that this happens since beanlib tries to copy
> > the statusName property (which does not exist) -before- copying the
> status
> > property. It'd be great if you could confirm my assumptions. For now,
> we've
> > prefixed all delegate methods with an underscore, to prevent beanlib from
> > recognizing them as property getters/setters.
> >
> > Any thoughts?
> >
> > On Wed, Mar 11, 2009 at 11:30 PM, noon <bruno.marches...@gmail.com>
> wrote:
> >
> > > Gilead library permits you to send Persistent entities (and especially
> > > the partially loaded ones) to the GWT  client side without pain.
> >
> > > This release is a maintenance one, fixing half a dozen bugs, and
> > > providing many improvements (see release notes for details).
> >
> > > A particular work was made on improving clone performances.
> >
> > > Also note that hibernate-jpa-util have been now merged with hibernate-
> > > util JAR, and some integration classes for JBoss and Spring are now
> > > provided.
> >
> > > Hope this helps !
> > > Bruno
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to