Skip to content

Fix code review issues: unsafe casts, NPE risks, magic numbers, and typos#117

Open
Copilot wants to merge 1 commit into
mainfrom
copilot/review-code-issue-fix
Open

Fix code review issues: unsafe casts, NPE risks, magic numbers, and typos#117
Copilot wants to merge 1 commit into
mainfrom
copilot/review-code-issue-fix

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 26, 2026

  • Fix unsafe cast in ConfigurableAutoConfigurationImportFilter.ExcludedAutoConfigurationClassPropertySource.get() — add instanceof check before cast to prevent ClassCastException
  • Fix potential NPE in EventPublishingConfigurationPropertiesBeanPropertyChangedListener.initConfigurationPropertiesBeanContext() — add null check for target.getValue()
  • Fix potential NPE in ConfigurationPropertiesBeanContext.convertForProperty() — add null checks for value and conversionService
  • Fix unsafe (int) cast in MultipartConfigFactory.createMultipartConfig() — use Math.toIntExact() for safe conversion
  • Fix magic number 2147483647 in ServerProperties — replace with Integer.MAX_VALUE
  • Fix typo "Disalbed" → "Disabled" in test @DisplayName annotations

@sonarqubecloud
Copy link
Copy Markdown

@codecov
Copy link
Copy Markdown

codecov Bot commented May 26, 2026

Codecov Report

❌ Patch coverage is 42.85714% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...rties/bind/ConfigurationPropertiesBeanContext.java 0.00% 1 Missing and 2 partials ⚠️
...gurationPropertiesBeanPropertyChangedListener.java 0.00% 0 Missing and 1 partial ⚠️
Files with missing lines Coverage Δ Complexity Δ
...ure/ConfigurableAutoConfigurationImportFilter.java 100.00% <100.00%> (ø) 23.00 <0.00> (ø)
...gurationPropertiesBeanPropertyChangedListener.java 95.55% <0.00%> (-2.23%) 20.00 <0.00> (ø)
...rties/bind/ConfigurationPropertiesBeanContext.java 95.77% <0.00%> (-4.23%) 27.00 <2.00> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

2 participants