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

Perform distinct/applicable filtering after identifying configured and available Docker client strategies #4467

Merged
merged 2 commits into from
Sep 20, 2021

Conversation

bsideup
Copy link
Member

@bsideup bsideup commented Sep 17, 2021

No description provided.

@bsideup bsideup added this to the next milestone Sep 17, 2021
.sorted(Comparator.comparing(DockerClientProviderStrategy::getPriority).reversed())
)
.filter(new Predicate<DockerClientProviderStrategy>() {
Copy link
Member

Choose a reason for hiding this comment

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

Why can't we use distinct() here?

Copy link
Member Author

Choose a reason for hiding this comment

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

It compares by value, while we need to compare by type

Copy link
Member

Choose a reason for hiding this comment

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

D'oh, yes!

Copy link
Member

Choose a reason for hiding this comment

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

Streams API would benefit from a distinct(Function<T,R>) method, it seems 😂

@rnorth rnorth merged commit e7b98f9 into master Sep 20, 2021
@rnorth rnorth deleted the use_distinct_with_strategies branch September 20, 2021 08:44
@rnorth rnorth changed the title Use distinct with strategies Perform distinct/applicable filtering after identifying configured and available Docker client strategies Sep 20, 2021
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.

None yet

3 participants