-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Replace explicit type conversion with instanceof pattern variable in server module #19938
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 explicit type conversion with instanceof pattern variable in server module #19938
Conversation
…server module Signed-off-by: Binlong Gao <gbinlong@amazon.com>
|
❌ Gradle check result for d383827: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Signed-off-by: Binlong Gao <gbinlong@amazon.com>
|
❌ Gradle check result for 8120806: null Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
sandeshkr419
left a comment
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.
LGTM!
server/src/main/java/org/opensearch/cluster/InternalClusterInfoService.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Binlong Gao <gbinlong@amazon.com>
Description
Similar to #19714.
Use the modern instanceof pattern variables instead of explicit type conversions in the server module, this can improve the code readability and reduce potential ClassCastException risks.
Most code are generated by LLM, and I checked them manually and reverted the unnecessary and wrong changes.
Related Issues
No issue, just mentioned this in a previous PR.
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.