Skip to content

Refactor STUN code for clarity and consistency (#1653)#1656

Merged
sipsorcery merged 1 commit into
sipsorcery-org:masterfrom
paulomorgado:strings-7
Jun 1, 2026
Merged

Refactor STUN code for clarity and consistency (#1653)#1656
sipsorcery merged 1 commit into
sipsorcery-org:masterfrom
paulomorgado:strings-7

Conversation

@paulomorgado
Copy link
Copy Markdown
Contributor

Replaced manual string comparisons with StringComparison.OrdinalIgnoreCase and placed constants first in comparisons. Refactored switch statements to use switch expressions with spans. Updated header concatenation to use string interpolation. Used string.IsNullOrWhiteSpace for null/whitespace checks. Changed method overrides to use override instead of new where appropriate.

Split of #1639

@sipsorcery
Copy link
Copy Markdown
Member

The PR descriptions states "SIP" but the files changes are all "STUN". I'm guessing the PR description is now outdated?

Replaced manual string comparisons with StringComparison.OrdinalIgnoreCase and placed constants first in comparisons. Refactored switch statements to use switch expressions with spans. Updated header concatenation to use string interpolation. Used string.IsNullOrWhiteSpace for null/whitespace checks. Changed method overrides to use override instead of new where appropriate.
@paulomorgado paulomorgado changed the title Refactor SIP code for clarity and consistency (#1653) Refactor STUN code for clarity and consistency (#1653) Jun 1, 2026
@paulomorgado
Copy link
Copy Markdown
Contributor Author

The PR descriptions states "SIP" but the files changes are all "STUN". I'm guessing the PR description is now outdated?

Sorry. It was a typo in the commit. Fixed!

@sipsorcery sipsorcery merged commit 32e8c69 into sipsorcery-org:master Jun 1, 2026
6 checks passed
@paulomorgado paulomorgado deleted the strings-7 branch June 1, 2026 15:19
@paulomorgado paulomorgado mentioned this pull request Jun 5, 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.

2 participants