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

Review UrlEncoded locking #5093

Closed
sbordet opened this issue Jul 29, 2020 · 1 comment · Fixed by #5098
Closed

Review UrlEncoded locking #5093

sbordet opened this issue Jul 29, 2020 · 1 comment · Fixed by #5098
Assignees

Comments

@sbordet
Copy link
Contributor

sbordet commented Jul 29, 2020

Spawned by #5083.

Jetty version
9.4.x

Description
UrlEncoded needs a serious review.

It is used almost only for its static methods, however is itself a MultiMap and can decode a query string into itself, which is only used in tests.

The static methods return void but require a MultiMap parameter that is always created anew, but it is used as a lock inside the UrlEncoded methods, which is completely unnecessary.

The whole locking of this class should be removed, and the static methods of this class should return a MultiMap or a Map.

Also, it should just be a static utility class, rather than inheriting from MultiMap.

@gregw gregw self-assigned this Jul 29, 2020
@gregw
Copy link
Contributor

gregw commented Jul 29, 2020

I'll target this for 10 as it may be significant

gregw added a commit that referenced this issue Jul 29, 2020
Updated UrlEncoded to static only class with no synchronization
@gregw gregw linked a pull request Jul 29, 2020 that will close this issue
gregw added a commit that referenced this issue Jul 30, 2020
* Issue #5093 Static UrlEncoded

Updated UrlEncoded to static only class with no synchronization

* Fixed additional tests

* fixed formatting

Signed-off-by: gregw <[email protected]>
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 a pull request may close this issue.

2 participants