Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.0-JSR-5
-
None
-
None
Description
If a closure nested at a level greater than or equal to 2 accesses a method parameter, it does not read that parameter's value - rather it uses the reference itself as the value. This is difficult to explain, but I have attached a reproduction recipe to highlight the problem.
I don't know whether this is specific to builders or not, but I suspect it is probably a general problem. Strangely, local variables declared within the method are read correctly. This at least means that there is a reasonable workaround, which is to assign the problem parameter values to local variables.