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

logic issue in RedisRegistry leads to services cannot be discovered. #3291

Merged
merged 1 commit into from
Jan 29, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ private void doNotify(Jedis jedis, Collection<String> keys, URL url, Collection<
}
List<URL> urls = new ArrayList<>();
Map<String, String> values = jedis.hgetAll(key);
if (CollectionUtils.isEmptyMap(values)) {
if (!CollectionUtils.isEmptyMap(values)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for this PR. Could you add a UT for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is it necessary? This is my first PR,I don't know much about。

Copy link
Contributor

@khanimteyaz khanimteyaz Jan 22, 2019

Choose a reason for hiding this comment

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

@Boomblog no worries I will add that on behalf of you 😃 and will guide you on this . As a practice we follow to add UT if there is conditional changes.

FYI I have created an issue for the same.

Thanks for raising this PR and the contribution. Welcome.

Copy link
Contributor

Choose a reason for hiding this comment

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

CollectionUtils.isNotEmptyMap(values) seems better to me :)

Copy link
Member

Choose a reason for hiding this comment

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

@Boomblog This suggestion is good, please modify it.

for (Map.Entry<String, String> entry : values.entrySet()) {
URL u = URL.valueOf(entry.getKey());
if (!u.getParameter(Constants.DYNAMIC_KEY, true)
Expand Down