Open mariuszpala opened 4 years ago
I think the problem is the definition of getLoginName
:
public String getLoginName() {
return loginName; // Replace with `return this.@loginName` as a workaround.
}
A workaround is to use this.@loginName
instead of loginName
in the method.
The problem is that the sandbox does not track the class that is accessing the property, which Groovy uses to decide when property access should go through the getter method or directly to the field.
This might be the underlying issue causing JENKINS-31484, or there might be two issues, one here and one in groovy-cps.
Download action repository 'tj-actions/json2file@v1.4.2' (SHA:46d3707a327c0049b276be5977a89354b9310003)
I have a groovy script below which fails with the StackOverflowError
It fails with the following error: