Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dk2k
Copy link
Contributor

@dk2k dk2k commented Aug 22, 2024

Compare strings with equals() instead of ==

Signed-off-by: Dmitry Kryukov <dk2k@ya.ru>
Copy link
Contributor

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

Copy link
Contributor

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

Copy link

codecov bot commented Aug 23, 2024

Codecov Report

Attention: Patch coverage is 20.00000% with 4 lines in your changes missing coverage. Please review.

Project coverage is 71.88%. Comparing base (abb1041) to head (af992a9).
Report is 168 commits behind head on main.

Files with missing lines Patch % Lines
...earch/suggest/phrase/NoisyChannelSpellChecker.java 0.00% 0 Missing and 2 partials ⚠️
...h/common/lucene/search/MultiPhrasePrefixQuery.java 0.00% 0 Missing and 1 partial ⚠️
...ons/bucket/composite/UnsignedLongValuesSource.java 0.00% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

@dblock dblock added backport 2.x Backport to 2.x branch skip-changelog labels Aug 24, 2024
Copy link
Member

@dbwiddis dbwiddis left a 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))) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if ("true".equals(indexMetadata.getSettings().get(IndexMetadata.SETTING_REMOTE_STORE_ENABLED))) {
if (Boolean.getBoolean(indexMetadata.getSettings().get(IndexMetadata.SETTING_REMOTE_STORE_ENABLED))) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch skip-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants