From cfb39acc973f0eab3d8cb6ce29dee6604482e84d Mon Sep 17 00:00:00 2001 From: Marc Wrobel Date: Tue, 12 Jul 2022 13:45:36 +0200 Subject: [PATCH 1/4] Fix and improve Javadoc in spring-r2dbc See gh-28796 --- .../r2dbc/connection/R2dbcTransactionManager.java | 4 ++-- .../r2dbc/connection/init/ScriptUtils.java | 8 ++++---- .../r2dbc/core/ConnectionAccessor.java | 4 ++-- .../org/springframework/r2dbc/core/Parameter.java | 2 +- .../org/springframework/r2dbc/core/ParsedSql.java | 12 ++++++------ .../r2dbc/core/StatementFilterFunction.java | 2 +- .../r2dbc/core/binding/AnonymousBindMarkers.java | 2 +- .../springframework/r2dbc/core/binding/Bindings.java | 2 +- .../r2dbc/core/DefaultDatabaseClientUnitTests.java | 2 +- 9 files changed, 19 insertions(+), 19 deletions(-) diff --git a/spring-r2dbc/src/main/java/org/springframework/r2dbc/connection/R2dbcTransactionManager.java b/spring-r2dbc/src/main/java/org/springframework/r2dbc/connection/R2dbcTransactionManager.java index 2bebbd4c40..bf7c437eab 100644 --- a/spring-r2dbc/src/main/java/org/springframework/r2dbc/connection/R2dbcTransactionManager.java +++ b/spring-r2dbc/src/main/java/org/springframework/r2dbc/connection/R2dbcTransactionManager.java @@ -107,7 +107,7 @@ public class R2dbcTransactionManager extends AbstractReactiveTransactionManager /** * Set the R2DBC {@link ConnectionFactory} that this instance should manage transactions for. - *

This will typically be a locally defined {@code ConnectionFactory}, for example an connection pool. + *

This will typically be a locally defined {@code ConnectionFactory}, for example a connection pool. *

The {@code ConnectionFactory} passed in here needs to return independent {@link Connection}s. * The {@code Connection}s may come from a pool (the typical case), but the {@code ConnectionFactory} * must not return scoped {@code Connection}s or the like. @@ -138,7 +138,7 @@ public class R2dbcTransactionManager extends AbstractReactiveTransactionManager /** * Specify whether to enforce the read-only nature of a transaction (as indicated by - * {@link TransactionDefinition#isReadOnly()} through an explicit statement on the + * {@link TransactionDefinition#isReadOnly()}) through an explicit statement on the * transactional connection: "SET TRANSACTION READ ONLY" as understood by Oracle, * MySQL and Postgres. *

The exact treatment, including any SQL statement executed on the connection, diff --git a/spring-r2dbc/src/main/java/org/springframework/r2dbc/connection/init/ScriptUtils.java b/spring-r2dbc/src/main/java/org/springframework/r2dbc/connection/init/ScriptUtils.java index 82fdf38ee3..c374d68c05 100644 --- a/spring-r2dbc/src/main/java/org/springframework/r2dbc/connection/init/ScriptUtils.java +++ b/spring-r2dbc/src/main/java/org/springframework/r2dbc/connection/init/ScriptUtils.java @@ -166,9 +166,9 @@ public abstract class ScriptUtils { * @param resource the resource (potentially associated with a specific encoding) * to load the SQL script from * @param dataBufferFactory the factory to create data buffers with - * @param continueOnError whether or not to continue without throwing an exception + * @param continueOnError whether to continue without throwing an exception * in the event of an error - * @param ignoreFailedDrops whether or not to continue in the event of specifically + * @param ignoreFailedDrops whether to continue in the event of specifically * an error on a {@code DROP} statement * @param commentPrefix the prefix that identifies single-line comments in the * SQL script (typically "--") @@ -207,9 +207,9 @@ public abstract class ScriptUtils { * @param resource the resource (potentially associated with a specific encoding) * to load the SQL script from * @param dataBufferFactory the factory to create data buffers with - * @param continueOnError whether or not to continue without throwing an exception + * @param continueOnError whether to continue without throwing an exception * in the event of an error - * @param ignoreFailedDrops whether or not to continue in the event of specifically + * @param ignoreFailedDrops whether to continue in the event of specifically * an error on a {@code DROP} statement * @param commentPrefixes the prefixes that identify single-line comments in the * SQL script (typically "--") diff --git a/spring-r2dbc/src/main/java/org/springframework/r2dbc/core/ConnectionAccessor.java b/spring-r2dbc/src/main/java/org/springframework/r2dbc/core/ConnectionAccessor.java index bfeb09dd1b..9f794ce671 100644 --- a/spring-r2dbc/src/main/java/org/springframework/r2dbc/core/ConnectionAccessor.java +++ b/spring-r2dbc/src/main/java/org/springframework/r2dbc/core/ConnectionAccessor.java @@ -45,7 +45,7 @@ public interface ConnectionAccessor { * Execute a callback {@link Function} within a {@link Connection} scope. * The function is responsible for creating a {@link Mono}. The connection * is released after the {@link Mono} terminates (or the subscription - * is cancelled). Connection resources must not be passed outside of the + * is cancelled). Connection resources must not be passed outside the * {@link Function} closure, otherwise resources may get defunct. * @param action the callback object that specifies the connection action * @return the resulting {@link Mono} @@ -56,7 +56,7 @@ public interface ConnectionAccessor { * Execute a callback {@link Function} within a {@link Connection} scope. * The function is responsible for creating a {@link Flux}. The connection * is released after the {@link Flux} terminates (or the subscription - * is cancelled). Connection resources must not be passed outside of the + * is cancelled). Connection resources must not be passed outside the * {@link Function} closure, otherwise resources may get defunct. * @param action the callback object that specifies the connection action * @return the resulting {@link Flux} diff --git a/spring-r2dbc/src/main/java/org/springframework/r2dbc/core/Parameter.java b/spring-r2dbc/src/main/java/org/springframework/r2dbc/core/Parameter.java index 69f9ed92bd..7615477fce 100644 --- a/spring-r2dbc/src/main/java/org/springframework/r2dbc/core/Parameter.java +++ b/spring-r2dbc/src/main/java/org/springframework/r2dbc/core/Parameter.java @@ -100,7 +100,7 @@ public final class Parameter { } /** - * Return whether this {@link Parameter} has a empty. + * Return whether this {@link Parameter} has an empty value. * @return {@code true} if {@link #getValue()} is {@code null} */ public boolean isEmpty() { diff --git a/spring-r2dbc/src/main/java/org/springframework/r2dbc/core/ParsedSql.java b/spring-r2dbc/src/main/java/org/springframework/r2dbc/core/ParsedSql.java index 0ae2ccf00c..5cca8eea8b 100644 --- a/spring-r2dbc/src/main/java/org/springframework/r2dbc/core/ParsedSql.java +++ b/spring-r2dbc/src/main/java/org/springframework/r2dbc/core/ParsedSql.java @@ -69,7 +69,7 @@ class ParsedSql { } /** - * Return all of the parameters (bind variables) in the parsed SQL statement. + * Return all the parameters (bind variables) in the parsed SQL statement. * Repeated occurrences of the same parameter name are included here. */ List getParameterNames() { @@ -81,7 +81,7 @@ class ParsedSql { * @param parameterPosition the position of the parameter * (as index in the parameter names List) * @return the start index and end index, combined into - * a int array of length 2 + * an int array of length 2 */ int[] getParameterIndexes(int parameterPosition) { return this.parameterIndexes.get(parameterPosition); @@ -104,21 +104,21 @@ class ParsedSql { } /** - * Set the count of all of the unnamed parameters in the SQL statement. + * Set the count of all the unnamed parameters in the SQL statement. */ void setUnnamedParameterCount(int unnamedParameterCount) { this.unnamedParameterCount = unnamedParameterCount; } /** - * Return the count of all of the unnamed parameters in the SQL statement. + * Return the count of all the unnamed parameters in the SQL statement. */ int getUnnamedParameterCount() { return this.unnamedParameterCount; } /** - * Set the total count of all of the parameters in the SQL statement. + * Set the total count of all the parameters in the SQL statement. * Repeated occurrences of the same parameter name do count here. */ void setTotalParameterCount(int totalParameterCount) { @@ -126,7 +126,7 @@ class ParsedSql { } /** - * Return the total count of all of the parameters in the SQL statement. + * Return the total count of all the parameters in the SQL statement. * Repeated occurrences of the same parameter name do count here. */ int getTotalParameterCount() { diff --git a/spring-r2dbc/src/main/java/org/springframework/r2dbc/core/StatementFilterFunction.java b/spring-r2dbc/src/main/java/org/springframework/r2dbc/core/StatementFilterFunction.java index 37f98a81a6..e36c41cccf 100644 --- a/spring-r2dbc/src/main/java/org/springframework/r2dbc/core/StatementFilterFunction.java +++ b/spring-r2dbc/src/main/java/org/springframework/r2dbc/core/StatementFilterFunction.java @@ -48,7 +48,7 @@ public interface StatementFilterFunction { /** * Apply this filter to the given {@link Statement} and {@link ExecuteFunction}. *

The given {@link ExecuteFunction} represents the next entity in the chain, - * to be invoked via {@link ExecuteFunction#execute(Statement)} invoked} in + * to be invoked via {@link ExecuteFunction#execute(Statement)} in * order to proceed with the execution, or not invoked to shortcut the chain. * @param statement the current {@link Statement} * @param next the next execute function in the chain diff --git a/spring-r2dbc/src/main/java/org/springframework/r2dbc/core/binding/AnonymousBindMarkers.java b/spring-r2dbc/src/main/java/org/springframework/r2dbc/core/binding/AnonymousBindMarkers.java index 49860a0409..5b31fb34c0 100644 --- a/spring-r2dbc/src/main/java/org/springframework/r2dbc/core/binding/AnonymousBindMarkers.java +++ b/spring-r2dbc/src/main/java/org/springframework/r2dbc/core/binding/AnonymousBindMarkers.java @@ -24,7 +24,7 @@ import java.util.concurrent.atomic.AtomicIntegerFieldUpdater; * the placeholder. This implementation creates indexed bind markers using * an anonymous placeholder that correlates with an index. * - *

Note: Anonymous bind markers are problematic because the have to appear + *

Note: Anonymous bind markers are problematic because they have to appear * in generated SQL in the same order they get generated. This might cause * challenges in the future with complex generate statements. For example those * containing subselects which limit the freedom of arranging bind markers. diff --git a/spring-r2dbc/src/main/java/org/springframework/r2dbc/core/binding/Bindings.java b/spring-r2dbc/src/main/java/org/springframework/r2dbc/core/binding/Bindings.java index 9be490287c..a0a6eacc73 100644 --- a/spring-r2dbc/src/main/java/org/springframework/r2dbc/core/binding/Bindings.java +++ b/spring-r2dbc/src/main/java/org/springframework/r2dbc/core/binding/Bindings.java @@ -167,7 +167,7 @@ public class Bindings implements Iterable { /** * Return whether the binding is empty. - * @return {@code true} if this is is a {@code NULL} binding + * @return {@code true} if this is a {@code NULL} binding */ public boolean isNull() { return !hasValue(); diff --git a/spring-r2dbc/src/test/java/org/springframework/r2dbc/core/DefaultDatabaseClientUnitTests.java b/spring-r2dbc/src/test/java/org/springframework/r2dbc/core/DefaultDatabaseClientUnitTests.java index a1a5206166..6f03e82bd4 100644 --- a/spring-r2dbc/src/test/java/org/springframework/r2dbc/core/DefaultDatabaseClientUnitTests.java +++ b/spring-r2dbc/src/test/java/org/springframework/r2dbc/core/DefaultDatabaseClientUnitTests.java @@ -428,7 +428,7 @@ class DefaultDatabaseClientUnitTests { } /** - * Mocks a {@link Result} with a single column "name" and a single row if a non null + * Mocks a {@link Result} with a single column "name" and a single row if a non-null * row is provided. */ private MockResult mockSingleColumnResult(@Nullable MockRow.Builder row) { From ac06d1dfa957f350e6e7a7be3b984cadd73adc04 Mon Sep 17 00:00:00 2001 From: Marc Wrobel Date: Tue, 12 Jul 2022 13:48:23 +0200 Subject: [PATCH 2/4] Fix and improve Javadoc in spring-orm See gh-28796 --- .../hibernate5/support/OpenSessionInViewInterceptor.java | 2 +- .../orm/jpa/AbstractEntityManagerFactoryBean.java | 4 ++-- .../orm/jpa/EntityManagerFactoryAccessor.java | 4 ++-- .../org/springframework/orm/jpa/EntityManagerProxy.java | 2 +- .../orm/jpa/ExtendedEntityManagerCreator.java | 2 +- .../org/springframework/orm/jpa/JpaTransactionManager.java | 4 ++-- .../java/org/springframework/orm/jpa/JpaVendorAdapter.java | 2 +- .../ApplicationManagedEntityManagerIntegrationTests.java | 6 +++--- .../jpa/ContainerManagedEntityManagerIntegrationTests.java | 6 +++--- .../java/org/springframework/orm/jpa/domain/Person.java | 2 +- 10 files changed, 17 insertions(+), 17 deletions(-) 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 */ From b30eb6837c69b9a3d01796ff17b5e15325957dc4 Mon Sep 17 00:00:00 2001 From: Marc Wrobel Date: Tue, 12 Jul 2022 13:50:38 +0200 Subject: [PATCH 3/4] Fix and improve Javadoc in spring-oxm See gh-28796 --- .../src/main/java/org/springframework/oxm/Marshaller.java | 2 +- .../org/springframework/oxm/support/AbstractMarshaller.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-oxm/src/main/java/org/springframework/oxm/Marshaller.java b/spring-oxm/src/main/java/org/springframework/oxm/Marshaller.java index 2b1e61cb86..3ecfa5b088 100644 --- a/spring-oxm/src/main/java/org/springframework/oxm/Marshaller.java +++ b/spring-oxm/src/main/java/org/springframework/oxm/Marshaller.java @@ -26,7 +26,7 @@ import javax.xml.transform.Result; * *

Although the {@code marshal} method accepts a {@code java.lang.Object} as its * first parameter, most {@code Marshaller} implementations cannot handle arbitrary - * {@code Object}s. Instead, a object class must be registered with the marshaller, + * {@code Object}s. Instead, an object class must be registered with the marshaller, * or have a common base class. * * @author Arjen Poutsma diff --git a/spring-oxm/src/main/java/org/springframework/oxm/support/AbstractMarshaller.java b/spring-oxm/src/main/java/org/springframework/oxm/support/AbstractMarshaller.java index f492caf38c..23c498598e 100644 --- a/spring-oxm/src/main/java/org/springframework/oxm/support/AbstractMarshaller.java +++ b/spring-oxm/src/main/java/org/springframework/oxm/support/AbstractMarshaller.java @@ -488,7 +488,7 @@ public abstract class AbstractMarshaller implements Marshaller, Unmarshaller { /** * Abstract template method for marshalling the given object graph to a DOM {@code Node}. - *

In practice, node is be a {@code Document} node, a {@code DocumentFragment} node, + *

In practice, {@code node} is a {@code Document} node, a {@code DocumentFragment} node, * or a {@code Element} node. In other words, a node that accepts children. * @param graph the root of the object graph to marshal * @param node the DOM node that will contain the result tree From bca104798b3113767332b9e48306943172ee2e16 Mon Sep 17 00:00:00 2001 From: Marc Wrobel Date: Tue, 12 Jul 2022 14:25:16 +0200 Subject: [PATCH 4/4] Fix and improve Javadoc in spring-jdbc Closes gh-28796 --- .../jdbc/core/ArgumentPreparedStatementSetter.java | 2 +- .../core/ArgumentTypePreparedStatementSetter.java | 2 +- .../jdbc/core/CallableStatementCreatorFactory.java | 4 ++-- .../jdbc/core/ColumnMapRowMapper.java | 2 +- .../springframework/jdbc/core/JdbcOperations.java | 2 +- .../org/springframework/jdbc/core/JdbcTemplate.java | 12 ++++++------ .../jdbc/core/metadata/CallMetaDataContext.java | 2 +- .../core/namedparam/NamedParameterJdbcTemplate.java | 2 +- .../jdbc/core/namedparam/ParsedSql.java | 12 ++++++------ .../core/namedparam/SqlParameterSourceUtils.java | 4 ++-- .../jdbc/core/simple/SimpleJdbcCall.java | 2 +- .../jdbc/core/simple/SimpleJdbcInsert.java | 2 +- .../datasource/DataSourceTransactionManager.java | 2 +- .../jdbc/datasource/DriverManagerDataSource.java | 2 +- .../jdbc/datasource/SmartDataSource.java | 2 +- .../datasource/UserCredentialsDataSourceAdapter.java | 2 +- .../datasource/embedded/EmbeddedDatabaseFactory.java | 2 +- .../embedded/EmbeddedDatabaseFactoryBean.java | 2 +- .../jdbc/datasource/init/ScriptUtils.java | 8 ++++---- .../lookup/DataSourceLookupFailureException.java | 2 +- .../springframework/jdbc/object/RdbmsOperation.java | 2 +- .../org/springframework/jdbc/object/SqlCall.java | 4 ++-- .../jdbc/object/UpdatableSqlQuery.java | 4 ++-- .../org/springframework/jdbc/support/JdbcUtils.java | 2 +- .../incrementer/MySQLMaxValueIncrementer.java | 2 +- .../jdbc/support/rowset/SqlRowSet.java | 12 ++++++------ .../jdbc/support/rowset/SqlRowSetMetaData.java | 2 +- .../support/SQLExceptionSubclassTranslatorTests.java | 2 +- 28 files changed, 50 insertions(+), 50 deletions(-) diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/ArgumentPreparedStatementSetter.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/ArgumentPreparedStatementSetter.java index 4f92385be8..353a440ec2 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/ArgumentPreparedStatementSetter.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/ArgumentPreparedStatementSetter.java @@ -54,7 +54,7 @@ public class ArgumentPreparedStatementSetter implements PreparedStatementSetter, /** * Set the value for prepared statements specified parameter index using the passed in value. - * This method can be overridden by sub-classes if needed. + * This method can be overridden by subclasses if needed. * @param ps the PreparedStatement * @param parameterPosition index of the parameter position * @param argValue the value to set diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/ArgumentTypePreparedStatementSetter.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/ArgumentTypePreparedStatementSetter.java index 7e102efe31..cb095e8d17 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/ArgumentTypePreparedStatementSetter.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/ArgumentTypePreparedStatementSetter.java @@ -87,7 +87,7 @@ public class ArgumentTypePreparedStatementSetter implements PreparedStatementSet /** * Set the value for the prepared statement's specified parameter position using the passed in - * value and type. This method can be overridden by sub-classes if needed. + * value and type. This method can be overridden by subclasses if needed. * @param ps the PreparedStatement * @param parameterPosition index of the parameter position * @param argType the argument type diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/CallableStatementCreatorFactory.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/CallableStatementCreatorFactory.java index 69e88ae0f7..501938d45e 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/CallableStatementCreatorFactory.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/CallableStatementCreatorFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2020 the original author or authors. + * Copyright 2002-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -109,7 +109,7 @@ public class CallableStatementCreatorFactory { /** - * Return a new CallableStatementCreator instance given this parameters. + * Return a new CallableStatementCreator instance given these parameters. * @param params list of parameters (may be {@code null}) */ public CallableStatementCreator newCallableStatementCreator(@Nullable Map params) { diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/ColumnMapRowMapper.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/ColumnMapRowMapper.java index ccec6462a3..e6ea97a98c 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/ColumnMapRowMapper.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/ColumnMapRowMapper.java @@ -84,7 +84,7 @@ public class ColumnMapRowMapper implements RowMapper> { * Retrieve a JDBC object value for the specified column. *

The default implementation uses the {@code getObject} method. * Additionally, this implementation includes a "hack" to get around Oracle - * returning a non standard object for their TIMESTAMP data type. + * returning a non-standard object for their TIMESTAMP data type. * @param rs the ResultSet holding the data * @param index the column index * @return the Object returned diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/JdbcOperations.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/JdbcOperations.java index 7910753806..75937f348b 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/JdbcOperations.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/JdbcOperations.java @@ -234,7 +234,7 @@ public interface JdbcOperations { * Each element in the list will be of the form returned by this interface's * {@code queryForMap} methods. * @param sql the SQL query to execute - * @return an List that contains a Map per row + * @return a List that contains a Map per row * @throws DataAccessException if there is any problem executing the query * @see #queryForList(String, Object...) */ diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/JdbcTemplate.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/JdbcTemplate.java index f41390c2c4..4cba2e4d65 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/JdbcTemplate.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/JdbcTemplate.java @@ -111,7 +111,7 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations { private static final String RETURN_UPDATE_COUNT_PREFIX = "#update-count-"; - /** If this variable is false, we will throw exceptions on SQL warnings. */ + /** If this variable is {@code false}, we will throw exceptions on SQL warnings. */ private boolean ignoreWarnings = true; /** @@ -149,7 +149,7 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations { /** * If this variable is set to true then execution of a CallableStatement will return - * the results in a Map that uses case insensitive names for the parameters. + * the results in a Map that uses case-insensitive names for the parameters. */ private boolean resultsMapCaseInsensitive = false; @@ -187,7 +187,7 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations { /** - * Set whether or not we want to ignore SQLWarnings. + * Set whether we want to ignore SQLWarnings. *

Default is "true", swallowing and logging all warnings. Switch this flag * to "false" to make the JdbcTemplate throw an SQLWarningException instead. * @see java.sql.SQLWarning @@ -199,7 +199,7 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations { } /** - * Return whether or not we ignore SQLWarnings. + * Return whether we ignore SQLWarnings. */ public boolean isIgnoreWarnings() { return this.ignoreWarnings; @@ -303,7 +303,7 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations { /** * Set whether execution of a CallableStatement will return the results in a Map - * that uses case insensitive names for the parameters. + * that uses case-insensitive names for the parameters. */ public void setResultsMapCaseInsensitive(boolean resultsMapCaseInsensitive) { this.resultsMapCaseInsensitive = resultsMapCaseInsensitive; @@ -311,7 +311,7 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations { /** * Return whether execution of a CallableStatement will return the results in a Map - * that uses case insensitive names for the parameters. + * that uses case-insensitive names for the parameters. */ public boolean isResultsMapCaseInsensitive() { return this.resultsMapCaseInsensitive; diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/CallMetaDataContext.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/CallMetaDataContext.java index 2f6105cafc..e55ee9621d 100755 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/CallMetaDataContext.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/CallMetaDataContext.java @@ -478,7 +478,7 @@ public class CallMetaDataContext { */ public Map matchInParameterValuesWithCallParameters(SqlParameterSource parameterSource) { // For parameter source lookups we need to provide case-insensitive lookup support - // since the database meta-data is not necessarily providing case sensitive parameter names. + // since the database meta-data is not necessarily providing case-sensitive parameter names. Map caseInsensitiveParameterNames = SqlParameterSourceUtils.extractCaseInsensitiveParameterNames(parameterSource); diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/NamedParameterJdbcTemplate.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/NamedParameterJdbcTemplate.java index ef7b6567df..3d3752b5bf 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/NamedParameterJdbcTemplate.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/NamedParameterJdbcTemplate.java @@ -406,7 +406,7 @@ public class NamedParameterJdbcTemplate implements NamedParameterJdbcOperations * @param sql the SQL statement to execute * @param paramSource container of arguments to bind * @param customizer callback for setting further properties on the - * {@link PreparedStatementCreatorFactory} in use), applied before the + * {@link PreparedStatementCreatorFactory} in use, applied before the * actual {@code newPreparedStatementCreator} call * @return the corresponding {@link PreparedStatementCreator} * @since 5.0.5 diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/ParsedSql.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/ParsedSql.java index d862838cc3..99383170a0 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/ParsedSql.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/ParsedSql.java @@ -69,7 +69,7 @@ public class ParsedSql { } /** - * Return all of the parameters (bind variables) in the parsed SQL statement. + * Return all the parameters (bind variables) in the parsed SQL statement. * Repeated occurrences of the same parameter name are included here. */ List getParameterNames() { @@ -81,7 +81,7 @@ public class ParsedSql { * @param parameterPosition the position of the parameter * (as index in the parameter names List) * @return the start index and end index, combined into - * a int array of length 2 + * an int array of length 2 */ int[] getParameterIndexes(int parameterPosition) { return this.parameterIndexes.get(parameterPosition); @@ -104,21 +104,21 @@ public class ParsedSql { } /** - * Set the count of all of the unnamed parameters in the SQL statement. + * Set the count of all the unnamed parameters in the SQL statement. */ void setUnnamedParameterCount(int unnamedParameterCount) { this.unnamedParameterCount = unnamedParameterCount; } /** - * Return the count of all of the unnamed parameters in the SQL statement. + * Return the count of all the unnamed parameters in the SQL statement. */ int getUnnamedParameterCount() { return this.unnamedParameterCount; } /** - * Set the total count of all of the parameters in the SQL statement. + * Set the total count of all the parameters in the SQL statement. * Repeated occurrences of the same parameter name do count here. */ void setTotalParameterCount(int totalParameterCount) { @@ -126,7 +126,7 @@ public class ParsedSql { } /** - * Return the total count of all of the parameters in the SQL statement. + * Return the total count of all the parameters in the SQL statement. * Repeated occurrences of the same parameter name do count here. */ int getTotalParameterCount() { diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/SqlParameterSourceUtils.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/SqlParameterSourceUtils.java index e2bd60e05f..ced04936cf 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/SqlParameterSourceUtils.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/SqlParameterSourceUtils.java @@ -106,9 +106,9 @@ public abstract class SqlParameterSourceUtils { } /** - * Create a Map of case insensitive parameter names together with the original name. + * Create a Map of case-insensitive parameter names together with the original name. * @param parameterSource the source of parameter names - * @return the Map that can be used for case insensitive matching of parameter names + * @return the Map that can be used for case-insensitive matching of parameter names */ public static Map extractCaseInsensitiveParameterNames(SqlParameterSource parameterSource) { Map caseInsensitiveParameterNames = new HashMap<>(); diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcCall.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcCall.java index dad5287ad7..f26ea8aee3 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcCall.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcCall.java @@ -28,7 +28,7 @@ import org.springframework.jdbc.core.SqlParameter; import org.springframework.jdbc.core.namedparam.SqlParameterSource; /** - * A SimpleJdbcCall is a multi-threaded, reusable object representing a call + * A SimpleJdbcCall is a multithreaded, reusable object representing a call * to a stored procedure or a stored function. It provides meta-data processing * to simplify the code needed to access basic stored procedures/functions. * All you need to provide is the name of the procedure/function and a Map diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcInsert.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcInsert.java index cc18254808..ce210b39b4 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcInsert.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcInsert.java @@ -26,7 +26,7 @@ import org.springframework.jdbc.core.namedparam.SqlParameterSource; import org.springframework.jdbc.support.KeyHolder; /** - * A SimpleJdbcInsert is a multi-threaded, reusable object providing easy insert + * A SimpleJdbcInsert is a multithreaded, reusable object providing easy insert * capabilities for a table. It provides meta-data processing to simplify the code * needed to construct a basic insert statement. All you need to provide is the * name of the table and a Map containing the column names and the column values. diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/DataSourceTransactionManager.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/DataSourceTransactionManager.java index d2f619a4d1..0de9c2c4ac 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/DataSourceTransactionManager.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/DataSourceTransactionManager.java @@ -195,7 +195,7 @@ public class DataSourceTransactionManager extends AbstractPlatformTransactionMan /** * Specify whether to enforce the read-only nature of a transaction - * (as indicated by {@link TransactionDefinition#isReadOnly()} + * (as indicated by {@link TransactionDefinition#isReadOnly()}) * through an explicit statement on the transactional connection: * "SET TRANSACTION READ ONLY" as understood by Oracle, MySQL and Postgres. *

The exact treatment, including any SQL statement executed on the connection, diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/DriverManagerDataSource.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/DriverManagerDataSource.java index f803cd4677..eb5b29ad6d 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/DriverManagerDataSource.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/DriverManagerDataSource.java @@ -34,7 +34,7 @@ import org.springframework.util.ClassUtils; * connection pool, implementing the same standard interface, but creating new * Connections on every call. * - *

Useful for test or standalone environments outside of a Java EE container, either + *

Useful for test or standalone environments outside a Java EE container, either * as a DataSource bean in a corresponding ApplicationContext or in conjunction with * a simple JNDI environment. Pool-assuming {@code Connection.close()} calls will * simply close the Connection, so any DataSource-aware persistence code should work. diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/SmartDataSource.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/SmartDataSource.java index c56133a8c6..bd58f30cda 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/SmartDataSource.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/SmartDataSource.java @@ -25,7 +25,7 @@ import javax.sql.DataSource; * implemented by special DataSources that return JDBC Connections * in an unwrapped fashion. * - *

Classes using this interface can query whether or not the Connection + *

Classes using this interface can query whether the Connection * should be closed after an operation. Spring's DataSourceUtils and * JdbcTemplate classes automatically perform such a check. * diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/UserCredentialsDataSourceAdapter.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/UserCredentialsDataSourceAdapter.java index 659c11fae8..98203528fc 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/UserCredentialsDataSourceAdapter.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/UserCredentialsDataSourceAdapter.java @@ -122,7 +122,7 @@ public class UserCredentialsDataSourceAdapter extends DelegatingDataSource { /** - * Set user credententials for this proxy and the current thread. + * Set user credentials for this proxy and the current thread. * The given username and password will be applied to all subsequent * {@code getConnection()} calls on this DataSource proxy. *

This will override any statically specified user credentials, diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseFactory.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseFactory.java index 52b66888b9..e6d3b0b233 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseFactory.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseFactory.java @@ -209,7 +209,7 @@ public class EmbeddedDatabaseFactory { } /** - * Hook to shutdown the embedded database. Subclasses may call this method + * Hook to shut down the embedded database. Subclasses may call this method * to force shutdown. *

After calling, {@link #getDataSource()} returns {@code null}. *

Does nothing if no embedded database has been initialized. diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseFactoryBean.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseFactoryBean.java index 0f0500600a..01a779075a 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseFactoryBean.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseFactoryBean.java @@ -34,7 +34,7 @@ import org.springframework.lang.Nullable; * proxy since the {@link FactoryBean} will manage the initialization and destruction * lifecycle of the embedded database instance. * - *

Implements {@link DisposableBean} to shutdown the embedded database when the + *

Implements {@link DisposableBean} to shut down the embedded database when the * managing Spring container is being closed. * * @author Keith Donald diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/init/ScriptUtils.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/init/ScriptUtils.java index 4231155710..43819de0b3 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/init/ScriptUtils.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/init/ScriptUtils.java @@ -161,9 +161,9 @@ public abstract class ScriptUtils { * configured and ready to use * @param resource the resource (potentially associated with a specific encoding) * to load the SQL script from - * @param continueOnError whether or not to continue without throwing an exception + * @param continueOnError whether to continue without throwing an exception * in the event of an error - * @param ignoreFailedDrops whether or not to continue in the event of specifically + * @param ignoreFailedDrops whether to continue in the event of specifically * an error on a {@code DROP} statement * @param commentPrefix the prefix that identifies single-line comments in the * SQL script (typically "--") @@ -200,9 +200,9 @@ public abstract class ScriptUtils { * configured and ready to use * @param resource the resource (potentially associated with a specific encoding) * to load the SQL script from - * @param continueOnError whether or not to continue without throwing an exception + * @param continueOnError whether to continue without throwing an exception * in the event of an error - * @param ignoreFailedDrops whether or not to continue in the event of specifically + * @param ignoreFailedDrops whether to continue in the event of specifically * an error on a {@code DROP} statement * @param commentPrefixes the prefixes that identify single-line comments in the * SQL script (typically "--") diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/DataSourceLookupFailureException.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/DataSourceLookupFailureException.java index eef1af3df0..e19c2ad6d0 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/DataSourceLookupFailureException.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/DataSourceLookupFailureException.java @@ -39,7 +39,7 @@ public class DataSourceLookupFailureException extends NonTransientDataAccessExce /** * Constructor for DataSourceLookupFailureException. * @param msg the detail message - * @param cause the root cause (usually from using a underlying + * @param cause the root cause (usually from using an underlying * lookup API such as JNDI) */ public DataSourceLookupFailureException(String msg, Throwable cause) { diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/object/RdbmsOperation.java b/spring-jdbc/src/main/java/org/springframework/jdbc/object/RdbmsOperation.java index c3db79762a..cba88a4604 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/object/RdbmsOperation.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/object/RdbmsOperation.java @@ -37,7 +37,7 @@ import org.springframework.lang.Nullable; import org.springframework.util.Assert; /** - * An "RDBMS operation" is a multi-threaded, reusable object representing a query, + * An "RDBMS operation" is a multithreaded, reusable object representing a query, * update, or stored procedure call. An RDBMS operation is not a command, * as a command is not reusable. However, execute methods may take commands as * arguments. Subclasses should be JavaBeans, allowing easy configuration. diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/object/SqlCall.java b/spring-jdbc/src/main/java/org/springframework/jdbc/object/SqlCall.java index 23f1018710..0f8600659f 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/object/SqlCall.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/object/SqlCall.java @@ -49,7 +49,7 @@ public abstract class SqlCall extends RdbmsOperation { /** * Flag used to indicate that the sql for this call should be used exactly as - * it is defined. No need to add the escape syntax and parameter place holders. + * it is defined. No need to add the escape syntax and parameter placeholders. */ private boolean sqlReadyForUse = false; @@ -184,7 +184,7 @@ public abstract class SqlCall extends RdbmsOperation { /** * Return a CallableStatementCreator to perform an operation - * with this parameters. + * with these parameters. * @param inParams parameters. May be {@code null}. */ protected CallableStatementCreator newCallableStatementCreator(@Nullable Map inParams) { diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/object/UpdatableSqlQuery.java b/spring-jdbc/src/main/java/org/springframework/jdbc/object/UpdatableSqlQuery.java index 3c731b0d1f..1c3fa977d2 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/object/UpdatableSqlQuery.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/object/UpdatableSqlQuery.java @@ -71,13 +71,13 @@ public abstract class UpdatableSqlQuery extends SqlQuery { * ResultSet and optionally create object of the result type. * @param rs the ResultSet we're working through * @param rowNum row number (from 0) we're up to - * @param context passed to the execute() method. + * @param context passed to the {@code execute()} method. * It can be {@code null} if no contextual information is need. If you * need to pass in data for each row, you can pass in a HashMap with * the primary key of the row being the key for the HashMap. That way * it is easy to locate the updates for each row * @return an object of the result type - * @throws SQLException if there's an error updateing data. + * @throws SQLException if there's an error updating data. * Subclasses can simply not catch SQLExceptions, relying on the * framework to clean up. */ diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/JdbcUtils.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/JdbcUtils.java index 6fe7e9ea12..2deeb4c666 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/JdbcUtils.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/JdbcUtils.java @@ -501,7 +501,7 @@ public abstract class JdbcUtils { *

columnLabel - the label for the column specified with the SQL AS clause. * If the SQL AS clause was not specified, then the label is the name of the column. * @param resultSetMetaData the current meta-data to use - * @param columnIndex the index of the column for the look up + * @param columnIndex the index of the column for the lookup * @return the column name to use * @throws SQLException in case of lookup failure */ diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/MySQLMaxValueIncrementer.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/MySQLMaxValueIncrementer.java index bc00b8d925..83eb5bf75e 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/MySQLMaxValueIncrementer.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/MySQLMaxValueIncrementer.java @@ -73,7 +73,7 @@ public class MySQLMaxValueIncrementer extends AbstractColumnMaxValueIncrementer /** The max id to serve. */ private long maxId = 0; - /** Whether or not to use a new connection for the incrementer. */ + /** Whether to use a new connection for the incrementer. */ private boolean useNewConnection = true; diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/rowset/SqlRowSet.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/rowset/SqlRowSet.java index cb49fd0597..2d45305597 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/rowset/SqlRowSet.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/rowset/SqlRowSet.java @@ -246,7 +246,7 @@ public interface SqlRowSet extends Serializable { /** * Retrieve the value of the indicated column in the current row as an Object. * @param columnIndex the column index - * @return a Object representing the column value + * @return an Object representing the column value * @see java.sql.ResultSet#getObject(int) */ @Nullable @@ -255,7 +255,7 @@ public interface SqlRowSet extends Serializable { /** * Retrieve the value of the indicated column in the current row as an Object. * @param columnLabel the column label - * @return a Object representing the column value + * @return an Object representing the column value * @see java.sql.ResultSet#getObject(String) */ @Nullable @@ -265,7 +265,7 @@ public interface SqlRowSet extends Serializable { * Retrieve the value of the indicated column in the current row as an Object. * @param columnIndex the column index * @param map a Map object containing the mapping from SQL types to Java types - * @return a Object representing the column value + * @return an Object representing the column value * @see java.sql.ResultSet#getObject(int, Map) */ @Nullable @@ -275,7 +275,7 @@ public interface SqlRowSet extends Serializable { * Retrieve the value of the indicated column in the current row as an Object. * @param columnLabel the column label * @param map a Map object containing the mapping from SQL types to Java types - * @return a Object representing the column value + * @return an Object representing the column value * @see java.sql.ResultSet#getObject(String, Map) */ @Nullable @@ -285,7 +285,7 @@ public interface SqlRowSet extends Serializable { * Retrieve the value of the indicated column in the current row as an Object. * @param columnIndex the column index * @param type the Java type to convert the designated column to - * @return a Object representing the column value + * @return an Object representing the column value * @since 4.1.3 * @see java.sql.ResultSet#getObject(int, Class) */ @@ -296,7 +296,7 @@ public interface SqlRowSet extends Serializable { * Retrieve the value of the indicated column in the current row as an Object. * @param columnLabel the column label * @param type the Java type to convert the designated column to - * @return a Object representing the column value + * @return an Object representing the column value * @since 4.1.3 * @see java.sql.ResultSet#getObject(String, Class) */ diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/rowset/SqlRowSetMetaData.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/rowset/SqlRowSetMetaData.java index 15a5f01d13..0e0473be27 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/rowset/SqlRowSetMetaData.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/rowset/SqlRowSetMetaData.java @@ -145,7 +145,7 @@ public interface SqlRowSetMetaData { /** * Indicate whether the case of the designated column is significant. * @param columnIndex the index of the column - * @return true if the case sensitive, false otherwise + * @return true if the column is case-sensitive, false otherwise * @see java.sql.ResultSetMetaData#isCaseSensitive(int) */ boolean isCaseSensitive(int columnIndex) throws InvalidResultSetAccessException; diff --git a/spring-jdbc/src/test/java/org/springframework/jdbc/support/SQLExceptionSubclassTranslatorTests.java b/spring-jdbc/src/test/java/org/springframework/jdbc/support/SQLExceptionSubclassTranslatorTests.java index f599303aaa..0be4d4b0d8 100644 --- a/spring-jdbc/src/test/java/org/springframework/jdbc/support/SQLExceptionSubclassTranslatorTests.java +++ b/spring-jdbc/src/test/java/org/springframework/jdbc/support/SQLExceptionSubclassTranslatorTests.java @@ -90,7 +90,7 @@ public class SQLExceptionSubclassTranslatorTests { assertThat(rdaex2.getCause()).isEqualTo(recoverableEx); // Test classic error code translation. We should move there next if the exception we pass in is not one - // of the new sub-classes. + // of the new subclasses. SQLException sexEct = new SQLException("", "", 1); BadSqlGrammarException bsgEct = (BadSqlGrammarException) sext.translate("task", "SQL-ECT", sexEct); assertThat(bsgEct.getSql()).isEqualTo("SQL-ECT");