@@ -90,7 +90,7 @@ public SQLErrorCodeSQLExceptionTranslator() {
90
90
* Create a SQL error code translator for the given DataSource.
91
91
* Invoking this constructor will cause a Connection to be obtained
92
92
* from the DataSource to get the meta-data.
93
- * @param dataSource DataSource to use to find meta-data and establish
93
+ * @param dataSource the DataSource to use to find meta-data and establish
94
94
* which error codes are usable
95
95
* @see SQLErrorCodesFactory
96
96
*/
@@ -127,7 +127,7 @@ public SQLErrorCodeSQLExceptionTranslator(SQLErrorCodes sec) {
127
127
* Set the DataSource for this translator.
128
128
* <p>Setting this property will cause a Connection to be obtained from
129
129
* the DataSource to get the meta-data.
130
- * @param dataSource DataSource to use to find meta-data and establish
130
+ * @param dataSource the DataSource to use to find meta-data and establish
131
131
* which error codes are usable
132
132
* @see SQLErrorCodesFactory#getErrorCodes(javax.sql.DataSource)
133
133
* @see java.sql.DatabaseMetaData#getDatabaseProductName()
@@ -180,9 +180,9 @@ protected DataAccessException doTranslate(String task, @Nullable String sql, SQL
180
180
}
181
181
182
182
// First, try custom translation from overridden method.
183
- DataAccessException dex = customTranslate (task , sql , sqlEx );
184
- if (dex != null ) {
185
- return dex ;
183
+ DataAccessException dae = customTranslate (task , sql , sqlEx );
184
+ if (dae != null ) {
185
+ return dae ;
186
186
}
187
187
188
188
// Next, try the custom SQLException translator, if available.
@@ -288,32 +288,32 @@ else if (Arrays.binarySearch(this.sqlErrorCodes.getCannotSerializeTransactionCod
288
288
}
289
289
290
290
/**
291
- * Subclasses can override this method to attempt a custom mapping from SQLException
292
- * to DataAccessException.
291
+ * Subclasses can override this method to attempt a custom mapping from
292
+ * {@link SQLException} to {@link DataAccessException} .
293
293
* @param task readable text describing the task being attempted
294
- * @param sql SQL query or update that caused the problem. May be {@code null}.
294
+ * @param sql the SQL query or update that caused the problem (may be {@code null})
295
295
* @param sqlEx the offending SQLException
296
- * @return null if no custom translation was possible , otherwise a DataAccessException
297
- * resulting from custom translation. This exception should include the sqlEx parameter
298
- * as a nested root cause. This implementation always returns null, meaning that
299
- * the translator always falls back to the default error codes.
296
+ * @return {@code null} if no custom translation applies , otherwise a {@link DataAccessException}
297
+ * resulting from custom translation. This exception should include the {@code sqlEx} parameter
298
+ * as a nested root cause. This implementation always returns {@code null} , meaning that the
299
+ * translator always falls back to the default error codes.
300
300
*/
301
301
@ Nullable
302
302
protected DataAccessException customTranslate (String task , @ Nullable String sql , SQLException sqlEx ) {
303
303
return null ;
304
304
}
305
305
306
306
/**
307
- * Create a custom DataAccessException, based on a given exception
308
- * class from a CustomSQLErrorCodesTranslation definition.
307
+ * Create a custom {@link DataAccessException} , based on a given exception
308
+ * class from a {@link CustomSQLErrorCodesTranslation} definition.
309
309
* @param task readable text describing the task being attempted
310
- * @param sql SQL query or update that caused the problem. May be {@code null}.
310
+ * @param sql the SQL query or update that caused the problem (may be {@code null})
311
311
* @param sqlEx the offending SQLException
312
312
* @param exceptionClass the exception class to use, as defined in the
313
- * CustomSQLErrorCodesTranslation definition
314
- * @return null if the custom exception could not be created, otherwise
315
- * the resulting DataAccessException. This exception should include the
316
- * sqlEx parameter as a nested root cause.
313
+ * {@link CustomSQLErrorCodesTranslation} definition
314
+ * @return {@code null} if the custom exception could not be created, otherwise
315
+ * the resulting {@link DataAccessException} . This exception should include the
316
+ * {@code sqlEx} parameter as a nested root cause.
317
317
* @see CustomSQLErrorCodesTranslation#setExceptionClass
318
318
*/
319
319
@ Nullable
0 commit comments