[Bug] Logic for setting policies.bundle is different in AdminResource#getNamespacePolicies compared to AdminResource#getNamespacePoliciesAsync
- Dominant language
- Java
- Stars
- 15.3k
- Forks
- 3.8k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 160
Description
### Search before reporting
- [x] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar.
### Read release policy
- [x] I understand that [unsupported versions](https://pulsar.apache.org/contribute/release-policy/#supported-versions) don't get bug fixes. I will attempt to reproduce the issue on a supported version of Pulsar client and Pulsar broker.
### User environment
Pulsar master branch, reading the code
### Issue Description
The logic for setting `policies.bundles` is slightly different in `org.apache.pulsar.broker.admin.AdminResource#getNamespacePolicies` compared to the logic in the asynchronous method `org.apache.pulsar.broker.admin.AdminResource#getNamespacePoliciesAsync`.
https://github.com/apache/pulsar/blob/e041fab73c1b9a6bb93457d186fc0a937beafd53/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/AdminResource.java#L318-L369
### Error messages
```text
No errors
```
### Reproducing the issue
n/a
### Additional information
_No response_
### Are you willing to submit a PR?
- [ ] I'm willing to submit a PR!
Contributor guide
Research direction
Start in pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/AdminResource.java at getNamespacePolicies and getNamespacePoliciesAsync, and compare how each sets policies.bundle. Trace the surrounding namespace-policy retrieval flow to determine the intended parity; the issue is done when both methods apply the same logic.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100