-
Bug
-
Resolution: Unresolved
-
Minor
-
Jenkins 1.609
workflow-plugin 1.6
I'm working on implementing a new step in a plugin, and came across the following error:
If one argument step is a Map, and it is a field annotated with @DataBoundSetter, Ok, no problems. But if it is a Setter annotated with @DataBoundSetter the following error occurs during instantiation:
java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl cannot be cast to java.lang.Class at org.jenkinsci.plugins.workflow.structs.DescribableHelper.coerce(DescribableHelper.java:214) at org.jenkinsci.plugins.workflow.structs.DescribableHelper.buildArguments(DescribableHelper.java:186) at org.jenkinsci.plugins.workflow.structs.DescribableHelper.injectSetters(DescribableHelper.java:308) at org.jenkinsci.plugins.workflow.structs.DescribableHelper.instantiate(DescribableHelper.java:93) at org.jenkinsci.plugins.workflow.steps.StepDescriptor.newInstance(StepDescriptor.java:95) at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:133) at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:100) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:45) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) at com.cloudbees.groovy.cps.sandbox.DefaultInvoker.methodCall(DefaultInvoker.java:15) at WorkflowScript.run(WorkflowScript:5) ...
Apparently the error is in injectSetters() method of the class DescribableHelper
- duplicates
-
JENKINS-26535 DescribableHelper does not handle wildcards well
- Open
- is blocking
-
JENKINS-30519 Declarative job properties in multibranch
- Resolved