Skip to content

Commit 4dc3eac

Browse files
committed
Polishing
1 parent 0188270 commit 4dc3eac

File tree

9 files changed

+25
-24
lines changed

9 files changed

+25
-24
lines changed

spring-jdbc/src/main/java/org/springframework/jdbc/IncorrectResultSetColumnCountException.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -20,7 +20,7 @@
2020

2121
/**
2222
* Data access exception thrown when a result set did not have the correct column count,
23-
* for example when expecting a single column but getting 0 or more than 1 columns.
23+
* for example when expecting a single column but getting 0 or more than 1 column.
2424
*
2525
* @author Juergen Hoeller
2626
* @since 2.0

spring-jdbc/src/main/java/org/springframework/jdbc/JdbcUpdateAffectedIncorrectNumberOfRowsException.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -20,7 +20,7 @@
2020

2121
/**
2222
* Exception thrown when a JDBC update affects an unexpected number of rows.
23-
* Typically we expect an update to affect a single row, meaning it's an
23+
* Typically, we expect an update to affect a single row, meaning it is an
2424
* error if it affects multiple rows.
2525
*
2626
* @author Rod Johnson

spring-jdbc/src/main/java/org/springframework/jdbc/core/InterruptibleBatchPreparedStatementSetter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2012 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -22,7 +22,7 @@
2222
*
2323
* <p>This interface allows you to signal the end of a batch rather than
2424
* having to determine the exact batch size upfront. Batch size is still
25-
* being honored but it is now the maximum size of the batch.
25+
* being honored, but it is now the maximum size of the batch.
2626
*
2727
* <p>The {@link #isBatchExhausted} method is called after each call to
2828
* {@link #setValues} to determine whether there were some values added,

spring-jdbc/src/main/java/org/springframework/jdbc/object/RdbmsOperation.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2020 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -128,8 +128,8 @@ public void setFetchSize(int fetchSize) {
128128

129129
/**
130130
* Set the maximum number of rows for this RDBMS operation. This is important
131-
* for processing subsets of large result sets, avoiding to read and hold
132-
* the entire result set in the database or in the JDBC driver.
131+
* for processing subsets of large result sets, in order to avoid reading and
132+
* holding the entire result set in the database or in the JDBC driver.
133133
* <p>Default is -1, indicating to use the driver's default.
134134
* @see org.springframework.jdbc.core.JdbcTemplate#setMaxRows
135135
*/
@@ -175,7 +175,7 @@ public int getResultSetType() {
175175
public void setUpdatableResults(boolean updatableResults) {
176176
if (isCompiled()) {
177177
throw new InvalidDataAccessApiUsageException(
178-
"The updateableResults flag must be set before the operation is compiled");
178+
"The updatableResults flag must be set before the operation is compiled");
179179
}
180180
this.updatableResults = updatableResults;
181181
}

spring-jdbc/src/main/java/org/springframework/jdbc/object/StoredProcedure.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2021 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -29,7 +29,7 @@
2929

3030
/**
3131
* Superclass for object abstractions of RDBMS stored procedures.
32-
* This class is abstract and it is intended that subclasses will provide a typed
32+
* This class is abstract, and it is intended that subclasses will provide a typed
3333
* method for invocation that delegates to the supplied {@link #execute} method.
3434
*
3535
* <p>The inherited {@link #setSql sql} property is the name of the stored procedure

spring-jdbc/src/main/java/org/springframework/jdbc/support/CustomSQLExceptionTranslatorRegistry.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2019 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -25,9 +25,9 @@
2525
import org.springframework.lang.Nullable;
2626

2727
/**
28-
* Registry for custom {@link org.springframework.jdbc.support.SQLExceptionTranslator} instances associated with
29-
* specific databases allowing for overriding translation based on values contained in the configuration file
30-
* named "sql-error-codes.xml".
28+
* Registry for custom {@link SQLExceptionTranslator} instances associated with
29+
* specific databases allowing for overriding translation based on values
30+
* contained in the configuration file named "sql-error-codes.xml".
3131
*
3232
* @author Thomas Risberg
3333
* @since 3.1.1
@@ -38,7 +38,7 @@ public final class CustomSQLExceptionTranslatorRegistry {
3838
private static final Log logger = LogFactory.getLog(CustomSQLExceptionTranslatorRegistry.class);
3939

4040
/**
41-
* Keep track of a single instance so we can return it to classes that request it.
41+
* Keep track of a single instance, so we can return it to classes that request it.
4242
*/
4343
private static final CustomSQLExceptionTranslatorRegistry instance = new CustomSQLExceptionTranslatorRegistry();
4444

spring-jdbc/src/main/java/org/springframework/jdbc/support/JdbcUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2023 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -219,7 +219,7 @@ else if (obj instanceof Number number) {
219219
return NumberUtils.convertNumberToTargetClass(number, Integer.class);
220220
}
221221
else {
222-
// e.g. on Postgres: getObject returns a PGObject but we need a String
222+
// e.g. on Postgres: getObject returns a PGObject, but we need a String
223223
return rs.getString(index);
224224
}
225225
}

spring-jdbc/src/main/java/org/springframework/jdbc/support/SQLErrorCodesFactory.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2022 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -67,7 +67,7 @@ public class SQLErrorCodesFactory {
6767
private static final Log logger = LogFactory.getLog(SQLErrorCodesFactory.class);
6868

6969
/**
70-
* Keep track of a single instance so we can return it to classes that request it.
70+
* Keep track of a single instance, so we can return it to classes that request it.
7171
* Lazily initialized in order to avoid making {@code SQLErrorCodesFactory} constructor
7272
* reachable on native images when not needed.
7373
*/

spring-tx/src/main/java/org/springframework/dao/IncorrectUpdateSemanticsDataAccessException.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2012 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -44,10 +44,11 @@ public IncorrectUpdateSemanticsDataAccessException(String msg, Throwable cause)
4444
super(msg, cause);
4545
}
4646

47+
4748
/**
4849
* Return whether data was updated.
49-
* If this method returns false, there's nothing to roll back.
50-
* <p>The default implementation always returns true.
50+
* If this method returns {@code false}, there is nothing to roll back.
51+
* <p>The default implementation always returns {@code true}.
5152
* This can be overridden in subclasses.
5253
*/
5354
public boolean wasDataUpdated() {

0 commit comments

Comments
 (0)