I made some refactoring moving tens of my plugin variables out of the constructor for a databoundsetter annotation.
Eventfully I have left with Jenkins keep complaining about 3 of them with the “Missing required parameter” error during pipeline script.
After some hours of trail and error, I finally noticed that the only thing different with them (2 Strings, one Boolean) is that unlike the rest of the variables - they contain an upper case letter within their second place:
vMGRBuildArchive
vSIFName
vSIFInputFile
Respectively, their databoundsetter will looks like:
@DataBoundSetter
public void setVMGRBuildArchive(boolean vMGRBuildArchive) {
this.vMGRBuildArchive = vMGRBuildArchive;
}
I did another try and changed vMGRBuildArchive to vmGRBuildArchive (and all getters & setters respectively), and that solved the issue.
Are there any restrictions for variable names having upper case letter within their second place?
It’s been a while since I did java dev but it’s either pojo or java beans standard notation. So it’s supposed to match the variable casing (except first letter after set)
But we have users who call from within the pipeline script with vMGRBuildArchive: true
How do I keep supporting them when I remove vMGRBuildArchive from the DataBoundConstructor?