-
Notifications
You must be signed in to change notification settings - Fork 107
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
jep-227 downstream usage #357
Conversation
public <C extends Credentials> List<C> getCredentials(@NonNull Class<C> type, @Nullable ItemGroup itemGroup, | ||
@Nullable Authentication authentication) { | ||
return getCredentials(type, itemGroup, authentication, Collections.emptyList()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fewer overloads to deal with 👍
@Nullable Authentication authentication, | ||
@NonNull List<DomainRequirement> domainRequirements) { | ||
if (item instanceof AbstractFolder) { | ||
// credentials defined in the folder should be available in the context of the folder | ||
return getCredentials(type, (ItemGroup) item, authentication, domainRequirements); | ||
return getCredentialsInItemGroup(type, (ItemGroup) item, authentication, domainRequirements); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clearer 👍
CredentialsProvider.lookupCredentials(StandardUsernamePasswordCredentials.class, (ItemGroup) f, | ||
ACL.SYSTEM, Collections.emptyList()); | ||
CredentialsProvider.lookupCredentialsInItemGroup(StandardUsernamePasswordCredentials.class, f, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no cast needed for method resolution 👍
See JENKINS-XXXXX.
Proposed changelog entries
Submitter checklist
* Use the
Internal:
prefix if the change has no user-visible impact (API, test frameworks, etc.)