-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
GzipHandler: NPE in setDeflaterPoolCapacity and setInflaterPoolCapacity #6084
Comments
@mperktold would you like to submit a pull request? |
@sbordet I can do that. Would you prefer to introduce separate fields for the capacities, or to create the pools in the constructor? |
@mperktold to create the pools you need the |
Note we will be doing a 10.0.2 release soon, so if @mperktold can do a PR soon then great... if not @lachlan-roberts can you look at this before 10.0.2 |
I wanted to pass the new capacity fields to the corresponding setter of the pools after creating them in Should I pass the capacity as an additional parameter to Does it even make sense to specify a custom capacity? |
I think we should actually just deprecate both these methods. It doesn't seem much correct to have If you wish to use a pool with a custom capacity you should create the pool yourself and add it as a bean to the server. Then the call to ensure pool in the |
@lachlan-roberts That sounds reasonable to me. If we choose this path, the deprecated capacity setters wouldn't do anything apart from throwing if already started, right? |
I think the deprecated methods should log warnings if called, but otherwise be a noop, but ok to throw if started. |
Also planning to build releases in the next 24 to 48 hours |
…zipHandler. Signed-off-by: Lachlan Roberts <[email protected]>
…pressionPool capacity. Signed-off-by: Lachlan Roberts <[email protected]>
…Handler. Signed-off-by: Lachlan Roberts <[email protected]>
…mpressionPool Issue #6084 - CompressionPools should not be configured through the GzipHandler
@mperktold PR #6092 fixes this. It also adds |
Great! Yes, I saw you started working on it, thanks!👍 |
Jetty version
10.0.1
Description
There is a NPE when calling
GzipHandler.setDeflaterPoolCapacity
orGzipHandler.setInflaterPoolCapacity
. The given capacity is passed to the setter of the inflater/deflater pool, but the pool is null before the handler is started, and it is illegal to call the methods on a started handler.The bug was introduced as a combination of 3bdd82e and 0e3cfe8.
Another minor thing: The JavaDoc of
setInflaterPoolCapacity
mentions "DeflaterPool" instead of "InflaterPool".The text was updated successfully, but these errors were encountered: