-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
#4851 ConcurrentHashSet→Utils.concurrentHashSet #4852
#4851 ConcurrentHashSet→Utils.concurrentHashSet #4852
Conversation
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.
Thank you @magicprinc
Can you please make a few changes?
@tsegismont fixed. Please see. Changed implementation to public static <E> Set<E> concurrentHashSet (){
return ConcurrentHashMap.newKeySet();// we can change implementation
} or do you mean: replace everywhere Util.concurrentHashSet with its body? I think this separate method is a more robust and readable solution. |
@He-Pin Could you fix other Vert.x modules (if any) which are using this - deleted - class |
@magicprinc Hi, thanks for the ping, I think it would be better for you to do it, and I don't have a write access to this project, then I have to make a PR to yours and that will make the thing a little complicated :) |
@He-Pin @tsegismont I can't find any other ConcurrentHashSet usages besides the corrected ones, so we probably have managed it :-) |
@magicprinc before we merge this PR we also need updates for the projects that depend on this class (see #4851 (comment)) |
Utils.concurrentHashSet() → ConcurrentHashMap.newKeySet()
@tsegismont All your tasks are done! 👍
|
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.
@magicprinc one last comment, thank you
@He-Pin Could you review and approve this too? 🙏 |
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.
Lgtm
Issue: #4851
It seems that io.vertx.core.impl.ConcurrentHashSet is a copy of JDK's Collections.newSetFromMap.
The Best Code is No Code At All.
It is probably a good idea to review and replace this class with two utility methods.