Skip to content

AbstractBeanDefinition.getBeanClass() javadoc misleads about returning null #22960

@olegz

Description

@olegz

Current javadoc says:

/**
     * Return the class of the wrapped bean, if already resolved.
     * @return the bean class, or {@code null} if none defined
     * @throws IllegalStateException if the bean definition does not define a bean class,
     * or a specified bean class name has not been resolved into an actual Class
     */

The @return and @throws are contradictory as this method can not return null due to

if (beanClassObject == null) {
			throw new IllegalStateException("No bean class specified on bean definition");
}

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)status: backportedAn issue that has been backported to maintenance branchestype: documentationA documentation task

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions