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

More readable code, less arguments #4848

Closed
magicprinc opened this issue Sep 9, 2023 · 1 comment
Closed

More readable code, less arguments #4848

magicprinc opened this issue Sep 9, 2023 · 1 comment

Comments

@magicprinc
Copy link
Contributor

magicprinc commented Sep 9, 2023

  • HandlerRegistration has two very similar dispatch methods: very confusing.
  • param handler is used only in 50% cases (MessageConsumerImpl, but not ReplyHandler)
  • In case of MessageConsumerImpl param handler is the same as MessageConsumerImpl.handler and is only used to protected it from consumer.unregister() during dispatch.
  • handlerMap.compute can be used instead of merge producing more compact code and without unnecessary (looser) object creation
  • more comments, better field/variable names, better exception messages

I have made several changes to make the code more compact, readable and understandable.
Heavily tested!

PR:
#4850

(from https://github.com/magicprinc/vert.x/commits/bugfix/compact_args)

Includes Issue #4836 with PR #4847

@magicprinc
Copy link
Contributor Author

Updated version as PR: #4957

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant