Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document all HttpFields methods #10284

Closed
cowwoc opened this issue Aug 9, 2023 · 3 comments · Fixed by #10308
Closed

Document all HttpFields methods #10284

cowwoc opened this issue Aug 9, 2023 · 3 comments · Fixed by #10308

Comments

@cowwoc
Copy link
Contributor

cowwoc commented Aug 9, 2023

Jetty version(s)
12.0.0

Enhancement Description
Some HttpFields methods, such as get(HttpHeader) need some clarification. For example, is this method returning all the values of a header? Is it returning only the first value? Some methods return List or an array. Do these methods ever return null? If so, when?

In general I would advocate documenting all the methods since they are a public part of the API.

@sbordet sbordet self-assigned this Aug 12, 2023
sbordet added a commit that referenced this issue Aug 14, 2023
* Added javadocs where missing and updated existing in both HttpFields and HttpField.
* Removed HttpFields.takeAsImmutable() because it had a confusing semantic.
* Deprecated HttpFields.[Mutable|Immutable]HttpFields and moved their implementation to top level package private classes.
* Deprecated HttpField.valueParameters(), as there is an identical getValueParameters()
* Fixed inconsistencies of HttpField.value, where in most cases could not be null, but in one case was allowed; now it can never be null.

Signed-off-by: Simone Bordet <[email protected]>
@sbordet sbordet linked a pull request Aug 14, 2023 that will close this issue
@sbordet
Copy link
Contributor

sbordet commented Aug 14, 2023

@cowwoc see #10308.

sbordet added a commit that referenced this issue Aug 18, 2023
* Added javadocs where missing and updated existing in both HttpFields and HttpField.
* Removed HttpFields.takeAsImmutable() because it had a confusing semantic.
* Deprecated HttpFields.[Mutable|Immutable]HttpFields and moved their implementation to top level package private classes.
* Deprecated HttpField.valueParameters(), as there is an identical getValueParameters()
* Fixed inconsistencies of HttpField.value, where in most cases could not be null, but in one case was allowed; now it can never be null.

Signed-off-by: Simone Bordet <[email protected]>
@cowwoc
Copy link
Contributor Author

cowwoc commented Aug 20, 2023

@sbordet I left some comments on the PR

@joakime joakime moved this to 🏗 In progress in Jetty 12.0.1 - FROZEN Aug 23, 2023
@sbordet
Copy link
Contributor

sbordet commented Aug 24, 2023

Fixed by #10308.

@sbordet sbordet closed this as completed Aug 24, 2023
@sbordet sbordet moved this from 🏗 In progress to ✅ Done in Jetty 12.0.1 - FROZEN Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants