Skip to content

Conversation

ShannonDing
Copy link
Member

What is the purpose of the change

Change the string length from int to unsigned int

Brief changelog

Change the string length from int to unsigned int

Verifying this change

build

Follow this checklist to help us incorporate your contribution quickly and easily. Notice, it would be helpful if you could finish the following 5 checklist(the last one is not necessary)before request the community to review your PR.

  • Make sure there is a Github issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a Github issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
  • Format the pull request title like [ISSUE #123] Fix UnknownException when host config not exist. Each commit in the pull request should have a meaningful subject line and body.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Write necessary unit-test(over 80% coverage) to verify your logic correction, more mock a little better when a cross-module dependency exists.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

@ShannonDing ShannonDing added this to the 1.2.3 milestone Apr 23, 2019
@ShannonDing ShannonDing merged commit c1f4254 into apache:master Apr 24, 2019
@ShannonDing ShannonDing deleted the namesrv branch April 24, 2019 11:16
Copy link

@yichenluan yichenluan left a comment

Choose a reason for hiding this comment

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

bug


string NameSpaceUtil::formatNameServerURL(string nameServerAddr) {
int index = nameServerAddr.find(ENDPOINT_PREFIX);
unsigned int index = nameServerAddr.find(ENDPOINT_PREFIX);
Copy link

@yichenluan yichenluan May 9, 2019

Choose a reason for hiding this comment

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

when there is no ENDPOINT_PREFIX in nameServerAddr, index will equal to 0xffffffff,
that means never equal to string::npos.
@ShannonDing

Choose a reason for hiding this comment

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

#147

I made a PR for this bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants