-
Couldn't load subscription status.
- Fork 38.8k
Closed
Closed
Copy link
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancementA general enhancement
Milestone
Description
Mark Paluch opened SPR-15841 and commented
BeanDefinitionBuilder declares setInitMethodName, setDestroyMethodName and setScope methods that do not accept @Nullable arguments.
Forwarding values from a given BeanDefinition requires warning suppression or additional code to satisfy null checks:
class CassandraCqlClusterParser extends AbstractBeanDefinitionParser {
@Override
protected AbstractBeanDefinition parseInternal(Element element, ParserContext parserContext) {
BeanDefinitionBuilder builder = …;
if (parserContext.isNested()) {
// warning is raised in the next line
builder.setScope(parserContext.getContainingBeanDefinition().getScope());
}
return …;
}
}Affects: 5.0 RC3
Issue Links:
- Introduce null-safety of Spring Framework API [SPR-15540] #20099 Introduce null-safety of Spring Framework API
- Make getters and setters null-safety consistent [SPR-15792] #20347 Make getters and setters null-safety consistent
Referenced from: commits 09f5c71
Metadata
Metadata
Assignees
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancementA general enhancement