-
Notifications
You must be signed in to change notification settings - Fork 13k
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
replace lang3 in api #3126
replace lang3 in api #3126
Conversation
@KomachiSion Hello,可以帮忙看下为什么 Travis CI 失败了吗。 |
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.
There are one thing need to changed:
No need use this
in method except the constructor
, set
and get
method. Please remove them from all.
And other question:
If the Utils is totally copy from commons-lang3
, Are there necessary to remove the dependency in Server? We may need a more discuss.
@JsonIgnore | ||
public Map<String, String> getCustomHeaders() { | ||
if (StringUtils.isBlank(headers)) { | ||
if (StringUtils.isBlank(this.headers)) { |
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.
No need use this
for use except in constructor, set, get.
for (String s : headers.split(Constants.NAMING_HTTP_HEADER_SPILIER)) { | ||
String[] splits = s.split(":"); | ||
final Map<String, String> headerMap = new HashMap<String, String>(16); | ||
for (final String s : this.headers.split(Constants.NAMING_HTTP_HEADER_SPILIER)) { |
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.
No need use this for use except in constructor, set, get.
@Override | ||
public int hashCode() { | ||
return Objects.hashCode(path, headers, expectedResponseCode); | ||
return Objects.hashCode(this.path, this.headers, this.expectedResponseCode); |
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.
No need use this for use except in constructor, set, get.
final Http other = (Http) obj; | ||
if (!StringUtils.equals(this.type, other.getType())) { |
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.
No need use this for use except in constructor, set, get.
return false; | ||
} | ||
return expectedResponseCode == other.getExpectedResponseCode(); | ||
return this.expectedResponseCode == other.getExpectedResponseCode(); |
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.
No need use this for use except in constructor, set, get.
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.
去掉 this 了哈
*/ | ||
public static final int OVER_THRESHOLD = 503; | ||
|
||
public static final int RESOURCE_NOT_FOUND = -404; |
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.
这个码是什么意思?
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.
这个码是什么意思?
-404 吗,这个之前就已经存在了,是 @nkorange 添加的
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.
整体建议这次只改重构代码的地方。 如果格式问题建议另外一个pr整理,以便重点关注变更点,提高review效率
Please do not create a Pull Request without creating an issue first.
What is the purpose of the change
#3102
Brief changelog
XX
Verifying this change
XXXX
Follow this checklist to help us incorporate your contribution quickly and easily:
[ISSUE #123] Fix UnknownException when host config not exist
. Each commit in the pull request should have a meaningful subject line and body.mvn -B clean package apache-rat:check findbugs:findbugs -Dmaven.test.skip=true
to make sure basic checks pass. Runmvn clean install -DskipITs
to make sure unit-test pass. Runmvn clean test-compile failsafe:integration-test
to make sure integration-test pass.