You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2019/05/07 09:00:52 UTC
[GitHub] [skywalking] wayilau commented on a change in pull request #2623:
Abstract code & Remove redundant code & Simplfy code.
wayilau commented on a change in pull request #2623: Abstract code & Remove redundant code & Simplfy code.
URL: https://github.com/apache/skywalking/pull/2623#discussion_r281536030
##########
File path: apm-sniffer/apm-sdk-plugin/httpClient-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/httpClient/v4/HttpClientExecuteInterceptor.java
##########
@@ -112,18 +115,14 @@ private boolean isUrl(String uri) {
}
private String buildSpanValue(HttpHost httpHost, String uri) {
- if (isUrl(uri)) {
- return uri;
- } else {
- StringBuilder buff = new StringBuilder();
- buff.append(httpHost.getSchemeName().toLowerCase());
- buff.append("://");
- buff.append(httpHost.getHostName());
- buff.append(":");
- buff.append(port(httpHost));
- buff.append(uri);
- return buff.toString();
- }
+ return isUrl(uri) ? uri : new StringBuilder()
Review comment:
> > en, thanks for your reminder. this patch is not the code style at all.
>
> I commented why I think it is a coding style thing.
ok, i see.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services