Github user cshannon commented on the issue:
https://github.com/apache/activemq-artemis/pull/1242
Yeah I thought about that but wasn't sure how much of a difference it would
really make in terms of real performance and how the JVM will optimize. I was
trying to keep the code clean and not have to wrap every plugin call with an
if/else check.
What about if I did something like this...replace:
`callPlugins(plugin -> plugin.afterCreateSession(session));`
with
`callPlugins(getBrokerPlugins().size() > 0 ? plugin ->
plugin.afterCreateSession(session) : null);`
and then the callPlugins method could drop the redundant size check.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---