-
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.
[JENKINS-45824] groovy.lang.ReadOnlyPropertyException: Cannot set readonly property: script
Description |
Original:
{code} groovy.lang.ReadOnlyPropertyException: Cannot set readonly property: script for class: my.lib.MyClass {code} This error is thrown when running (MyClass is loaded from a shared library): {code} @Library("my-lib") _ new my.lib.MyClass(this) {code} MyClass: {code} package my.lib class MyClass implements Serializable { final protected script MyClass(script) { this.script = script } } {code} Is this expected? |
New:
{code} groovy.lang.ReadOnlyPropertyException: Cannot set readonly property: script for class: my.lib.MyClass {code} This error is thrown when running (MyClass is loaded from a shared library): {code} @Library("my-lib") _ new my.lib.MyClass(this) {code} MyClass: {code} package my.lib class MyClass implements Serializable { final protected script MyClass(script) { this.script = script } } {code} Is this expected? Disabling the sandbox the problem goes away. |
Component/s | New: workflow-cps-plugin [ 21713 ] | |
Component/s | Original: pipeline [ 21692 ] |
What version of workflow-cps are you using? I know some changes have gone in lately for dealing better with {{final}}s.