-
Bug
-
Resolution: Unresolved
-
Major
-
None
groovy.lang.ReadOnlyPropertyException: Cannot set readonly property: script for class: my.lib.MyClass
This error is thrown when running (MyClass is loaded from a shared library):
@Library("my-lib") _ new my.lib.MyClass(this)
MyClass:
package my.lib class MyClass implements Serializable { final protected script MyClass(script) { this.script = script } }
Is this expected? Disabling the sandbox the problem goes away.
What version of workflow-cps are you using? I know some changes have gone in lately for dealing better with {{final}}s.