Re: [T5.2.6] Component class transformation on initialized private instance fields

2012-01-09 Thread Kalle Korhonen
On Mon, Jan 9, 2012 at 11:27 PM, robert baker wrote: > I wanted to write a doc snippet to go in the Component Classes page in > the guide under "Transient Instance Variables" in a warning > box/pullout after the first paragraph, rewording and summing up what > you both have said: > """ > Never ini

Re: [T5.2.6] Component class transformation on initialized private instance fields

2012-01-09 Thread robert baker
Hey I just wanted to thank you both (Josh and Thiago) before I forget; this helped solve a tough production bug that was affecting a lot of people. I wanted to write a doc snippet to go in the Component Classes page in the guide under "Transient Instance Variables" in a warning box/pullout after t

Re: [T5.2.6] Component class transformation on initialized private instance fields

2012-01-05 Thread Thiago H. de Paula Figueiredo
On Thu, 05 Jan 2012 03:35:53 -0200, robert baker wrote: Hi all, Hi! When a page/component is transformed (in version 5.2.6) and there is a field like the following: private List aList = new ArrayList(); You should never, never, never, ever initialize a component, page or mixin field

Re: [T5.2.6] Component class transformation on initialized private instance fields

2012-01-04 Thread Josh Canfield
> Does the inline initialization claim the field at transformation-time > so that it is not cleared during request detachment? The inline initialization is used to reset the value at the end of a request. So, if you put stuff in the default list then you are going to see it in all of your pages. I

[T5.2.6] Component class transformation on initialized private instance fields

2012-01-04 Thread robert baker
Hi all, When a page/component is transformed (in version 5.2.6) and there is a field like the following: private List aList = new ArrayList(); Does the inline initialization claim the field at transformation-time so that it is not cleared during request detachment? ("Claim" as in what the @Reta