From cfb39acc973f0eab3d8cb6ce29dee6604482e84d Mon Sep 17 00:00:00 2001 From: Marc Wrobel Date: Tue, 12 Jul 2022 13:45:36 +0200 Subject: [PATCH] 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) {