We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
From
public PasswordValidator(final List<Rule> rules)
to
public PasswordValidator(final List<? super Rule> rules)
see for more information http://stackoverflow.com/questions/2723397/what-is-pecs-producer-extends-consumer-super
The text was updated successfully, but these errors were encountered:
My reading of that thread lends me to believe that we're got a producer. And the pattern should be List<? extends Rule>.
Is there a specific compile time problem you're trying to solve?
Sorry, something went wrong.
Easy :)
private static final List<CharacterRule> RULES = ImmutableList.of(ucimpRule); //... validator = new PasswordValidator(StreamEx.of(RULES).map(r -> (Rule) r).toList());
And looks like you are right. It is a producer. So List<? extends Rule>.
PasswordValidator should use PECS generic.
6662550
Fixes #55.
No branches or pull requests
From
to
see for more information http://stackoverflow.com/questions/2723397/what-is-pecs-producer-extends-consumer-super
The text was updated successfully, but these errors were encountered: