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

Extend from AbstractHandlerContainer instead of AbstractHandler #2460

Merged
merged 2 commits into from Aug 23, 2018
Merged

Extend from AbstractHandlerContainer instead of AbstractHandler #2460

merged 2 commits into from Aug 23, 2018

Conversation

jplock
Copy link
Member

@jplock jplock commented Aug 18, 2018

Fixes #2455

@jplock jplock added the bug label Aug 18, 2018
@jplock jplock added this to the 2.0.0 milestone Aug 18, 2018
@jplock jplock requested a review from joschi August 18, 2018 12:31

@Override
public Handler[] getHandlers() {
return handlers.keySet().stream().map(key -> handlers.get(key)).toArray(Handler[]::new);
Copy link
Contributor

Choose a reason for hiding this comment

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

Changing Trie to ArrayTernaryTrie introduces entrySet which will eliminate the lookup in a loop.

private final ArrayTernaryTrie<Handler> handlers;
handlers.entrySet().stream().map(Map.Entry::getValue).toArray(Handler[]::new);

https://www.eclipse.org/jetty/javadoc/9.4.11.v20180605/org/eclipse/jetty/util/ArrayTernaryTrie.html#entrySet--

@jplock
Copy link
Member Author

jplock commented Aug 22, 2018

Thanks @mattnelson, fixed!

@jplock
Copy link
Member Author

jplock commented Aug 22, 2018

AppVeyor failed with:

[ERROR] Errors: 
5910[ERROR]   JerseyClientIntegrationTest.testBufferedGzipPost:111->postRequest:209 � Processing

@jplock jplock merged commit 5a78323 into dropwizard:master Aug 23, 2018
@jplock jplock deleted the jp-gh2455 branch August 23, 2018 00:12
@jraylee
Copy link

jraylee commented Aug 28, 2018

Would it be possible to have this included in the 1.3.6 release?

joschi pushed a commit to joschi/dropwizard-1.3 that referenced this pull request Aug 16, 2020
joschi pushed a commit to joschi/dropwizard-1.3 that referenced this pull request Aug 16, 2020
joschi pushed a commit to joschi/dropwizard-1.3 that referenced this pull request Aug 16, 2020
joschi pushed a commit that referenced this pull request Aug 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants