Skip to content

Commit ac06d1d

Browse files
marcwrobelsbrannen
authored andcommitted
Fix and improve Javadoc in spring-orm
See gh-28796
1 parent cfb39ac commit ac06d1d

10 files changed

+17
-17
lines changed

spring-orm/src/main/java/org/springframework/orm/hibernate5/support/OpenSessionInViewInterceptor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public void postHandle(WebRequest request, @Nullable ModelMap model) {
142142
}
143143

144144
/**
145-
* Unbind the Hibernate {@code Session} from the thread and close it).
145+
* Unbind the Hibernate {@code Session} from the thread and close it.
146146
* @see TransactionSynchronizationManager
147147
*/
148148
@Override

spring-orm/src/main/java/org/springframework/orm/jpa/AbstractEntityManagerFactoryBean.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,10 @@ public void setJpaPropertyMap(@Nullable Map<String, ?> jpaProperties) {
218218
}
219219

220220
/**
221-
* Allow Map access to the JPA properties to be passed to the persistence
221+
* Allow {@code Map} access to the JPA properties to be passed to the persistence
222222
* provider, with the option to add or override specific entries.
223223
* <p>Useful for specifying entries directly, for example via
224-
* "jpaPropertyMap[myKey]".
224+
* {@code jpaPropertyMap[myKey]}.
225225
*/
226226
public Map<String, Object> getJpaPropertyMap() {
227227
return this.jpaPropertyMap;

spring-orm/src/main/java/org/springframework/orm/jpa/EntityManagerFactoryAccessor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,9 @@ public void setJpaPropertyMap(@Nullable Map<String, Object> jpaProperties) {
131131
}
132132

133133
/**
134-
* Allow Map access to the JPA properties to be passed to the persistence
134+
* Allow {@code Map} access to the JPA properties to be passed to the persistence
135135
* provider, with the option to add or override specific entries.
136-
* <p>Useful for specifying entries directly, for example via "jpaPropertyMap[myKey]".
136+
* <p>Useful for specifying entries directly, for example via {@code jpaPropertyMap[myKey]}.
137137
*/
138138
public Map<String, Object> getJpaPropertyMap() {
139139
return this.jpaPropertyMap;

spring-orm/src/main/java/org/springframework/orm/jpa/EntityManagerProxy.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public interface EntityManagerProxy extends EntityManager {
3737
* raw EntityManager.
3838
* <p>In case of a shared ("transactional") EntityManager, this will be
3939
* the raw EntityManager that is currently associated with the transaction.
40-
* Outside of a transaction, an IllegalStateException will be thrown.
40+
* Outside a transaction, an IllegalStateException will be thrown.
4141
* @return the underlying raw EntityManager (never {@code null})
4242
* @throws IllegalStateException if no underlying EntityManager is available
4343
*/

spring-orm/src/main/java/org/springframework/orm/jpa/ExtendedEntityManagerCreator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
* Delegate for creating a variety of {@link javax.persistence.EntityManager}
5151
* proxies that follow the JPA spec's semantics for "extended" EntityManagers.
5252
*
53-
* <p>Supports several different variants of "extended" EntityManagers:
53+
* <p>Supports several variants of "extended" EntityManagers:
5454
* in particular, an "application-managed extended EntityManager", as defined
5555
* by {@link javax.persistence.EntityManagerFactory#createEntityManager()},
5656
* as well as a "container-managed extended EntityManager", as defined by

spring-orm/src/main/java/org/springframework/orm/jpa/JpaTransactionManager.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,9 +228,9 @@ public void setJpaPropertyMap(@Nullable Map<String, ?> jpaProperties) {
228228
}
229229

230230
/**
231-
* Allow Map access to the JPA properties to be passed to the persistence
231+
* Allow {@code Map} access to the JPA properties to be passed to the persistence
232232
* provider, with the option to add or override specific entries.
233-
* <p>Useful for specifying entries directly, for example via "jpaPropertyMap[myKey]".
233+
* <p>Useful for specifying entries directly, for example via {@code jpaPropertyMap[myKey]}.
234234
*/
235235
public Map<String, Object> getJpaPropertyMap() {
236236
return this.jpaPropertyMap;

spring-orm/src/main/java/org/springframework/orm/jpa/JpaVendorAdapter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ default String getPersistenceProviderRootPackage() {
6666
* to unit-specific characteristics such as the transaction type.
6767
* <p><b>NOTE:</b> This variant will only be invoked in case of Java EE style
6868
* container bootstrapping where a {@link PersistenceUnitInfo} is present
69-
* (i.e. {@link LocalContainerEntityManagerFactoryBean}. In case of simple
69+
* (i.e. {@link LocalContainerEntityManagerFactoryBean}). In case of simple
7070
* Java SE style bootstrapping via {@link javax.persistence.Persistence}
7171
* (i.e. {@link LocalEntityManagerFactoryBean}), the parameter-less
7272
* {@link #getJpaPropertyMap()} variant will be called directly.

spring-orm/src/test/java/org/springframework/orm/jpa/ApplicationManagedEntityManagerIntegrationTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public void testReuseInNewTransaction() {
119119

120120
doInstantiateAndSave(em);
121121
setComplete();
122-
endTransaction(); // Should rollback
122+
endTransaction(); // Should roll back
123123
assertThat(countRowsInTable(em, "person")).as("Tx must have committed back").isEqualTo(1);
124124

125125
// Now clean up the database
@@ -139,7 +139,7 @@ public void testRollbackOccurs() {
139139
EntityManager em = entityManagerFactory.createEntityManager();
140140
em.joinTransaction();
141141
doInstantiateAndSave(em);
142-
endTransaction(); // Should rollback
142+
endTransaction(); // Should roll back
143143
assertThat(countRowsInTable(em, "person")).as("Tx must have been rolled back").isEqualTo(0);
144144
}
145145

@@ -150,7 +150,7 @@ public void testCommitOccurs() {
150150
doInstantiateAndSave(em);
151151

152152
setComplete();
153-
endTransaction(); // Should rollback
153+
endTransaction(); // Should roll back
154154
assertThat(countRowsInTable(em, "person")).as("Tx must have committed back").isEqualTo(1);
155155

156156
// Now clean up the database

spring-orm/src/test/java/org/springframework/orm/jpa/ContainerManagedEntityManagerIntegrationTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public void testReuseInNewTransaction() {
139139

140140
doInstantiateAndSave(em);
141141
setComplete();
142-
endTransaction(); // Should rollback
142+
endTransaction(); // Should roll back
143143
assertThat(countRowsInTable(em, "person")).as("Tx must have committed back").isEqualTo(1);
144144

145145
// Now clean up the database
@@ -150,7 +150,7 @@ public void testReuseInNewTransaction() {
150150
public void testRollbackOccurs() {
151151
EntityManager em = createContainerManagedEntityManager();
152152
doInstantiateAndSave(em);
153-
endTransaction(); // Should rollback
153+
endTransaction(); // Should roll back
154154
assertThat(countRowsInTable(em, "person")).as("Tx must have been rolled back").isEqualTo(0);
155155
}
156156

@@ -159,7 +159,7 @@ public void testCommitOccurs() {
159159
EntityManager em = createContainerManagedEntityManager();
160160
doInstantiateAndSave(em);
161161
setComplete();
162-
endTransaction(); // Should rollback
162+
endTransaction(); // Should roll back
163163
assertThat(countRowsInTable(em, "person")).as("Tx must have committed back").isEqualTo(1);
164164

165165
// Now clean up the database

spring-orm/src/test/java/org/springframework/orm/jpa/domain/Person.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
import org.springframework.context.ApplicationContext;
3232

3333
/**
34-
* Simple JavaBean domain object representing an person.
34+
* Simple JavaBean domain object representing a person.
3535
*
3636
* @author Rod Johnson
3737
*/

0 commit comments

Comments
 (0)