-
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
ConcurrentHashSet is redundant with ConcurrentHashMap#newKeySet() #4851
Comments
Better to use ConcurrentHashMap.newKeySet |
You're welcome to contribute a PR for this, as well as in the impacted projects: |
If you don't mind, i can do this too:), @magicprinc ,a nice find! |
@tsegismont @He-Pin Could you test it? And add test for concurrentHashSet implementations too? |
@tsegismont All your tasks are done! |
@magicprinc there's one more usage in vertx-mqtt, can you please take care of it before we merge this PR? |
@tsegismont I am sorry, but I can't find it. Could you name a class with it? |
GitHub search shows 2 files, and both are fixed in my PR |
@tsegismont They are both fixed in PR vert-x3/vertx-mqtt#243 |
For some reason, I wasn't subscribed to all notifications on vertx-mqtt
This is why I missed the PR, sorry.
|
Closed by #4852 |
It seems that
io.vertx.core.impl.ConcurrentHashSet
is a copy of JDK'sCollections.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:
PR: #4852
The text was updated successfully, but these errors were encountered: