Align bean class resolution with ResolvableType API#144
Merged
Conversation
Replace `getRawClass()` with `resolve()` when deriving configuration properties bean classes. This aligns class resolution with Spring's `ResolvableType` API and avoids relying on raw-type access during bean initialization and nested property binding.
Codecov Report✅ All modified and coverable lines are covered by tests.
🚀 New features to boost your workflow:
|
Refresh the branch compatibility table in README.md to show the newest module versions: `main` from `0.2.27` to `0.2.28` and `1.x` from `0.1.27` to `0.1.28`.
Add defensive null handling and stricter filtering in `ConfigurationPropertiesBeanContext`: `isCandidateProperty` now rejects null descriptors and properties without a read method, and `isCandidateClass` now rejects null classes. Tests were updated to cover these edge cases and verify expected behavior for primitives, wrappers, enums, JDK types, and valid configuration properties.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



This pull request makes a minor update to the way the bean class is resolved in the
ConfigurationPropertiesBeanContextclass. The change replaces the use ofgetRawClass()withresolve()when obtaining the underlying class from aResolvableType, which can improve type resolution in certain scenarios.ResolvableType.resolve()instead ofgetRawClass()to obtain the bean class in both thegetBeanClass()method and theinitBeanProperties()method inConfigurationPropertiesBeanContext. [1] [2]