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:
Phillip Webb
2012-12-19 14:35:57 -08:00
committed by Chris Beams
parent 7f0aa5cfb2
commit b0986049a3
550 changed files with 705 additions and 36 deletions

View File

@@ -31,6 +31,7 @@ import org.springframework.util.Assert;
* @author Juergen Hoeller
* @since 3.1.2
*/
@SuppressWarnings("serial")
class ConfigurableJtaPlatform extends AbstractJtaPlatform {
private final TransactionManager transactionManager;

View File

@@ -30,6 +30,7 @@ import org.springframework.dao.UncategorizedDataAccessException;
* @since 3.1
* @see SessionFactoryUtils#convertHibernateAccessException
*/
@SuppressWarnings("serial")
public class HibernateJdbcException extends UncategorizedDataAccessException {
public HibernateJdbcException(JDBCException ex) {

View File

@@ -29,6 +29,7 @@ import org.springframework.orm.ObjectRetrievalFailureException;
* @since 3.1
* @see SessionFactoryUtils#convertHibernateAccessException
*/
@SuppressWarnings("serial")
public class HibernateObjectRetrievalFailureException extends ObjectRetrievalFailureException {
public HibernateObjectRetrievalFailureException(UnresolvableObjectException ex) {

View File

@@ -29,6 +29,7 @@ import org.springframework.orm.ObjectOptimisticLockingFailureException;
* @since 3.1
* @see SessionFactoryUtils#convertHibernateAccessException
*/
@SuppressWarnings("serial")
public class HibernateOptimisticLockingFailureException extends ObjectOptimisticLockingFailureException {
public HibernateOptimisticLockingFailureException(StaleObjectStateException ex) {

View File

@@ -28,6 +28,7 @@ import org.springframework.dao.InvalidDataAccessResourceUsageException;
* @since 3.1
* @see SessionFactoryUtils#convertHibernateAccessException
*/
@SuppressWarnings("serial")
public class HibernateQueryException extends InvalidDataAccessResourceUsageException {
public HibernateQueryException(QueryException ex) {

View File

@@ -29,6 +29,7 @@ import org.springframework.dao.UncategorizedDataAccessException;
* @since 3.1
* @see SessionFactoryUtils#convertHibernateAccessException
*/
@SuppressWarnings("serial")
public class HibernateSystemException extends UncategorizedDataAccessException {
/**

View File

@@ -30,6 +30,7 @@ import org.springframework.transaction.support.TransactionSynchronizationManager
* @author Juergen Hoeller
* @since 3.1
*/
@SuppressWarnings("serial")
public class SpringJtaSessionContext extends JTASessionContext {
public SpringJtaSessionContext(SessionFactoryImplementor factory) {