Skip to content

Conversation

@gaobinlong
Copy link
Contributor

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

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

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.

…server module

Signed-off-by: Binlong Gao <gbinlong@amazon.com>
@github-actions
Copy link
Contributor

github-actions bot commented Nov 9, 2025

❌ 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>
@github-actions
Copy link
Contributor

github-actions bot commented Nov 9, 2025

❌ 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?

@github-actions
Copy link
Contributor

✅ Gradle check result for 8120806: SUCCESS

@codecov
Copy link

codecov bot commented Nov 10, 2025

Codecov Report

❌ Patch coverage is 46.66667% with 136 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.18%. Comparing base (c0a32d4) to head (05a24d0).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...g/opensearch/common/inject/internal/MoreTypes.java 16.12% 41 Missing and 11 partials ⚠️
.../org/opensearch/common/inject/internal/Errors.java 0.00% 13 Missing ⚠️
...ucene/search/vectorhighlight/CustomFieldQuery.java 41.17% 4 Missing and 6 partials ⚠️
...a/org/opensearch/extensions/ExtensionsManager.java 0.00% 6 Missing ⚠️
...java/org/opensearch/ingest/ConfigurationUtils.java 64.70% 3 Missing and 3 partials ⚠️
...org/opensearch/ingest/TrackingResultProcessor.java 58.33% 2 Missing and 3 partials ⚠️
...org/opensearch/common/xcontent/XContentHelper.java 0.00% 0 Missing and 3 partials ⚠️
...va/org/opensearch/ingest/ConditionalProcessor.java 25.00% 1 Missing and 2 partials ⚠️
...ain/java/org/opensearch/ingest/IngestDocument.java 87.50% 2 Missing and 1 partial ⚠️
.../main/java/org/opensearch/rest/RestController.java 50.00% 2 Missing and 1 partial ⚠️
... and 22 more
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #19938      +/-   ##
============================================
- Coverage     73.30%   73.18%   -0.13%     
+ Complexity    71582    71519      -63     
============================================
  Files          5785     5785              
  Lines        326961   326905      -56     
  Branches      47296    47280      -16     
============================================
- Hits         239684   239236     -448     
- Misses        68026    68471     +445     
+ Partials      19251    19198      -53     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@sandeshkr419 sandeshkr419 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@github-actions
Copy link
Contributor

✅ Gradle check result for 05a24d0: SUCCESS

@gaobinlong gaobinlong merged commit 3b5136d into opensearch-project:main Nov 11, 2025
32 of 33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants