Fix [serial] compiler warnings
Fix serialization warnings by applying @SuppressWarnings("serial")
when appropriate.
In certain cases and for unknown reasons, a correctly-placed
@SuppressWarnings("serial") annotation will fix the warning at the
javac level (i.e. the Gradle command-line), but will produce an
"unnecessary @SuppressWarnings" warning within Eclipse. In these
cases, a private static final serialVersionUID field has been added
with the default value of 1L.
This commit is contained in:
committed by
Chris Beams
parent
7f0aa5cfb2
commit
b0986049a3
@@ -31,6 +31,7 @@ import org.springframework.dao.InvalidDataAccessResourceUsageException;
|
||||
* @author Rod Johnson
|
||||
* @see InvalidResultSetAccessException
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class BadSqlGrammarException extends InvalidDataAccessResourceUsageException {
|
||||
|
||||
private String sql;
|
||||
|
||||
@@ -25,6 +25,7 @@ import org.springframework.dao.DataAccessResourceFailureException;
|
||||
*
|
||||
* @author Rod Johnson
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class CannotGetJdbcConnectionException extends DataAccessResourceFailureException {
|
||||
|
||||
/**
|
||||
|
||||
@@ -26,6 +26,7 @@ import org.springframework.dao.DataRetrievalFailureException;
|
||||
* @since 2.0
|
||||
* @see org.springframework.dao.IncorrectResultSizeDataAccessException
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class IncorrectResultSetColumnCountException extends DataRetrievalFailureException {
|
||||
|
||||
private int expectedCount;
|
||||
|
||||
@@ -32,6 +32,7 @@ import org.springframework.dao.InvalidDataAccessResourceUsageException;
|
||||
* @see BadSqlGrammarException
|
||||
* @see org.springframework.jdbc.support.rowset.SqlRowSet
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class InvalidResultSetAccessException extends InvalidDataAccessResourceUsageException {
|
||||
|
||||
private String sql;
|
||||
|
||||
@@ -26,6 +26,7 @@ import org.springframework.dao.IncorrectUpdateSemanticsDataAccessException;
|
||||
* @author Rod Johnson
|
||||
* @author Juergen Hoeller
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class JdbcUpdateAffectedIncorrectNumberOfRowsException extends IncorrectUpdateSemanticsDataAccessException {
|
||||
|
||||
/** Number of rows that should have been affected */
|
||||
|
||||
@@ -26,6 +26,7 @@ import org.springframework.dao.DataRetrievalFailureException;
|
||||
* @author Juergen Hoeller
|
||||
* @since 1.0.2
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class LobRetrievalFailureException extends DataRetrievalFailureException {
|
||||
|
||||
/**
|
||||
|
||||
@@ -32,6 +32,7 @@ import org.springframework.dao.UncategorizedDataAccessException;
|
||||
* @author Juergen Hoeller
|
||||
* @see org.springframework.jdbc.core.JdbcTemplate#setIgnoreWarnings
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class SQLWarningException extends UncategorizedDataAccessException {
|
||||
|
||||
/**
|
||||
|
||||
@@ -27,6 +27,7 @@ import org.springframework.dao.UncategorizedDataAccessException;
|
||||
* @author Rod Johnson
|
||||
* @author Juergen Hoeller
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class UncategorizedSQLException extends UncategorizedDataAccessException {
|
||||
|
||||
/** SQL that led to the problem */
|
||||
|
||||
@@ -70,6 +70,7 @@ public class NamedParameterJdbcTemplate implements NamedParameterJdbcOperations
|
||||
private volatile int cacheLimit = DEFAULT_CACHE_LIMIT;
|
||||
|
||||
/** Cache of original SQL String to ParsedSql representation */
|
||||
@SuppressWarnings("serial")
|
||||
private final Map<String, ParsedSql> parsedSqlCache =
|
||||
new LinkedHashMap<String, ParsedSql>(DEFAULT_CACHE_LIMIT, 0.75f, true) {
|
||||
@Override
|
||||
|
||||
@@ -99,6 +99,7 @@ import org.springframework.transaction.support.TransactionSynchronizationManager
|
||||
* @see LazyConnectionDataSourceProxy
|
||||
* @see org.springframework.jdbc.core.JdbcTemplate
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class DataSourceTransactionManager extends AbstractPlatformTransactionManager
|
||||
implements ResourceTransactionManager, InitializingBean {
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ import org.springframework.dao.NonTransientDataAccessException;
|
||||
* @author Juergen Hoeller
|
||||
* @since 2.0
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class DataSourceLookupFailureException extends NonTransientDataAccessException {
|
||||
|
||||
/**
|
||||
|
||||
@@ -28,6 +28,7 @@ import org.springframework.core.NestedCheckedException;
|
||||
* @author Thomas Risberg
|
||||
* @since 1.0.1
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class MetaDataAccessException extends NestedCheckedException {
|
||||
|
||||
/**
|
||||
|
||||
@@ -25,6 +25,7 @@ import org.springframework.dao.InvalidDataAccessApiUsageException;
|
||||
* @author Thomas Risberg
|
||||
* @since 2.5.5
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class SqlXmlFeatureNotImplementedException extends InvalidDataAccessApiUsageException {
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user