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

Make closure to registerAllowedMethod optional #191

Merged
merged 1 commit into from
Mar 27, 2020
Merged

Make closure to registerAllowedMethod optional #191

merged 1 commit into from
Mar 27, 2020

Conversation

TobiX
Copy link
Contributor

@TobiX TobiX commented Mar 26, 2020

For your consideration - I'm fine if this is considered too dangerous 😺 - just close and forget the pull request then

Before, you had to specify the closure to registerAllowedMethod, even
if you wanted the default behaviour. For this reason, a big block of
registerAllowedMethod calls has a lot of noise, because each line ends
with , null). This change makes it possible to omit.

Technically, this change is not API-compatible, but I think the benefits
outweigh the small amount of corner-cases this might break...

Before, you had to specify the closure to registerAllowedMethod, even
if you wanted the default behaviour. For this reason, a big block of
registerAllowedMethod calls has a lot of noise, because each line ends
with `, null)`. This chang makes it possible to omit.

Technically, this change is not API-compatible, but I think the benefits
outweigh the small amount of corner-cases this might break...
Copy link
Contributor

@nre-ableton nre-ableton left a comment

Choose a reason for hiding this comment

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

I think that 5a0e631 should be dropped. Unless I'm missing something, the execution will not be the same.

@TobiX
Copy link
Contributor Author

TobiX commented Mar 26, 2020

I think that 5a0e631 should be dropped. Unless I'm missing something, the execution will not be the same.

At least the captured call tree from the test com.lesfurets.jenkins.TestRegression is the same as before. I cannot prove that both are doing the same, since I'm not exactly sure what the "default" execution flow is... I can revert if that is not enough evidence...

@TobiX
Copy link
Contributor Author

TobiX commented Mar 27, 2020

Dropped the commit for now, I'll try to find more evidence for my claims :D

Copy link
Contributor

@nre-ableton nre-ableton left a comment

Choose a reason for hiding this comment

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

This PR looks good to me, what do you think @stchar?

@stchar stchar merged commit 7ea4351 into jenkinsci:master Mar 27, 2020
@stchar
Copy link
Contributor

stchar commented Mar 27, 2020

Nice! Merged.

@TobiX TobiX deleted the cleanup-registerallowedmethod branch March 28, 2020 12:24
stchar pushed a commit that referenced this pull request Mar 30, 2020
stchar pushed a commit that referenced this pull request Mar 30, 2020
stchar pushed a commit that referenced this pull request Apr 1, 2020
stchar added a commit that referenced this pull request Apr 3, 2020
feat(declarative): apply changes done in #191
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants