Skip to content

fix: remove redundant null check in auth message handling#70

Merged
chrisuthe merged 1 commit intomainfrom
fix/redundant-null-check
Mar 8, 2026
Merged

fix: remove redundant null check in auth message handling#70
chrisuthe merged 1 commit intomainfrom
fix/redundant-null-check

Conversation

@chrisuthe
Copy link
Copy Markdown
Owner

Summary

  • Remove redundant && authMessageId != null condition in MaWebSocketTransport.kt line 379
  • msgId is always a non-null String (from optString), so the equality check msgId == authMessageId already implies authMessageId is non-null when true
  • Eliminates the "Condition is always true" compiler warning

Test plan

  • Verify the project compiles without the warning at MaWebSocketTransport.kt:379
  • Confirm authentication flow still works correctly (auth message ID matching is unchanged)

The condition `msgId == authMessageId && authMessageId != null` has a
redundant null check. Since msgId is a non-null String (from optString),
the equality check already implies authMessageId is non-null when true.
@chrisuthe chrisuthe merged commit 71d8e7d into main Mar 8, 2026
@chrisuthe chrisuthe deleted the fix/redundant-null-check branch March 8, 2026 02:49
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