Skip to content

Conversation

@gaobinlong
Copy link
Contributor

Description

Similar to #19714.

Use the modern instanceof pattern variables instead of explicit type conversions in all moduels, this can improve the code readability and reduce potential ClassCastException risks.

Related Issues

No issue.

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.

…plugins dir and libs dir

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

❌ Gradle check result for 33e2d12: 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?

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!

Thanks @gaobinlong for putting efforts in refactoring this!

@github-actions
Copy link
Contributor

❌ Gradle check result for 33e2d12: 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

❕ Gradle check result for 1f9ae8a: UNSTABLE

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

@codecov
Copy link

codecov bot commented Nov 17, 2025

Codecov Report

❌ Patch coverage is 76.86833% with 65 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.17%. Comparing base (a2e1fa2) to head (cbb78ef).
⚠️ Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
...n/annotation/processor/ApiAnnotationProcessor.java 73.33% 0 Missing and 8 partials ⚠️
...rg/opensearch/core/xcontent/MapXContentParser.java 68.75% 2 Missing and 3 partials ⚠️
...ava/org/opensearch/ingest/attachment/TikaImpl.java 16.66% 3 Missing and 2 partials ⚠️
...org/opensearch/plugin/ingestion/fs/FileOffset.java 0.00% 2 Missing and 2 partials ⚠️
.../opensearch/telemetry/OTelAttributesConverter.java 57.14% 2 Missing and 1 partial ⚠️
.../java/org/opensearch/common/bootstrap/JarHell.java 0.00% 1 Missing and 1 partial ⚠️
...a/org/opensearch/core/util/ConfigurationUtils.java 80.00% 1 Missing and 1 partial ⚠️
.../org/opensearch/core/xcontent/XContentBuilder.java 88.23% 1 Missing and 1 partial ⚠️
...n/java/org/opensearch/common/ssl/KeyStoreUtil.java 50.00% 0 Missing and 2 partials ⚠️
...ch/common/xcontent/json/JsonXContentGenerator.java 66.66% 0 Missing and 2 partials ⚠️
... and 22 more
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #20012      +/-   ##
============================================
- Coverage     73.27%   73.17%   -0.11%     
+ Complexity    71553    71483      -70     
============================================
  Files          5789     5789              
  Lines        327144   327112      -32     
  Branches      47156    47116      -40     
============================================
- Hits         239715   239353     -362     
- Misses        68235    68517     +282     
- Partials      19194    19242      +48     

☔ 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.

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

❌ Gradle check result for 33e2d12: 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?

Need to handle potential NPE for switch, will check previous refactor PRs.

@github-actions
Copy link
Contributor

❌ Gradle check result for cbb78ef: 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?

@github-actions
Copy link
Contributor

✅ Gradle check result for cbb78ef: SUCCESS

@sandeshkr419 sandeshkr419 merged commit 2f930dc into opensearch-project:main Nov 18, 2025
34 of 36 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