Supress serialization warnings

This commit is contained in:
Dave Syer
2011-03-25 12:44:41 +00:00
parent 4bd297691e
commit a97db67845
14 changed files with 14 additions and 0 deletions

View File

@@ -132,6 +132,7 @@ public class SubclassClassifier<T, C> implements Classifier<T, C> {
* @author Dave Syer
*
*/
@SuppressWarnings("serial")
private static class ClassComparator implements Comparator<Class<?>>, Serializable {
/**
* @return 1 if arg0 is assignable from arg1, -1 otherwise

View File

@@ -16,6 +16,7 @@
package org.springframework.retry;
@SuppressWarnings("serial")
public class ExhaustedRetryException extends RetryException {
public ExhaustedRetryException(String msg, Throwable cause) {

View File

@@ -18,6 +18,7 @@ package org.springframework.retry;
import org.springframework.core.NestedRuntimeException;
@SuppressWarnings("serial")
public class RetryException extends NestedRuntimeException {
public RetryException(String msg, Throwable cause) {

View File

@@ -16,6 +16,7 @@
package org.springframework.retry;
@SuppressWarnings("serial")
public class TerminatedRetryException extends RetryException {
public TerminatedRetryException(String msg, Throwable cause) {

View File

@@ -26,6 +26,7 @@ import org.springframework.retry.RetryException;
* @author Rob Harrop
* @since 2.1
*/
@SuppressWarnings("serial")
public class BackOffInterruptedException extends RetryException {
public BackOffInterruptedException(String msg) {

View File

@@ -20,6 +20,7 @@ import org.springframework.core.AttributeAccessorSupport;
import org.springframework.retry.RetryContext;
import org.springframework.retry.RetryPolicy;
@SuppressWarnings("serial")
public class RetryContextSupport extends AttributeAccessorSupport implements RetryContext {
private boolean terminate = false;

View File

@@ -117,6 +117,7 @@ public class CompositeRetryPolicy implements RetryPolicy {
((RetryContextSupport) context).registerThrowable(throwable);
}
@SuppressWarnings("serial")
private class CompositeRetryContext extends RetryContextSupport {
RetryContext[] contexts;

View File

@@ -105,6 +105,7 @@ public class ExceptionClassifierRetryPolicy implements RetryPolicy {
((RetryContextSupport) context).registerThrowable(throwable);
}
@SuppressWarnings("serial")
private static class ExceptionClassifierRetryContext extends RetryContextSupport implements RetryPolicy {
final private Classifier<Throwable, RetryPolicy> exceptionClassifier;

View File

@@ -80,6 +80,7 @@ public class NeverRetryPolicy implements RetryPolicy {
* @author Dave Syer
*
*/
@SuppressWarnings("serial")
private static class NeverRetryContext extends RetryContextSupport {
private boolean finished = false;

View File

@@ -28,6 +28,7 @@ import org.springframework.retry.RetryException;
* @author Dave Syer
*
*/
@SuppressWarnings("serial")
public class RetryCacheCapacityExceededException extends RetryException {
/**

View File

@@ -133,6 +133,7 @@ public class SimpleRetryPolicy implements RetryPolicy {
return new SimpleRetryContext(parent);
}
@SuppressWarnings("serial")
private static class SimpleRetryContext extends RetryContextSupport {
public SimpleRetryContext(RetryContext parent) {
super(parent);

View File

@@ -75,6 +75,7 @@ public class TimeoutRetryPolicy implements RetryPolicy {
// otherwise no-op - we only time out, otherwise retry everything...
}
@SuppressWarnings("serial")
private static class TimeoutRetryContext extends RetryContextSupport {
private long timeout;

View File

@@ -71,6 +71,7 @@ public class SubclassExceptionClassifierTests {
assertEquals(classifier.getDefault(), classifier.classify(new RuntimeException("Foo")));
}
@SuppressWarnings("serial")
@Test
public void testClassifyAncestorMatch() {
classifier.setTypeMap(new HashMap<Class<? extends Throwable>, String>() {

View File

@@ -8,6 +8,7 @@ import org.springframework.transaction.support.AbstractPlatformTransactionManage
import org.springframework.transaction.support.DefaultTransactionStatus;
import org.springframework.transaction.support.TransactionSynchronizationManager;
@SuppressWarnings("serial")
public class ResourcelessTransactionManager extends AbstractPlatformTransactionManager {
protected void doBegin(Object transaction, TransactionDefinition definition) throws TransactionException {