[Bug] ConfigurationDataUtils does not throw exception on unknown properties anymore
- Dominant language
- Java
- Stars
- 15.3k
- Forks
- 3.8k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 160
Description
### Search before asking
- [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 don't get bug fixes. I will attempt to reproduce the issue on a supported version of Pulsar client and Pulsar broker.
### Version
Affected LTS versions are:
pulsar-client-all:3.0.7
pulsar-client-all:4.0.1
### Minimal reproduce step
GitHub repository for reproducing the issue:
https://github.com/alpreu/pulsar-issue-23792 (Using Pulsar 3.0.7, no exception thrown)
https://github.com/alpreu/pulsar-issue-23792/tree/pulsar-3.0.6 (Using Pulsar 3.0.6, exception thrown as expected)
or alternatively,
Create a configuration `HashMap` containing unknown key-value pairs, then try to load it like this:
```
ClientConfigurationData conf = ConfigurationDataUtils.loadData(
configuration, new ClientConfigurationData(), ClientConfigurationData.class);
```
### What did you expect to see?
RuntimeException with "Failed to load config into existing configuration data" to be thrown
### What did you see instead?
No exception is thrown, the `ClientConfigurationData` object is instantiated
### Anything else?
_No response_
### Are you willing to submit a PR?
- [ ] I'm willing to submit a PR!
Contributor guide
Research direction
Start with ConfigurationDataUtils.loadData and ClientConfigurationData, then run the linked reproducer against Pulsar 3.0.7 and 3.0.6 to confirm the behavior difference. Done means loading a configuration with unknown properties throws a RuntimeException containing "Failed to load config into existing configuration data".
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100