jenkinsci / jenkinsci/configuration-as-code-plugin
`$StaplerConverterImpl` is invoked with unexpected arguments
- Dominant language
- Java
- Stars
- 2.8k
- Forks
- 756
- Avg merge
- 9h 47m
- Merged PRs (30d)
- 10
Description
Given a databound type with a `List` property, and `SomeClass$StaplerConverterImpl` existing, this code appears to invoke the converter, passing the `List` object, asking to get a `SomeClass`, when exporting a configuration:
https://github.com/jenkinsci/configuration-as-code-plugin/blob/8264363446b4677222bdfb6af0c41ac29fb61f52/plugin/src/main/java/io/jenkins/plugins/casc/impl/configurators/DataBoundConfigurator.java#L300-L304
The correct behavior is implementation-dependent, but likely involves returning a `List`.
This seems unexpected. My expectation was that the converter is invoked once for each `SomeClass` list entry.
See https://github.com/jenkinsci/matrix-auth-plugin/pull/145/files#diff-a714ec3c04d484b6a8bb5fa7b0bf64cf3ebb61dfc095fb4b826cdac479c257bfR62-R69 for an example of this in `matrix-auth`.
Contributor guide
Assessment
This issue has not been assessed yet.