michaeljmarshall opened a new pull request #10683:
URL: https://github.com/apache/pulsar/pull/10683
### Motivation
It is better to return null than to create an exception, catch it, then
return null. The modified code will no longer throw an unnecessary exception.
### Modifications
This PR updates the `getTopicPolicies` to check a config to return null
instead of throwing an exception. Additionally, this PR reduces some code
duplication by simplifying the two `getTopicPolicies` methods and removing an
unnecessary parameter.
### Verifying this change
This change is a trivial rework of the `getTopicPolicies` methods. Passing
tests should be sufficient verification.
### Does this pull request potentially affect one of the following parts:
*If `yes` was chosen, please highlight the changes*
- Dependencies (does it add or upgrade a dependency): no
- The public API: no
- The schema: no
- The default values of configurations: no
- The wire protocol: no
- The rest endpoints: no
- The admin cli options: no
- Anything that affects deployment: no
### Documentation
- Does this pull request introduce a new feature? no
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]