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 #5246 - Adding DeflaterPool to GzipHandler.dump #5294

Merged
merged 1 commit into from
Sep 22, 2020

Conversation

joakime
Copy link
Contributor

@joakime joakime commented Sep 17, 2020

Output looks like ...

GzipHandler@2f4205be{STARTED,min=2048,inflate=-1} - STARTED
...(snip)...
+= DeflaterPool@417ad4f3{STARTED,size=0,capacity=UNLIMITED} - STARTED

Signed-off-by: Joakim Erdfelt joakim.erdfelt@gmail.com

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Copy link
Contributor

@lachlan-roberts lachlan-roberts left a comment

Choose a reason for hiding this comment

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

LGTM

I think its neater to use String.format

return String.format("%s@%x{%s,size=%d,capacity=%s}",
    getClass().getSimpleName(),
    hashCode(),
    getState(),
    (_pool == null) ? -1 : _pool.size(),
    (_capacity <= 0) ? "UNLIMITED" : _capacity);

this would make it more consistent with the changes for 10, but this works as well.

It might be good to bring back some of the other changes of #5248. Like using the InflaterPool in the GzipHandler as well. But I can do this in a separate PR.

@gregw
Copy link
Contributor

gregw commented Sep 22, 2020

@joakime can this be merged before it goes stale?

@joakime joakime merged commit 74e9371 into jetty-9.4.x Sep 22, 2020
@joakime joakime deleted the jetty-9.4.x-5246-gziphandler-deflaterpool-dump branch September 22, 2020 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GzipHandler's DeflaterPool should be dumpable
3 participants