Affects: \ Spring 5.x


In the org.springframework.orm.hibernate5.LocalSessionFactoryBean javadoc we can read:

/**
 * Specify an asynchronous executor for background bootstrapping,
 * ...
 *
 * @since 4.3
 * @see LocalSessionFactoryBuilder#buildSessionFactory(AsyncTaskExecutor)
 */
public void setBootstrapExecutor(AsyncTaskExecutor bootstrapExecutor) {
    this.bootstrapExecutor = bootstrapExecutor;
}

IMHO @since 4.3 is a copy-paste error. The source code of the Spring 4.3 reveals that the method setBootstrapExecutor is not present in the LocalSessionFactoryBean. I guss this javadoc was copied from the AbstractEntityManagerFactoryBean, where this method really has been introduced in the Spring 4.3.

Please correct the javadoc to point to version 5.0.

Comment From: jhoeller

Please note that Spring Framework 4.3 contains several variants of LocalSessionFactoryBean for distinct versions of Hibernate. While the variant for Hibernate 4.x (in the spring-orm-hibernate4 module that you refer to) does not declare that new method, the variant for Hibernate 5.x does have it - and that's what the @since tag refers to: https://github.com/spring-projects/spring-framework/blob/4.3.x/spring-orm-hibernate5/src/main/java/org/springframework/orm/hibernate5/LocalSessionFactoryBean.java