-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
JwtParserBuilder NestedCollection overrides #961
Comments
Hi @lhazlewood, I would like to create a PR (as part of hacktoberfest) to resolve this bug. I propose to implement public M replace(E e) {
this.collection.remove(e);
doAdd(e);
// triger changed() callback accordingly
if (...) changed();
return self();
} I have decided that
I am also running my idea through as I am not confident if it might bring about any security concerns. I would appreciate any comments on (the feasibility of) my proposed solution, Thank you. |
@lhy-hoyin Sorry for the delay, I had a minor family emergency and haven't been able to look at this, but I will be able to in about a week. @bdemers would you be able to look? Thanks for the Hacktobertest work! |
@lhy-hoyin Sounds good, please send a pull request! My suggestion would be to think about the unit tests too. Let us know when you have a PR ready and we will take a look! Tip Add |
add() is used instead of the previous replace(), but behaviour should still be the same.
Per #521 (comment), a nested collection
.add
call will not currently replace an existing algorithm with the same identifer (as the JavaDoc says it should). This issue represents the work to ensure this behavior works as documented.For those needing this behavior, until this issue is fixed, the current workaround is to explicitly call
.remove
before calling.add
:The text was updated successfully, but these errors were encountered: