diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate5/support/OpenSessionInViewInterceptor.java b/spring-orm/src/main/java/org/springframework/orm/hibernate5/support/OpenSessionInViewInterceptor.java index 1bece003c2..dade7e24c8 100644 --- a/spring-orm/src/main/java/org/springframework/orm/hibernate5/support/OpenSessionInViewInterceptor.java +++ b/spring-orm/src/main/java/org/springframework/orm/hibernate5/support/OpenSessionInViewInterceptor.java @@ -142,7 +142,7 @@ public class OpenSessionInViewInterceptor implements AsyncWebRequestInterceptor } /** - * Unbind the Hibernate {@code Session} from the thread and close it). + * Unbind the Hibernate {@code Session} from the thread and close it. * @see TransactionSynchronizationManager */ @Override diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/AbstractEntityManagerFactoryBean.java b/spring-orm/src/main/java/org/springframework/orm/jpa/AbstractEntityManagerFactoryBean.java index 4a78786628..4793ba1c0a 100644 --- a/spring-orm/src/main/java/org/springframework/orm/jpa/AbstractEntityManagerFactoryBean.java +++ b/spring-orm/src/main/java/org/springframework/orm/jpa/AbstractEntityManagerFactoryBean.java @@ -218,10 +218,10 @@ public abstract class AbstractEntityManagerFactoryBean implements } /** - * Allow Map access to the JPA properties to be passed to the persistence + * Allow {@code Map} access to the JPA properties to be passed to the persistence * provider, with the option to add or override specific entries. *

Useful for specifying entries directly, for example via - * "jpaPropertyMap[myKey]". + * {@code jpaPropertyMap[myKey]}. */ public Map getJpaPropertyMap() { return this.jpaPropertyMap; diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/EntityManagerFactoryAccessor.java b/spring-orm/src/main/java/org/springframework/orm/jpa/EntityManagerFactoryAccessor.java index b7ca9b83cd..279084fd04 100644 --- a/spring-orm/src/main/java/org/springframework/orm/jpa/EntityManagerFactoryAccessor.java +++ b/spring-orm/src/main/java/org/springframework/orm/jpa/EntityManagerFactoryAccessor.java @@ -131,9 +131,9 @@ public abstract class EntityManagerFactoryAccessor implements BeanFactoryAware { } /** - * Allow Map access to the JPA properties to be passed to the persistence + * Allow {@code Map} access to the JPA properties to be passed to the persistence * provider, with the option to add or override specific entries. - *

Useful for specifying entries directly, for example via "jpaPropertyMap[myKey]". + *

Useful for specifying entries directly, for example via {@code jpaPropertyMap[myKey]}. */ public Map getJpaPropertyMap() { return this.jpaPropertyMap; diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/EntityManagerProxy.java b/spring-orm/src/main/java/org/springframework/orm/jpa/EntityManagerProxy.java index 84e574d538..9a0ab5f7a4 100644 --- a/spring-orm/src/main/java/org/springframework/orm/jpa/EntityManagerProxy.java +++ b/spring-orm/src/main/java/org/springframework/orm/jpa/EntityManagerProxy.java @@ -37,7 +37,7 @@ public interface EntityManagerProxy extends EntityManager { * raw EntityManager. *

In case of a shared ("transactional") EntityManager, this will be * the raw EntityManager that is currently associated with the transaction. - * Outside of a transaction, an IllegalStateException will be thrown. + * Outside a transaction, an IllegalStateException will be thrown. * @return the underlying raw EntityManager (never {@code null}) * @throws IllegalStateException if no underlying EntityManager is available */ diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/ExtendedEntityManagerCreator.java b/spring-orm/src/main/java/org/springframework/orm/jpa/ExtendedEntityManagerCreator.java index 55431d805f..693829078d 100644 --- a/spring-orm/src/main/java/org/springframework/orm/jpa/ExtendedEntityManagerCreator.java +++ b/spring-orm/src/main/java/org/springframework/orm/jpa/ExtendedEntityManagerCreator.java @@ -50,7 +50,7 @@ import org.springframework.util.ConcurrentReferenceHashMap; * Delegate for creating a variety of {@link javax.persistence.EntityManager} * proxies that follow the JPA spec's semantics for "extended" EntityManagers. * - *

Supports several different variants of "extended" EntityManagers: + *

Supports several variants of "extended" EntityManagers: * in particular, an "application-managed extended EntityManager", as defined * by {@link javax.persistence.EntityManagerFactory#createEntityManager()}, * as well as a "container-managed extended EntityManager", as defined by diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/JpaTransactionManager.java b/spring-orm/src/main/java/org/springframework/orm/jpa/JpaTransactionManager.java index 2746339bc6..118048d83d 100644 --- a/spring-orm/src/main/java/org/springframework/orm/jpa/JpaTransactionManager.java +++ b/spring-orm/src/main/java/org/springframework/orm/jpa/JpaTransactionManager.java @@ -228,9 +228,9 @@ public class JpaTransactionManager extends AbstractPlatformTransactionManager } /** - * Allow Map access to the JPA properties to be passed to the persistence + * Allow {@code Map} access to the JPA properties to be passed to the persistence * provider, with the option to add or override specific entries. - *

Useful for specifying entries directly, for example via "jpaPropertyMap[myKey]". + *

Useful for specifying entries directly, for example via {@code jpaPropertyMap[myKey]}. */ public Map getJpaPropertyMap() { return this.jpaPropertyMap; diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/JpaVendorAdapter.java b/spring-orm/src/main/java/org/springframework/orm/jpa/JpaVendorAdapter.java index 4d283283a3..cc046c4baf 100644 --- a/spring-orm/src/main/java/org/springframework/orm/jpa/JpaVendorAdapter.java +++ b/spring-orm/src/main/java/org/springframework/orm/jpa/JpaVendorAdapter.java @@ -66,7 +66,7 @@ public interface JpaVendorAdapter { * to unit-specific characteristics such as the transaction type. *

NOTE: This variant will only be invoked in case of Java EE style * container bootstrapping where a {@link PersistenceUnitInfo} is present - * (i.e. {@link LocalContainerEntityManagerFactoryBean}. In case of simple + * (i.e. {@link LocalContainerEntityManagerFactoryBean}). In case of simple * Java SE style bootstrapping via {@link javax.persistence.Persistence} * (i.e. {@link LocalEntityManagerFactoryBean}), the parameter-less * {@link #getJpaPropertyMap()} variant will be called directly. diff --git a/spring-orm/src/test/java/org/springframework/orm/jpa/ApplicationManagedEntityManagerIntegrationTests.java b/spring-orm/src/test/java/org/springframework/orm/jpa/ApplicationManagedEntityManagerIntegrationTests.java index 69986ebf53..6beee99e6f 100644 --- a/spring-orm/src/test/java/org/springframework/orm/jpa/ApplicationManagedEntityManagerIntegrationTests.java +++ b/spring-orm/src/test/java/org/springframework/orm/jpa/ApplicationManagedEntityManagerIntegrationTests.java @@ -119,7 +119,7 @@ public class ApplicationManagedEntityManagerIntegrationTests extends AbstractEnt doInstantiateAndSave(em); setComplete(); - endTransaction(); // Should rollback + endTransaction(); // Should roll back assertThat(countRowsInTable(em, "person")).as("Tx must have committed back").isEqualTo(1); // Now clean up the database @@ -139,7 +139,7 @@ public class ApplicationManagedEntityManagerIntegrationTests extends AbstractEnt EntityManager em = entityManagerFactory.createEntityManager(); em.joinTransaction(); doInstantiateAndSave(em); - endTransaction(); // Should rollback + endTransaction(); // Should roll back assertThat(countRowsInTable(em, "person")).as("Tx must have been rolled back").isEqualTo(0); } @@ -150,7 +150,7 @@ public class ApplicationManagedEntityManagerIntegrationTests extends AbstractEnt doInstantiateAndSave(em); setComplete(); - endTransaction(); // Should rollback + endTransaction(); // Should roll back assertThat(countRowsInTable(em, "person")).as("Tx must have committed back").isEqualTo(1); // Now clean up the database diff --git a/spring-orm/src/test/java/org/springframework/orm/jpa/ContainerManagedEntityManagerIntegrationTests.java b/spring-orm/src/test/java/org/springframework/orm/jpa/ContainerManagedEntityManagerIntegrationTests.java index f87101156d..a252b03499 100644 --- a/spring-orm/src/test/java/org/springframework/orm/jpa/ContainerManagedEntityManagerIntegrationTests.java +++ b/spring-orm/src/test/java/org/springframework/orm/jpa/ContainerManagedEntityManagerIntegrationTests.java @@ -139,7 +139,7 @@ public class ContainerManagedEntityManagerIntegrationTests extends AbstractEntit doInstantiateAndSave(em); setComplete(); - endTransaction(); // Should rollback + endTransaction(); // Should roll back assertThat(countRowsInTable(em, "person")).as("Tx must have committed back").isEqualTo(1); // Now clean up the database @@ -150,7 +150,7 @@ public class ContainerManagedEntityManagerIntegrationTests extends AbstractEntit public void testRollbackOccurs() { EntityManager em = createContainerManagedEntityManager(); doInstantiateAndSave(em); - endTransaction(); // Should rollback + endTransaction(); // Should roll back assertThat(countRowsInTable(em, "person")).as("Tx must have been rolled back").isEqualTo(0); } @@ -159,7 +159,7 @@ public class ContainerManagedEntityManagerIntegrationTests extends AbstractEntit EntityManager em = createContainerManagedEntityManager(); doInstantiateAndSave(em); setComplete(); - endTransaction(); // Should rollback + endTransaction(); // Should roll back assertThat(countRowsInTable(em, "person")).as("Tx must have committed back").isEqualTo(1); // Now clean up the database diff --git a/spring-orm/src/test/java/org/springframework/orm/jpa/domain/Person.java b/spring-orm/src/test/java/org/springframework/orm/jpa/domain/Person.java index 1586a2c250..fb7e294723 100644 --- a/spring-orm/src/test/java/org/springframework/orm/jpa/domain/Person.java +++ b/spring-orm/src/test/java/org/springframework/orm/jpa/domain/Person.java @@ -31,7 +31,7 @@ import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.context.ApplicationContext; /** - * Simple JavaBean domain object representing an person. + * Simple JavaBean domain object representing a person. * * @author Rod Johnson */