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

Issue #7414 Deprecate QoSFilter setters #7506

Merged
merged 2 commits into from
Feb 8, 2022

Conversation

janbartel
Copy link
Contributor

Closes #7414

The OP reported that calling QoSFilter.setMaxRequests(int) throws NPE. This is because it uses a field that is only initialized after init() is called. The filter seems to expect that values are set via init-params, not via setters. Certainly there is no code that would handle one of the setters being called whilst the filter is in service. The best way forward seems to be to eventually remove those setters, after being deprecated.

@janbartel janbartel self-assigned this Feb 1, 2022
@janbartel janbartel requested a review from gregw February 3, 2022 23:49
@janbartel janbartel marked this pull request as ready for review February 3, 2022 23:49
Copy link
Contributor

@gregw gregw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we make the bodies of these methods noops to avoid the NPEs etc.?

@@ -293,7 +293,9 @@ public long getWaitMs()
* for the semaphore to become available before suspending a request.
*
* @param value wait time (in milliseconds)
* @deprecated do not use
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we say use init parameters instead?

@janbartel janbartel requested a review from gregw February 7, 2022 06:43
Copy link
Contributor

@joakime joakime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@janbartel janbartel merged commit c742c2e into jetty-10.0.x Feb 8, 2022
@janbartel janbartel deleted the jetty-10.0.x-7414-QoSFilter-setters-NPE branch February 8, 2022 03:27
joakime pushed a commit that referenced this pull request Feb 25, 2022
* Issue #7414 Deprecate QoSFilter setters

Signed-off-by: Jan Bartel <[email protected]>
(cherry picked from commit c742c2e)
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.

QoSFilter.setMaxRequests throws NullPointerException
3 participants