Skip to content

Replace Boolean.TRUE.toString().equals() with Boolean.parseBoolean()#2267

Merged
laeubi merged 1 commit intoeclipse-pde:masterfrom
laeubi:fix/boolean-parseBoolean-refactor
Mar 23, 2026
Merged

Replace Boolean.TRUE.toString().equals() with Boolean.parseBoolean()#2267
laeubi merged 1 commit intoeclipse-pde:masterfrom
laeubi:fix/boolean-parseBoolean-refactor

Conversation

@laeubi
Copy link
Contributor

@laeubi laeubi commented Mar 23, 2026

Replace the verbose Boolean.TRUE.toString().equals(selected) pattern with the simpler Boolean.parseBoolean(selected) in FeatureOptionsTab and ProductExportWizardPage.

Also simplify the ternary expressions:

// Before:
selected == null ? true : Boolean.TRUE.toString().equals(selected)
// After:
selected == null || Boolean.parseBoolean(selected)

This is consistent with adjacent ExportOptionsTab which already uses Boolean.parseBoolean() for the same purpose.

Replace the verbose Boolean.TRUE.toString().equals(selected) pattern with
the simpler Boolean.parseBoolean(selected) in FeatureOptionsTab and
ProductExportWizardPage. Also simplify the ternary expressions:
  selected == null ? true : Boolean.TRUE.toString().equals(selected)
becomes:
  selected == null || Boolean.parseBoolean(selected)

This is consistent with adjacent ExportOptionsTab which already uses
Boolean.parseBoolean() for the same purpose.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link

Test Results

  147 files  ±0    147 suites  ±0   35m 28s ⏱️ +4s
3 495 tests ±0  3 441 ✅ +9   54 💤 ±0  0 ❌  - 9 
9 306 runs  ±0  9 176 ✅ +9  130 💤 ±0  0 ❌  - 9 

Results for commit e217206. ± Comparison against base commit 0bfeb26.

@laeubi laeubi merged commit cb4a95a into eclipse-pde:master Mar 23, 2026
19 checks passed
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.

1 participant