-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Optimize Node, remove duplicate Settings #2703
Optimize Node, remove duplicate Settings #2703
Conversation
Signed-off-by: ruanwenjun <wenjun@apache.org>
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.
You are so careful that find out these codes to be refactored! 👍👍
In additon, please run ./gradlew spotlessApply
to formatting your code, which is shown in the Gradle check log. 😁
|
||
try { | ||
)) { | ||
if (get.exists() == false) { |
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.
A small question, does it cover the condition when get == null
?
(For reference: here is the GetResult class)
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.
@tlfeng Thanks for your review, I checked, the GetResult
will never be null here, but this is a good suggestion, add a check is better.
And I formatted the code, please review, thanks.
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.
Thanks for your time checking the situation! I'm just curious, because I'm not familiar with this part of code, not exactly a suggestion 😄.
And a note, every commit has to be signed off 😉 git commit -s
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.
Oh, added the signed of :).
❌ Gradle Check failure 68e49931dc1faa21669fb8b43f05d9742e19060c |
Signed-off-by: ruanwenjun <wenjun@apache.org>
68e4993
to
b5762de
Compare
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.
Thanks for making the code concise! 😄
You are welcome, I am interested in OpenSearch, hope to make this project better. |
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.
Thx for the cleanup!
Removes duplicate Settings Signed-off-by: ruanwenjun <wenjun@apache.org> Signed-off-by: Nicholas Walter knize <nknize@apache.org> (cherry picked from commit d848c63)
Description
I find some code might be optimized.
Issues Resolved
No related issue, since this is a small optimize
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.