-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Compare strings with equals() instead of == #15369
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Dmitry Kryukov <dk2k@ya.ru>
❌ Gradle check result for af992a9: 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? |
❕ Gradle check result for af992a9: 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 ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #15369 +/- ##
============================================
- Coverage 71.93% 71.88% -0.05%
+ Complexity 63223 63190 -33
============================================
Files 5214 5214
Lines 295938 295938
Branches 42754 42754
============================================
- Hits 212876 212738 -138
- Misses 65601 65691 +90
- Partials 17461 17509 +48 ☔ View full report in Codecov by Sentry. |
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 with a suggestion
@@ -622,7 +622,7 @@ protected IndexShard newShard( | |||
Settings nodeSettings = Settings.builder().put("node.name", routing.currentNodeId()).build(); | |||
DiscoveryNodes discoveryNodes = IndexShardTestUtils.getFakeDiscoveryNodes(routing); | |||
// To simulate that the node is remote backed | |||
if (indexMetadata.getSettings().get(IndexMetadata.SETTING_REMOTE_STORE_ENABLED) == "true") { | |||
if ("true".equals(indexMetadata.getSettings().get(IndexMetadata.SETTING_REMOTE_STORE_ENABLED))) { |
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.
if ("true".equals(indexMetadata.getSettings().get(IndexMetadata.SETTING_REMOTE_STORE_ENABLED))) { | |
if (Boolean.getBoolean(indexMetadata.getSettings().get(IndexMetadata.SETTING_REMOTE_STORE_ENABLED))) { |
Compare strings with equals() instead of ==