Skip to content

[Refactor] Useful helper method getOrDefault & cleaner abstraction (#16927) - #16944

Merged
normanmaurer merged 1 commit into
5.0from
set5
Jun 12, 2026
Merged

normanmaurer merged 1 commit into
5.0from
set5

Conversation

@normanmaurer

Copy link
Copy Markdown
Member

Motivation

While working on the WebTransport implementation, I found it useful to
have a helper method for retrieving HTTP/3 settings with a fallback
value when a setting identifier is not present.

Modification

  • Added a getOrDefault(...) method to Http3Settings.
  • The method returns the configured value for a setting identifier or
    the provided default value if the identifier is not present.
  • Refactoring some deprecated methods

Result

  • Simplifies retrieval of optional HTTP/3 settings from a cleaner
    abstraction.
  • Returns a default value when the requested setting identifier is
    absent.

Testing

  • Added unit tests covering both existing and missing setting
    identifiers.

…16927)

**Motivation**

While working on the WebTransport implementation, I found it useful to
have a helper method for retrieving HTTP/3 settings with a fallback
value when a setting identifier is not present.

**Modification**

* Added a `getOrDefault(...)` method to `Http3Settings`.
* The method returns the configured value for a setting identifier or
the provided default value if the identifier is not present.
* Refactoring some deprecated methods

**Result**

* Simplifies retrieval of optional HTTP/3 settings from a cleaner
abstraction.
* Returns a default value when the requested setting identifier is
absent.

**Testing**

* Added unit tests covering both existing and missing setting
identifiers.
@normanmaurer normanmaurer added this to the 5.0.0.Final milestone Jun 12, 2026
@normanmaurer
normanmaurer merged commit 3e83495 into 5.0 Jun 12, 2026
13 checks passed
@normanmaurer
normanmaurer deleted the set5 branch June 12, 2026 13:28
@normanmaurer normanmaurer mentioned this pull request Sep 22, 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