Skip to content

Do not compare strings with == - #2030

Merged
svillar merged 1 commit into
mainfrom
fix_string_comparison
Aug 14, 2026
Merged

Do not compare strings with ==#2030
svillar merged 1 commit into
mainfrom
fix_string_comparison

Conversation

@svillar

@svillar svillar commented Aug 3, 2026

Copy link
Copy Markdown
Member

The == operator compares references, and could indeed return true even if contents match. Replace it by equals which in the case of Strings compares contents.

@svillar svillar added the release_candidate PR that should be part of the next release label Aug 3, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Ready to approve

The code change is small and correct; the only concern is PR scope/title clarity rather than functional correctness.

This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.

Pull request overview

Updates a string comparison in the Chromium runtime initialization path to avoid reference-equality checks and ensure the ABI flavor is compared by value before applying an x64-specific Vulkan disablement switch.

Changes:

  • Replace == string comparison with .equals("x64") for BuildConfig.FLAVOR_abi when deciding to disable Vulkan.
File summaries
File Description
app/src/common/chromium/com/igalia/wolvic/browser/api/impl/RuntimeImpl.java Uses value-based string comparison for ABI flavor gating of a Chromium command-line switch.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.

@svillar
svillar requested a review from felipeerias August 4, 2026 06:42
@svillar
svillar force-pushed the fix_string_comparison branch from aa10611 to f906ac2 Compare August 14, 2026 15:58
The == operator compares references, and could indeed return true even
if contents match. Replace it by equals which in the case of Strings
compares contents.
@svillar
svillar force-pushed the fix_string_comparison branch from f906ac2 to 50a3206 Compare August 14, 2026 15:59
@svillar
svillar merged commit 9100032 into main Aug 14, 2026
22 checks passed
@svillar
svillar deleted the fix_string_comparison branch August 14, 2026 16:59
@svillar svillar added this to the v1.9.1 milestone Sep 1, 2026
@svillar svillar removed the release_candidate PR that should be part of the next release label Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants