Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JENKINS-61438] IllegalArgumentException for ChoiceParameter on bindJSON saving job configuration #182

Merged
merged 3 commits into from
Jun 15, 2020
Merged

Conversation

nfalco79
Copy link
Member

bindJSON of RequestImpl now returns value itself if no converter found and the expected type is Object.

@nfalco79
Copy link
Member Author

This fix #181

Copy link
Member

@jglick jglick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No idea what the implications would be here, though it sounds like the risk of regression is low since affected code paths would have thrown IAE before. Needs a unit test at least; and then it would be wise to have a plugin PR demonstrating a test (with JenkinsRule.WebClient) which requires this to succeed, using an incremental version of stapler-core in I suppose provided scope.

core/src/main/java/org/kohsuke/stapler/RequestImpl.java Outdated Show resolved Hide resolved
core/src/main/java/org/kohsuke/stapler/RequestImpl.java Outdated Show resolved Hide resolved
@nfalco79
Copy link
Member Author

nfalco79 commented Mar 11, 2020

The jenkinsci/branch-api-plugin#185 do not pass the test.
The second commit to use incremental build pass

@nfalco79
Copy link
Member Author

[x] Added test a case as request
[x] additional test cases to prove use of stapler in a plugin PR
[x] cosmetic changes in PR review

From my side it's ok

@nfalco79
Copy link
Member Author

Any chance to get this fixed in next LTS?

@jglick
Copy link
Member

jglick commented Mar 19, 2020

TBD.

@nfalco79
Copy link
Member Author

nfalco79 commented Mar 19, 2020

To Be Do? Done
To Be Decide?
Too Boring Decision?

@jglick
Copy link
Member

jglick commented Mar 20, 2020

Sorry, to be determined, based on when I can make time to do a review and cut a release.

@jglick jglick removed their request for review April 27, 2020 20:34
@jglick
Copy link
Member

jglick commented Apr 27, 2020

Sorry, have not found any time, will try to find another maintainer…

@nfalco79
Copy link
Member Author

Ok, please let me know so I can remove the patch from our production

@jglick jglick requested a review from daniel-beck April 27, 2020 23:27
@nfalco79
Copy link
Member Author

ping

Copy link
Member

@jglick jglick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probable NPE in code without test coverage. Would only affect code that would have already thrown IAE, so not a regression, but looks like a mistake that should be fixed (or that portion of the patch simply reverted).

@nfalco79
Copy link
Member Author

I did changes as per review and rebase against master

nfalco79 added 2 commits June 15, 2020 16:47
…SON saving job configuration

Return value itself if no converter found and expected type is Object
…SON saving job configuration

Fix potential NPE
@jglick
Copy link
Member

jglick commented Jun 15, 2020

rebase against master

BTW this breaks the ability for reviewers to only look at incremental changes. For a small patch like this, it is not a big deal; for a larger patch it would mean starting the review from scratch.

Suffices to do a true merge with master.

@jglick jglick merged commit 81fbe28 into jenkinsci:master Jun 15, 2020
@jglick jglick added the bug label Jun 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IllegalArgumentException on when the setter parameter is of type Object
2 participants