Skip to content

Conversation

@Vlatombe
Copy link
Member

@Vlatombe Vlatombe commented Nov 8, 2023

Follows up #490

Prefer calling deprecated overrides of getCredentials(..., Item, ...) if implemented rather than resolving closest ItemGroup.

Testing done

### Submitter checklist
- [ ] Make sure you are opening from a **topic/feature/bugfix branch** (right side) and not your main branch!
- [ ] Ensure that the pull request title represents the desired changelog entry
- [ ] Please describe what you did
- [ ] Link to relevant issues in GitHub or Jira
- [ ] Link to relevant pull requests, esp. upstream and downstream changes
- [ ] Ensure you have provided tests - that demonstrates feature works or fixes the issue

Prefer calling deprecated overrides of `getCredentials(..., Item, ...)` if implemented rather than resolving closest `ItemGroup`.
@Vlatombe Vlatombe requested a review from a team as a code owner November 8, 2023 13:31
@Nullable org.acegisecurity.Authentication authentication) {
Objects.requireNonNull(item);
return getCredentialsInItemGroup(type, item.getParent(), authentication == null ? null : authentication.toSpring(), List.of());
return getCredentialsInItemFallback(type, item, authentication == null ? null : authentication.toSpring(), List.of());
Copy link
Member Author

Choose a reason for hiding this comment

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

Prevents infinite recursion in case the overrides delegates to super implementation.

@Vlatombe Vlatombe requested a review from jglick November 8, 2023 13:47
@jglick jglick added the bug label Nov 8, 2023
@jtnord jtnord merged commit 8835d63 into jenkinsci:master Nov 9, 2023
@Vlatombe Vlatombe deleted the credentialsprovider-compatibility-fix branch November 9, 2023 14:04
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.

4 participants