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
@@ -21,6 +21,7 @@ import org.springframework.core.enums.ShortCodedLabeledEnum;
|
||||
/**
|
||||
* @author Rob Harrop
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class Colour extends ShortCodedLabeledEnum {
|
||||
|
||||
public static final Colour RED = new Colour(0, "RED");
|
||||
@@ -32,4 +33,4 @@ public class Colour extends ShortCodedLabeledEnum {
|
||||
super(code, label);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -651,6 +651,7 @@ public class DataSourceJtaTransactionTests extends TestCase {
|
||||
MockControl conControl = MockControl.createControl(Connection.class);
|
||||
Connection con = (Connection) conControl.getMock();
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
JtaTransactionManager ptm = new JtaTransactionManager(ut) {
|
||||
protected void doRegisterAfterCompletionWithJtaTransaction(
|
||||
JtaTransactionObject txObject, final List synchronizations) {
|
||||
|
||||
@@ -1047,6 +1047,7 @@ public class StoredProcedureTests extends AbstractJdbcTests {
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
private static class CustomDataException extends DataAccessException {
|
||||
|
||||
public CustomDataException(String s) {
|
||||
|
||||
@@ -100,6 +100,7 @@ public class SQLErrorCodeSQLExceptionTranslatorTests extends TestCase {
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public void testCustomTranslateMethodTranslation() {
|
||||
final String TASK = "TASK";
|
||||
final String SQL = "SQL SELECT *";
|
||||
|
||||
Reference in New Issue
Block a user