Skip to content

Commit

Permalink
Fix [serial] compiler warnings
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
philwebb authored and cbeams committed Dec 28, 2012
1 parent 7f0aa5c commit b098604
Show file tree
Hide file tree
Showing 550 changed files with 705 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
* @author Juergen Hoeller
* @since 2.0
*/
@SuppressWarnings("serial")
public class AopInvocationException extends NestedRuntimeException {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
*
* @author Rod Johnson
*/
@SuppressWarnings("serial")
class TrueClassFilter implements ClassFilter, Serializable {

public static final TrueClassFilter INSTANCE = new TrueClassFilter();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
*
* @author Rod Johnson
*/
@SuppressWarnings("serial")
class TrueMethodMatcher implements MethodMatcher, Serializable {

public static final TrueMethodMatcher INSTANCE = new TrueMethodMatcher();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
*
* @author Rod Johnson
*/
@SuppressWarnings("serial")
class TruePointcut implements Pointcut, Serializable {

public static final TruePointcut INSTANCE = new TruePointcut();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -790,6 +790,7 @@ public PointcutBody(int tokens, String text) {
* Thrown in response to an ambiguous binding being detected when
* trying to resolve a method's parameter names.
*/
@SuppressWarnings("serial")
public static class AmbiguousBindingException extends RuntimeException {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
* @author Dave Syer
* @since 2.0
*/
@SuppressWarnings("serial")
public class AspectJExpressionPointcut extends AbstractExpressionPointcut
implements ClassFilter, IntroductionAwareMethodMatcher, BeanFactoryAware {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
* @author Rob Harrop
* @since 2.0
*/
@SuppressWarnings("serial")
public class AspectJExpressionPointcutAdvisor extends AbstractGenericPointcutAdvisor {

private final AspectJExpressionPointcut pointcut = new AspectJExpressionPointcut();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
* @since 2.0
* @see org.springframework.aop.aspectj.annotation.AspectJAdvisorFactory
*/
@SuppressWarnings("serial")
public class AnnotationAwareAspectJAutoProxyCreator extends AspectJAwareAdvisorAutoProxyCreator {

private List<Pattern> includePatterns;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
* @see #getProxy(ClassLoader)
* @see org.springframework.aop.framework.ProxyFactory
*/
@SuppressWarnings("serial")
public class AspectJProxyFactory extends ProxyCreatorSupport {

/** Cache for singleton aspect instances */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
* @author Rod Johnson
* @since 2.0
*/
@SuppressWarnings("serial")
public class NotAnAtAspectException extends AopConfigException {

private Class<?> nonAspectClass;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
* @author Ramnivas Laddad
* @since 2.0
*/
@SuppressWarnings("serial")
public class AspectJAwareAdvisorAutoProxyCreator extends AbstractAdvisorAutoProxyCreator {

private static final Comparator DEFAULT_PRECEDENCE_COMPARATOR = new AspectJPrecedenceComparator();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
* @author Juergen Hoeller
* @since 3.2
*/
@SuppressWarnings("serial")
public abstract class AbstractAdvisingBeanPostProcessor extends ProxyConfig
implements BeanPostProcessor, BeanClassLoaderAware, Ordered {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
* @author Rod Johnson
* @since 13.03.2003
*/
@SuppressWarnings("serial")
public class AopConfigException extends NestedRuntimeException {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
* @author Adrian Colyer
* @since 2.0.3
*/
@SuppressWarnings("serial")
public class DefaultAdvisorChainFactory implements AdvisorChainFactory, Serializable {

public List<Object> getInterceptorsAndDynamicInterceptionAdvice(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
* @see AdvisedSupport#setProxyTargetClass
* @see AdvisedSupport#setInterfaces
*/
@SuppressWarnings("serial")
public class DefaultAopProxyFactory implements AopProxyFactory, Serializable {


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
* @since 2.0.3
* @see #createAopProxy()
*/
@SuppressWarnings("serial")
public class ProxyCreatorSupport extends AdvisedSupport {

private AopProxyFactory aopProxyFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
* @author Rob Harrop
* @since 14.03.2003
*/
@SuppressWarnings("serial")
public class ProxyFactory extends ProxyCreatorSupport {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
* @see org.springframework.aop.Advisor
* @see Advised
*/
@SuppressWarnings("serial")
public class ProxyFactoryBean extends ProxyCreatorSupport
implements FactoryBean<Object>, BeanClassLoaderAware, BeanFactoryAware {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
* @author Rod Johnson
* @author Juergen Hoeller
*/
@SuppressWarnings("serial")
class AfterReturningAdviceAdapter implements AdvisorAdapter, Serializable {

public boolean supportsAdvice(Advice advice) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
*
* @author Rod Johnson
*/
@SuppressWarnings("serial")
public class AfterReturningAdviceInterceptor implements MethodInterceptor, AfterAdvice, Serializable {

private final AfterReturningAdvice advice;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
* @author Rob Harrop
* @author Juergen Hoeller
*/
@SuppressWarnings("serial")
public class DefaultAdvisorAdapterRegistry implements AdvisorAdapterRegistry, Serializable {

private final List<AdvisorAdapter> adapters = new ArrayList<AdvisorAdapter>(3);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
* @author Rod Johnson
* @author Juergen Hoeller
*/
@SuppressWarnings("serial")
class MethodBeforeAdviceAdapter implements AdvisorAdapter, Serializable {

public boolean supportsAdvice(Advice advice) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
*
* @author Rod Johnson
*/
@SuppressWarnings("serial")
public class MethodBeforeAdviceInterceptor implements MethodInterceptor, Serializable {

private MethodBeforeAdvice advice;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
* @author Rod Johnson
* @author Juergen Hoeller
*/
@SuppressWarnings("serial")
class ThrowsAdviceAdapter implements AdvisorAdapter, Serializable {

public boolean supportsAdvice(Advice advice) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
* @see org.aopalliance.aop.Advice
* @see org.springframework.aop.Advisor
*/
@SuppressWarnings("serial")
public class UnknownAdviceTypeException extends IllegalArgumentException {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
* @author Juergen Hoeller
* @see #findCandidateAdvisors
*/
@SuppressWarnings("serial")
public abstract class AbstractAdvisorAutoProxyCreator extends AbstractAutoProxyCreator {

private BeanFactoryAdvisorRetrievalHelper advisorRetrievalHelper;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
* @see BeanNameAutoProxyCreator
* @see DefaultAdvisorAutoProxyCreator
*/
@SuppressWarnings("serial")
public abstract class AbstractAutoProxyCreator extends ProxyConfig
implements SmartInstantiationAwareBeanPostProcessor, BeanClassLoaderAware, BeanFactoryAware,
Ordered, AopInfrastructureBean {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
* @see #setInterceptorNames
* @see AbstractAutoProxyCreator
*/
@SuppressWarnings("serial")
public class BeanNameAutoProxyCreator extends AbstractAutoProxyCreator {

private List<String> beanNames;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
* @author Rod Johnson
* @author Rob Harrop
*/
@SuppressWarnings("serial")
public class DefaultAdvisorAutoProxyCreator extends AbstractAdvisorAutoProxyCreator implements BeanNameAware {

/** Separator between prefix and remainder of bean name */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
* @author Juergen Hoeller
* @since 2.0.7
*/
@SuppressWarnings("serial")
public class InfrastructureAdvisorAutoProxyCreator extends AbstractAdvisorAutoProxyCreator {

private ConfigurableListableBeanFactory beanFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
* @see #setSuffix
* @see #createInvocationTraceName
*/
@SuppressWarnings("serial")
public abstract class AbstractMonitoringInterceptor extends AbstractTraceInterceptor {

private String prefix = "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
* @see #setUseDynamicLogger
* @see #invokeUnderTrace(org.aopalliance.intercept.MethodInvocation, org.apache.commons.logging.Log)
*/
@SuppressWarnings("serial")
public abstract class AbstractTraceInterceptor implements MethodInterceptor, Serializable {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
* @since 11.02.2004
* @see #setConcurrencyLimit
*/
@SuppressWarnings("serial")
public class ConcurrencyThrottleInterceptor extends ConcurrencyThrottleSupport
implements MethodInterceptor, Serializable {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
* @see #setExceptionMessage
* @see SimpleTraceInterceptor
*/
@SuppressWarnings("serial")
public class CustomizableTraceInterceptor extends AbstractTraceInterceptor {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
* @see SimpleTraceInterceptor
* @see CustomizableTraceInterceptor
*/
@SuppressWarnings("serial")
public class DebugInterceptor extends SimpleTraceInterceptor {

private volatile long count;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ public Object invoke(MethodInvocation mi) throws Throwable {
/**
* Introduction that exposes the specified bean name as invocation attribute.
*/
@SuppressWarnings("serial")
private static class ExposeBeanNameIntroduction extends DelegatingIntroductionInterceptor implements NamedBean {

private final String beanName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
* @author Rod Johnson
* @author Juergen Hoeller
*/
@SuppressWarnings("serial")
public class ExposeInvocationInterceptor implements MethodInterceptor, Ordered, Serializable {

/** Singleton instance of this class */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
* @see com.jamonapi.MonitorFactory
* @see PerformanceMonitorInterceptor
*/
@SuppressWarnings("serial")
public class JamonPerformanceMonitorInterceptor extends AbstractMonitoringInterceptor {

private boolean trackAllInvocations = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
* @see org.springframework.util.StopWatch
* @see JamonPerformanceMonitorInterceptor
*/
@SuppressWarnings("serial")
public class PerformanceMonitorInterceptor extends AbstractMonitoringInterceptor {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
* @since 1.2
* @see CustomizableTraceInterceptor
*/
@SuppressWarnings("serial")
public class SimpleTraceInterceptor extends AbstractTraceInterceptor {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
* @see org.springframework.beans.factory.BeanFactory#getBean
* @see org.springframework.beans.factory.config.ConfigurableBeanFactory#destroyScopedBean
*/
@SuppressWarnings("serial")
public class DefaultScopedObject implements ScopedObject, Serializable {

private final ConfigurableBeanFactory beanFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
* @since 2.0
* @see #setProxyTargetClass
*/
@SuppressWarnings("serial")
public class ScopedProxyFactoryBean extends ProxyConfig implements FactoryBean<Object>, BeanFactoryAware {

/** The TargetSource that manages scoping */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
* @see #setAdviceBeanName
* @see DefaultBeanFactoryPointcutAdvisor
*/
@SuppressWarnings("serial")
public abstract class AbstractBeanFactoryPointcutAdvisor extends AbstractPointcutAdvisor implements BeanFactoryAware {

private String adviceBeanName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
* @see #setLocation
* @see #setExpression
*/
@SuppressWarnings("serial")
public abstract class AbstractExpressionPointcut implements ExpressionPointcut, Serializable {

private String location;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
* @see #setAdvice
* @see DefaultPointcutAdvisor
*/
@SuppressWarnings("serial")
public abstract class AbstractGenericPointcutAdvisor extends AbstractPointcutAdvisor {

private Advice advice;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
* @since 1.1.2
* @see AbstractGenericPointcutAdvisor
*/
@SuppressWarnings("serial")
public abstract class AbstractPointcutAdvisor implements PointcutAdvisor, Ordered, Serializable {

private Integer order;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
* @since 1.1
* @see JdkRegexpMethodPointcut
*/
@SuppressWarnings("serial")
public abstract class AbstractRegexpMethodPointcut extends StaticMethodMatcherPointcut
implements Serializable {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ public static ClassFilter intersection(ClassFilter[] classFilters) {
/**
* ClassFilter implementation for a union of the given ClassFilters.
*/
@SuppressWarnings("serial")
private static class UnionClassFilter implements ClassFilter, Serializable {

private ClassFilter[] filters;
Expand Down Expand Up @@ -120,6 +121,7 @@ public int hashCode() {
/**
* ClassFilter implementation for an intersection of the given ClassFilters.
*/
@SuppressWarnings("serial")
private static class IntersectionClassFilter implements ClassFilter, Serializable {

private ClassFilter[] filters;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
* @author Rob Harrop
* @see org.springframework.core.ControlFlow
*/
@SuppressWarnings("serial")
public class ControlFlowPointcut implements Pointcut, ClassFilter, MethodMatcher, Serializable {

private Class clazz;
Expand Down
Loading

0 comments on commit b098604

Please sign in to comment.