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
[SCB-591] configcenter need to do encode #713
Conversation
try { | ||
encodeServiceName = URLEncoder.encode(serviceName, "UTF-8"); | ||
} catch (UnsupportedEncodingException e1) { | ||
e1.printStackTrace(); |
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.
print?
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.
done
} catch (UnsupportedEncodingException e1) { | ||
e1.printStackTrace(); | ||
} | ||
String path = URIConst.ITEMS + "?dimensionsInfo=" + StringUtils.deleteWhitespace(encodeServiceName); |
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.
delete whitespace before or after encode?
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.
done
try { | ||
encodeServiceName = URLEncoder.encode(StringUtils.deleteWhitespace(serviceName), "UTF-8"); | ||
} catch (UnsupportedEncodingException e) { | ||
LOGGER.error("encode error: {}",e.getMessage()); |
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.
1.not format code
2.failed but still continue?
3."UTF-8" can changed to java.nio.charset.StandardCharsets.UTF_8.name()
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.
we can encoding serviceName in instance initialization if possible.
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.
ServiceName is stitched together in the CONFIG_CENTER_CONFIG.getServiceName() method,so you mean do encode in this method?
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.
format code,failed,UTF_8.name() have done.
Follow this checklist to help us incorporate your contribution quickly and easily:
[SCB-XXX] Fixes bug in ApproximateQuantiles
, where you replaceSCB-XXX
with the appropriate JIRA issue.mvn clean install
to make sure basic checks pass. A more thorough check will be performed on your pull request automatically.huawei's huangyun set up an agent to modify the special characters '#',which led to the governance inoperative