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 <[email protected]> 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 <[email protected]> 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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---