Skip to content

Align bean class resolution with ResolvableType API#144

Merged
mercyblitz merged 4 commits into
microsphere-projects:release-1.xfrom
mercyblitz:dev-1.x
Jul 1, 2026
Merged

Align bean class resolution with ResolvableType API#144
mercyblitz merged 4 commits into
microsphere-projects:release-1.xfrom
mercyblitz:dev-1.x

Conversation

@mercyblitz

Copy link
Copy Markdown
Contributor

This pull request makes a minor update to the way the bean class is resolved in the ConfigurationPropertiesBeanContext class. The change replaces the use of getRawClass() with resolve() when obtaining the underlying class from a ResolvableType, which can improve type resolution in certain scenarios.

  • Use of ResolvableType.resolve() instead of getRawClass() to obtain the bean class in both the getBeanClass() method and the initBeanProperties() method in ConfigurationPropertiesBeanContext. [1] [2]

github-actions Bot and others added 2 commits June 30, 2026 11:28
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

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ Complexity Δ
...rties/bind/ConfigurationPropertiesBeanContext.java 85.65% <100.00%> (+0.37%) 82.00 <12.00> (+2.00)
...gurationPropertiesBeanPropertyChangedListener.java 92.00% <100.00%> (ø) 22.00 <1.00> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.
@sonarqubecloud

sonarqubecloud Bot commented Jul 1, 2026

Copy link
Copy Markdown

@mercyblitz mercyblitz merged commit 1fc4b0e into microsphere-projects:release-1.x Jul 1, 2026
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant