Skip to content

[Win32] Fix swapped arguments in readRegistryDwords null checks#3348

Open
HeikoKlare wants to merge 1 commit into
eclipse-platform:masterfrom
HeikoKlare:fix/win32-readRegistryDwords-requireNonNull-args
Open

[Win32] Fix swapped arguments in readRegistryDwords null checks#3348
HeikoKlare wants to merge 1 commit into
eclipse-platform:masterfrom
HeikoKlare:fix/win32-readRegistryDwords-requireNonNull-args

Conversation

@HeikoKlare
Copy link
Copy Markdown
Contributor

Summary

  • Objects.requireNonNull(T obj, String message) takes the object to check as the first argument and the error message as the second.
  • In OS.readRegistryDwords, both calls had the arguments reversed: the non-null string literals "key" and "valueName" were being checked instead of the actual key and valueName variables.
  • As a result, both null guards were complete no-ops — a null key or valueName would pass through silently and cause a NullPointerException or unexpected behaviour later.

🤖 Generated with Claude Code

Objects.requireNonNull(T obj, String message) takes the object to check
as the first argument. The two calls in readRegistryDwords had the
arguments reversed, causing the non-null string literals "key" and
"valueName" to be checked instead of the actual key and valueName
variables, making both null guards complete no-ops.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

Test Results (win32)

   30 files  ±0     30 suites  ±0   5m 2s ⏱️ +31s
4 698 tests ±0  4 623 ✅ ±0  75 💤 ±0  0 ❌ ±0 
1 228 runs  ±0  1 204 ✅ ±0  24 💤 ±0  0 ❌ ±0 

Results for commit 81d6490. ± Comparison against base commit 81da08f.

@HeikoKlare HeikoKlare marked this pull request as ready for review May 31, 2026 13:57
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