Simplify null checks on Optional @ConfigurationProperties parameters

Proprietary

Spring Boot 4.1 changes constructor-bound @ConfigurationProperties so that Optional<T> parameters bind to Optional.empty() rather than null. This recipe replaces == null / != null checks against such parameters (or same-named fields in the binding constructor's class) with the constant they will always evaluate to, then runs SimplifyConstantIfBranchExecution to remove the dead branches.

io.moderne.java.spring.boot4.SimplifyOptionalConfigurationPropertiesNullChecks
mod run . --recipe=io.moderne.java.spring.boot4.SimplifyOptionalConfigurationPropertiesNullChecks

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.