The MethodInvocationAuthorizer should be unique per query and should not be changed for a particular query while it's being executed so, starting with this commit, it is directly stored as part of the ExecutionContext. This also prevents the creation of multiple instances of the DefaultQueryService and the configured authorizer itself while the intermediate result objects are being traversed during the query evaluation.
- Added tests. - The AttributeDescriptor and MethodDispatch classes do not require MethodInvocationAuthorizer as a constructor parameter anymore, the authorizer is obtained from the context, and **only** when needed. - The MethodDispatch class does not internally store and cache the MethodInvocationAuthorizer instance anymore, thus allowing Geode to change the authorizer in runtime without needing to re-load every already known method (expensive due to reflection). Thank you for submitting a contribution to Apache Geode. In order to streamline the review of the contribution we ask you to ensure the following steps have been taken: ### For all changes: - [X] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message? - [X] Has your PR been rebased against the latest commit within the target branch (typically `develop`)? - [X] Is your initial contribution a single, squashed commit? - [X] Does `gradlew build` run cleanly? - [X] Have you written or updated unit tests to verify your changes? - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? ### Note: Please ensure that once the PR is submitted, check Concourse for build issues and submit an update to your PR as soon as possible. If you need help, please send an email to [email protected]. [ Full content available at: https://github.com/apache/geode/pull/4169 ] This message was relayed via gitbox.apache.org for [email protected]
