Merge branch 'SPR-9431' into cleanup-3.2.x

* SPR-9431:
  Update -Xlint compiler warning output
  Fix various compiler warnings in spring-context
  Fix "unnecessary @SuppressWarnings" warnings
  Fix [rawtypes] compiler warnings
  Fix [dep-ann] warnings with @Deprecated
  Fix [cast] compiler warnings
  Fix [serial] compiler warnings
  Fix [varargs] compiler warnings
  Fix warnings due to unused import statements
This commit is contained in:
Chris Beams 2012-12-28 22:56:04 +01:00
commit aa824641ab
748 changed files with 1174 additions and 640 deletions

View File

@ -35,7 +35,26 @@ configure(allprojects) {
sourceCompatibility=1.5
targetCompatibility=1.5
[compileJava, compileTestJava]*.options*.compilerArgs = ["-Xlint:none"]
[compileJava, compileTestJava]*.options*.compilerArgs = [
"-Xlint:serial",
"-Xlint:varargs",
"-Xlint:cast",
"-Xlint:classfile",
"-Xlint:dep-ann",
"-Xlint:divzero",
"-Xlint:empty",
"-Xlint:finally",
"-Xlint:overrides",
"-Xlint:path",
"-Xlint:processing",
"-Xlint:static",
"-Xlint:try",
"-Xlint:-options", // intentionally disabled
"-Xlint:-fallthrough", // intentionally disabled
"-Xlint:-rawtypes", // TODO enable and fix warnings
"-Xlint:-deprecation", // TODO enable and fix warnings
"-Xlint:-unchecked" // TODO enable and fix warnings
]
sourceSets.test.resources.srcDirs = ["src/test/resources", "src/test/java"]

View File

@ -25,6 +25,7 @@ import org.springframework.core.NestedRuntimeException;
* @author Juergen Hoeller
* @since 2.0
*/
@SuppressWarnings("serial")
public class AopInvocationException extends NestedRuntimeException {
/**

View File

@ -23,6 +23,7 @@ import java.io.Serializable;
*
* @author Rod Johnson
*/
@SuppressWarnings("serial")
class TrueClassFilter implements ClassFilter, Serializable {
public static final TrueClassFilter INSTANCE = new TrueClassFilter();

View File

@ -24,6 +24,7 @@ import java.lang.reflect.Method;
*
* @author Rod Johnson
*/
@SuppressWarnings("serial")
class TrueMethodMatcher implements MethodMatcher, Serializable {
public static final TrueMethodMatcher INSTANCE = new TrueMethodMatcher();

View File

@ -23,6 +23,7 @@ import java.io.Serializable;
*
* @author Rod Johnson
*/
@SuppressWarnings("serial")
class TruePointcut implements Pointcut, Serializable {
public static final TruePointcut INSTANCE = new TruePointcut();

View File

@ -700,7 +700,7 @@ public class AspectJAdviceParameterNameDiscoverer implements ParameterNameDiscov
// 1 primitive arg, and one candidate...
for (int i = 0; i < this.argumentTypes.length; i++) {
if (isUnbound(i) && this.argumentTypes[i].isPrimitive()) {
bindParameterName(i, (String) varNames.get(0));
bindParameterName(i, varNames.get(0));
break;
}
}
@ -790,6 +790,7 @@ public class AspectJAdviceParameterNameDiscoverer implements ParameterNameDiscov
* 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 {
/**

View File

@ -76,6 +76,7 @@ import org.springframework.util.StringUtils;
* @author Dave Syer
* @since 2.0
*/
@SuppressWarnings("serial")
public class AspectJExpressionPointcut extends AbstractExpressionPointcut
implements ClassFilter, IntroductionAwareMethodMatcher, BeanFactoryAware {

View File

@ -25,6 +25,7 @@ import org.springframework.aop.support.AbstractGenericPointcutAdvisor;
* @author Rob Harrop
* @since 2.0
*/
@SuppressWarnings("serial")
public class AspectJExpressionPointcutAdvisor extends AbstractGenericPointcutAdvisor {
private final AspectJExpressionPointcut pointcut = new AspectJExpressionPointcut();

View File

@ -45,6 +45,7 @@ import org.springframework.util.Assert;
* @since 2.0
* @see org.springframework.aop.aspectj.annotation.AspectJAdvisorFactory
*/
@SuppressWarnings("serial")
public class AnnotationAwareAspectJAutoProxyCreator extends AspectJAwareAdvisorAutoProxyCreator {
private List<Pattern> includePatterns;

View File

@ -46,6 +46,7 @@ import org.springframework.util.ClassUtils;
* @see #getProxy(ClassLoader)
* @see org.springframework.aop.framework.ProxyFactory
*/
@SuppressWarnings("serial")
public class AspectJProxyFactory extends ProxyCreatorSupport {
/** Cache for singleton aspect instances */

View File

@ -26,6 +26,7 @@ import org.springframework.aop.framework.AopConfigException;
* @author Rod Johnson
* @since 2.0
*/
@SuppressWarnings("serial")
public class NotAnAtAspectException extends AopConfigException {
private Class<?> nonAspectClass;

View File

@ -43,6 +43,7 @@ import org.springframework.util.ClassUtils;
* @author Ramnivas Laddad
* @since 2.0
*/
@SuppressWarnings("serial")
public class AspectJAwareAdvisorAutoProxyCreator extends AbstractAdvisorAutoProxyCreator {
private static final Comparator DEFAULT_PRECEDENCE_COMPARATOR = new AspectJPrecedenceComparator();
@ -76,7 +77,7 @@ public class AspectJAwareAdvisorAutoProxyCreator extends AbstractAdvisorAutoProx
// sort it
List<PartiallyComparableAdvisorHolder> sorted =
(List<PartiallyComparableAdvisorHolder>) PartialOrder.sort(partiallyComparableAdvisors);
PartialOrder.sort(partiallyComparableAdvisors);
if (sorted == null) {
// TODO: work harder to give a better error message here.
throw new IllegalArgumentException("Advice precedence circularity error");

View File

@ -33,6 +33,7 @@ import org.springframework.util.ClassUtils;
* @author Juergen Hoeller
* @since 3.2
*/
@SuppressWarnings("serial")
public abstract class AbstractAdvisingBeanPostProcessor extends ProxyConfig
implements BeanPostProcessor, BeanClassLoaderAware, Ordered {

View File

@ -24,6 +24,7 @@ import org.springframework.core.NestedRuntimeException;
* @author Rod Johnson
* @since 13.03.2003
*/
@SuppressWarnings("serial")
public class AopConfigException extends NestedRuntimeException {
/**

View File

@ -43,6 +43,7 @@ import org.springframework.aop.support.MethodMatchers;
* @author Adrian Colyer
* @since 2.0.3
*/
@SuppressWarnings("serial")
public class DefaultAdvisorChainFactory implements AdvisorChainFactory, Serializable {
public List<Object> getInterceptorsAndDynamicInterceptionAdvice(

View File

@ -45,6 +45,7 @@ import org.springframework.aop.SpringProxy;
* @see AdvisedSupport#setProxyTargetClass
* @see AdvisedSupport#setInterfaces
*/
@SuppressWarnings("serial")
public class DefaultAopProxyFactory implements AopProxyFactory, Serializable {

View File

@ -29,6 +29,7 @@ import org.springframework.util.Assert;
* @since 2.0.3
* @see #createAopProxy()
*/
@SuppressWarnings("serial")
public class ProxyCreatorSupport extends AdvisedSupport {
private AopProxyFactory aopProxyFactory;

View File

@ -32,6 +32,7 @@ import org.springframework.util.ClassUtils;
* @author Rob Harrop
* @since 14.03.2003
*/
@SuppressWarnings("serial")
public class ProxyFactory extends ProxyCreatorSupport {
/**

View File

@ -88,6 +88,7 @@ import org.springframework.util.ObjectUtils;
* @see org.springframework.aop.Advisor
* @see Advised
*/
@SuppressWarnings("serial")
public class ProxyFactoryBean extends ProxyCreatorSupport
implements FactoryBean<Object>, BeanClassLoaderAware, BeanFactoryAware {

View File

@ -31,6 +31,7 @@ import org.springframework.aop.AfterReturningAdvice;
* @author Rod Johnson
* @author Juergen Hoeller
*/
@SuppressWarnings("serial")
class AfterReturningAdviceAdapter implements AdvisorAdapter, Serializable {
public boolean supportsAdvice(Advice advice) {

View File

@ -32,6 +32,7 @@ import org.springframework.util.Assert;
*
* @author Rod Johnson
*/
@SuppressWarnings("serial")
public class AfterReturningAdviceInterceptor implements MethodInterceptor, AfterAdvice, Serializable {
private final AfterReturningAdvice advice;

View File

@ -37,6 +37,7 @@ import org.springframework.aop.support.DefaultPointcutAdvisor;
* @author Rob Harrop
* @author Juergen Hoeller
*/
@SuppressWarnings("serial")
public class DefaultAdvisorAdapterRegistry implements AdvisorAdapterRegistry, Serializable {
private final List<AdvisorAdapter> adapters = new ArrayList<AdvisorAdapter>(3);

View File

@ -31,6 +31,7 @@ import org.springframework.aop.MethodBeforeAdvice;
* @author Rod Johnson
* @author Juergen Hoeller
*/
@SuppressWarnings("serial")
class MethodBeforeAdviceAdapter implements AdvisorAdapter, Serializable {
public boolean supportsAdvice(Advice advice) {

View File

@ -31,6 +31,7 @@ import org.springframework.util.Assert;
*
* @author Rod Johnson
*/
@SuppressWarnings("serial")
public class MethodBeforeAdviceInterceptor implements MethodInterceptor, Serializable {
private MethodBeforeAdvice advice;

View File

@ -31,6 +31,7 @@ import org.springframework.aop.ThrowsAdvice;
* @author Rod Johnson
* @author Juergen Hoeller
*/
@SuppressWarnings("serial")
class ThrowsAdviceAdapter implements AdvisorAdapter, Serializable {
public boolean supportsAdvice(Advice advice) {

View File

@ -25,6 +25,7 @@ package org.springframework.aop.framework.adapter;
* @see org.aopalliance.aop.Advice
* @see org.springframework.aop.Advisor
*/
@SuppressWarnings("serial")
public class UnknownAdviceTypeException extends IllegalArgumentException {
/**

View File

@ -44,6 +44,7 @@ import org.springframework.core.OrderComparator;
* @author Juergen Hoeller
* @see #findCandidateAdvisors
*/
@SuppressWarnings("serial")
public abstract class AbstractAdvisorAutoProxyCreator extends AbstractAutoProxyCreator {
private BeanFactoryAdvisorRetrievalHelper advisorRetrievalHelper;

View File

@ -87,6 +87,7 @@ import org.springframework.util.ClassUtils;
* @see BeanNameAutoProxyCreator
* @see DefaultAdvisorAutoProxyCreator
*/
@SuppressWarnings("serial")
public abstract class AbstractAutoProxyCreator extends ProxyConfig
implements SmartInstantiationAwareBeanPostProcessor, BeanClassLoaderAware, BeanFactoryAware,
Ordered, AopInfrastructureBean {

View File

@ -42,6 +42,7 @@ import org.springframework.util.StringUtils;
* @see #setInterceptorNames
* @see AbstractAutoProxyCreator
*/
@SuppressWarnings("serial")
public class BeanNameAutoProxyCreator extends AbstractAutoProxyCreator {
private List<String> beanNames;

View File

@ -33,6 +33,7 @@ import org.springframework.beans.factory.BeanNameAware;
* @author Rod Johnson
* @author Rob Harrop
*/
@SuppressWarnings("serial")
public class DefaultAdvisorAutoProxyCreator extends AbstractAdvisorAutoProxyCreator implements BeanNameAware {
/** Separator between prefix and remainder of bean name */

View File

@ -26,6 +26,7 @@ import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
* @author Juergen Hoeller
* @since 2.0.7
*/
@SuppressWarnings("serial")
public class InfrastructureAdvisorAutoProxyCreator extends AbstractAdvisorAutoProxyCreator {
private ConfigurableListableBeanFactory beanFactory;

View File

@ -36,6 +36,7 @@ import org.aopalliance.intercept.MethodInvocation;
* @see #setSuffix
* @see #createInvocationTraceName
*/
@SuppressWarnings("serial")
public abstract class AbstractMonitoringInterceptor extends AbstractTraceInterceptor {
private String prefix = "";

View File

@ -43,6 +43,7 @@ import org.springframework.aop.support.AopUtils;
* @see #setUseDynamicLogger
* @see #invokeUnderTrace(org.aopalliance.intercept.MethodInvocation, org.apache.commons.logging.Log)
*/
@SuppressWarnings("serial")
public abstract class AbstractTraceInterceptor implements MethodInterceptor, Serializable {
/**

View File

@ -39,6 +39,7 @@ import org.springframework.util.ConcurrencyThrottleSupport;
* @since 11.02.2004
* @see #setConcurrencyLimit
*/
@SuppressWarnings("serial")
public class ConcurrencyThrottleInterceptor extends ConcurrencyThrottleSupport
implements MethodInterceptor, Serializable {

View File

@ -67,6 +67,7 @@ import org.springframework.util.StringUtils;
* @see #setExceptionMessage
* @see SimpleTraceInterceptor
*/
@SuppressWarnings("serial")
public class CustomizableTraceInterceptor extends AbstractTraceInterceptor {
/**

View File

@ -32,6 +32,7 @@ import org.aopalliance.intercept.MethodInvocation;
* @see SimpleTraceInterceptor
* @see CustomizableTraceInterceptor
*/
@SuppressWarnings("serial")
public class DebugInterceptor extends SimpleTraceInterceptor {
private volatile long count;

View File

@ -123,6 +123,7 @@ public abstract class ExposeBeanNameAdvisors {
/**
* Introduction that exposes the specified bean name as invocation attribute.
*/
@SuppressWarnings("serial")
private static class ExposeBeanNameIntroduction extends DelegatingIntroductionInterceptor implements NamedBean {
private final String beanName;

View File

@ -40,6 +40,7 @@ import org.springframework.core.Ordered;
* @author Rod Johnson
* @author Juergen Hoeller
*/
@SuppressWarnings("serial")
public class ExposeInvocationInterceptor implements MethodInterceptor, Ordered, Serializable {
/** Singleton instance of this class */

View File

@ -35,6 +35,7 @@ import org.apache.commons.logging.Log;
* @see com.jamonapi.MonitorFactory
* @see PerformanceMonitorInterceptor
*/
@SuppressWarnings("serial")
public class JamonPerformanceMonitorInterceptor extends AbstractMonitoringInterceptor {
private boolean trackAllInvocations = false;

View File

@ -33,6 +33,7 @@ import org.springframework.util.StopWatch;
* @see org.springframework.util.StopWatch
* @see JamonPerformanceMonitorInterceptor
*/
@SuppressWarnings("serial")
public class PerformanceMonitorInterceptor extends AbstractMonitoringInterceptor {
/**

View File

@ -32,6 +32,7 @@ import org.apache.commons.logging.Log;
* @since 1.2
* @see CustomizableTraceInterceptor
*/
@SuppressWarnings("serial")
public class SimpleTraceInterceptor extends AbstractTraceInterceptor {
/**

View File

@ -34,6 +34,7 @@ import org.springframework.util.Assert;
* @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;

View File

@ -49,6 +49,7 @@ import org.springframework.util.ClassUtils;
* @since 2.0
* @see #setProxyTargetClass
*/
@SuppressWarnings("serial")
public class ScopedProxyFactoryBean extends ProxyConfig implements FactoryBean<Object>, BeanFactoryAware {
/** The TargetSource that manages scoping */

View File

@ -38,6 +38,7 @@ import org.springframework.util.Assert;
* @see #setAdviceBeanName
* @see DefaultBeanFactoryPointcutAdvisor
*/
@SuppressWarnings("serial")
public abstract class AbstractBeanFactoryPointcutAdvisor extends AbstractPointcutAdvisor implements BeanFactoryAware {
private String adviceBeanName;

View File

@ -28,6 +28,7 @@ import java.io.Serializable;
* @see #setLocation
* @see #setExpression
*/
@SuppressWarnings("serial")
public abstract class AbstractExpressionPointcut implements ExpressionPointcut, Serializable {
private String location;

View File

@ -26,6 +26,7 @@ import org.aopalliance.aop.Advice;
* @see #setAdvice
* @see DefaultPointcutAdvisor
*/
@SuppressWarnings("serial")
public abstract class AbstractGenericPointcutAdvisor extends AbstractPointcutAdvisor {
private Advice advice;

View File

@ -34,6 +34,7 @@ import org.springframework.util.ObjectUtils;
* @since 1.1.2
* @see AbstractGenericPointcutAdvisor
*/
@SuppressWarnings("serial")
public abstract class AbstractPointcutAdvisor implements PointcutAdvisor, Ordered, Serializable {
private Integer order;

View File

@ -47,6 +47,7 @@ import org.springframework.util.StringUtils;
* @since 1.1
* @see JdkRegexpMethodPointcut
*/
@SuppressWarnings("serial")
public abstract class AbstractRegexpMethodPointcut extends StaticMethodMatcherPointcut
implements Serializable {

View File

@ -87,6 +87,7 @@ public abstract class ClassFilters {
/**
* ClassFilter implementation for a union of the given ClassFilters.
*/
@SuppressWarnings("serial")
private static class UnionClassFilter implements ClassFilter, Serializable {
private ClassFilter[] filters;
@ -120,6 +121,7 @@ public abstract class ClassFilters {
/**
* ClassFilter implementation for an intersection of the given ClassFilters.
*/
@SuppressWarnings("serial")
private static class IntersectionClassFilter implements ClassFilter, Serializable {
private ClassFilter[] filters;

View File

@ -36,6 +36,7 @@ import org.springframework.util.ObjectUtils;
* @author Rob Harrop
* @see org.springframework.core.ControlFlow
*/
@SuppressWarnings("serial")
public class ControlFlowPointcut implements Pointcut, ClassFilter, MethodMatcher, Serializable {
private Class clazz;

View File

@ -32,6 +32,7 @@ import org.springframework.aop.Pointcut;
* @see #setPointcut
* @see #setAdviceBeanName
*/
@SuppressWarnings("serial")
public class DefaultBeanFactoryPointcutAdvisor extends AbstractBeanFactoryPointcutAdvisor {
private Pointcut pointcut = Pointcut.TRUE;

View File

@ -38,7 +38,7 @@ import org.springframework.util.ClassUtils;
* @author Juergen Hoeller
* @since 11.11.2003
*/
@SuppressWarnings({ "unchecked", "serial" })
@SuppressWarnings({"serial" })
public class DefaultIntroductionAdvisor implements IntroductionAdvisor, ClassFilter, Ordered, Serializable {
private final Advice advice;

View File

@ -34,6 +34,7 @@ import org.springframework.aop.Pointcut;
* @see #setPointcut
* @see #setAdvice
*/
@SuppressWarnings("serial")
public class DefaultPointcutAdvisor extends AbstractGenericPointcutAdvisor implements Serializable {
private Pointcut pointcut = Pointcut.TRUE;

View File

@ -50,6 +50,7 @@ import org.springframework.aop.ProxyMethodInvocation;
* @see #suppressInterface
* @see DelegatingIntroductionInterceptor
*/
@SuppressWarnings("serial")
public class DelegatePerTargetObjectIntroductionInterceptor extends IntroductionInfoSupport
implements IntroductionInterceptor {

View File

@ -48,6 +48,7 @@ import org.springframework.util.Assert;
* @see #suppressInterface
* @see DelegatePerTargetObjectIntroductionInterceptor
*/
@SuppressWarnings("serial")
public class DelegatingIntroductionInterceptor extends IntroductionInfoSupport
implements IntroductionInterceptor {

View File

@ -40,6 +40,7 @@ import org.springframework.util.ClassUtils;
* @author Rod Johnson
* @author Juergen Hoeller
*/
@SuppressWarnings("serial")
public class IntroductionInfoSupport implements IntroductionInfo, Serializable {
protected final Set<Class> publishedInterfaces = new HashSet<Class>();

View File

@ -37,6 +37,7 @@ import java.util.regex.PatternSyntaxException;
* @author Rob Harrop
* @since 1.1
*/
@SuppressWarnings("serial")
public class JdkRegexpMethodPointcut extends AbstractRegexpMethodPointcut {
/**

View File

@ -99,6 +99,7 @@ public abstract class MethodMatchers {
/**
* MethodMatcher implementation for a union of two given MethodMatchers.
*/
@SuppressWarnings("serial")
private static class UnionMethodMatcher implements IntroductionAwareMethodMatcher, Serializable {
private MethodMatcher mm1;
@ -163,6 +164,7 @@ public abstract class MethodMatchers {
* MethodMatcher implementation for a union of two given MethodMatchers,
* supporting an associated ClassFilter per MethodMatcher.
*/
@SuppressWarnings("serial")
private static class ClassFilterAwareUnionMethodMatcher extends UnionMethodMatcher {
private final ClassFilter cf1;
@ -201,6 +203,7 @@ public abstract class MethodMatchers {
/**
* MethodMatcher implementation for an intersection of two given MethodMatchers.
*/
@SuppressWarnings("serial")
private static class IntersectionMethodMatcher implements IntroductionAwareMethodMatcher, Serializable {
private MethodMatcher mm1;

View File

@ -35,6 +35,7 @@ import org.springframework.util.PatternMatchUtils;
* @since 11.02.2004
* @see #isMatch
*/
@SuppressWarnings("serial")
public class NameMatchMethodPointcut extends StaticMethodMatcherPointcut implements Serializable {
private List<String> mappedNames = new LinkedList<String>();

View File

@ -29,6 +29,7 @@ import org.springframework.aop.Pointcut;
* @author Rob Harrop
* @see NameMatchMethodPointcut
*/
@SuppressWarnings("serial")
public class NameMatchMethodPointcutAdvisor extends AbstractGenericPointcutAdvisor {
private final NameMatchMethodPointcut pointcut = new NameMatchMethodPointcut();

View File

@ -91,6 +91,7 @@ public abstract class Pointcuts {
/**
* Pointcut implementation that matches bean property setters.
*/
@SuppressWarnings("serial")
private static class SetterPointcut extends StaticMethodMatcherPointcut implements Serializable {
public static SetterPointcut INSTANCE = new SetterPointcut();
@ -110,6 +111,7 @@ public abstract class Pointcuts {
/**
* Pointcut implementation that matches bean property getters.
*/
@SuppressWarnings("serial")
private static class GetterPointcut extends StaticMethodMatcherPointcut implements Serializable {
public static GetterPointcut INSTANCE = new GetterPointcut();

View File

@ -41,6 +41,7 @@ import org.springframework.util.ObjectUtils;
* @see #setPatterns
* @see JdkRegexpMethodPointcut
*/
@SuppressWarnings("serial")
public class RegexpMethodPointcutAdvisor extends AbstractGenericPointcutAdvisor {
private String[] patterns;

View File

@ -24,6 +24,7 @@ import org.springframework.aop.ClassFilter;
* Simple ClassFilter implementation that passes classes (and optionally subclasses)
* @author Rod Johnson
*/
@SuppressWarnings("serial")
public class RootClassFilter implements ClassFilter, Serializable {
private Class clazz;

View File

@ -58,6 +58,8 @@ import org.springframework.core.Constants;
public class CommonsPoolTargetSource extends AbstractPoolingTargetSource
implements PoolableObjectFactory {
private static final long serialVersionUID = 1L;
private static final Constants constants = new Constants(GenericObjectPool.class);

View File

@ -56,6 +56,7 @@ import org.springframework.beans.BeansException;
* @see org.springframework.beans.factory.BeanFactory#getBean
* @see #postProcessTargetObject
*/
@SuppressWarnings("serial")
public class LazyInitTargetSource extends AbstractBeanFactoryBasedTargetSource {
private Object target;

View File

@ -31,6 +31,8 @@ import org.springframework.beans.BeansException;
*/
public class PrototypeTargetSource extends AbstractPrototypeBasedTargetSource {
private static final long serialVersionUID = 1L;
/**
* Obtain a new prototype instance for every call.
* @see #newPrototypeInstance()

View File

@ -27,6 +27,7 @@ package org.springframework.aop.target;
* @author Juergen Hoeller
* @since 2.0.3
*/
@SuppressWarnings("serial")
public class SimpleBeanTargetSource extends AbstractBeanFactoryBasedTargetSource {
public Object getTarget() throws Exception {

View File

@ -50,6 +50,8 @@ import org.springframework.core.NamedThreadLocal;
public class ThreadLocalTargetSource extends AbstractPrototypeBasedTargetSource
implements ThreadLocalTargetSourceStats, DisposableBean {
private static final long serialVersionUID = 1L;
/**
* ThreadLocal holding the target associated with the current
* thread. Unlike most ThreadLocals, which are static, this variable

View File

@ -115,6 +115,7 @@ public class TrickyAspectJPointcutExpressionTests {
}
@SuppressWarnings("serial")
public static class TestException extends RuntimeException {
public TestException(String string) {

View File

@ -386,7 +386,7 @@ public abstract class AbstractAspectJAdvisorFactoryTests {
),
CannotBeUnlocked.class);
assertTrue(proxy instanceof Lockable);
Lockable lockable = (Lockable) proxy;
Lockable lockable = proxy;
assertTrue("Already locked", lockable.locked());
lockable.lock();
assertTrue("Real target ignores locking", lockable.locked());

View File

@ -80,6 +80,7 @@ public final class LazyInitTargetSourceTests {
}
@SuppressWarnings("serial")
public static class CustomLazyInitTargetSource extends LazyInitTargetSource {
protected void postProcessTargetObject(Object targetObject) {

View File

@ -62,6 +62,8 @@ public final class PrototypeBasedTargetSourceTests {
private static class TestTargetSource extends AbstractPrototypeBasedTargetSource {
private static final long serialVersionUID = 1L;
/**
* Nonserializable test field to check that subclass
* state can't prevent serialization from working
@ -77,4 +79,4 @@ public final class PrototypeBasedTargetSourceTests {
}
}
}
}

View File

@ -114,7 +114,7 @@ public abstract aspect AbstractMethodMockingControl percflow(mockStaticsTestMeth
if (responseType == CallResponse.return_) {
return call.returnValue(lastSig, args);
} else if(responseType == CallResponse.throw_) {
return (RuntimeException)call.throwException(lastSig, args);
return call.throwException(lastSig, args);
} else if(responseType == CallResponse.nothing) {
// do nothing
}

View File

@ -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);
}
}
}

View File

@ -25,6 +25,7 @@ import org.springframework.beans.factory.DisposableBean;
* @author Juergen Hoeller
* @since 21.08.2003
*/
@SuppressWarnings("serial")
public class DerivedTestBean extends TestBean implements Serializable, BeanNameAware, DisposableBean {
private String beanName;
@ -82,4 +83,4 @@ public class DerivedTestBean extends TestBean implements Serializable, BeanNameA
return destroyed;
}
}
}

View File

@ -248,6 +248,7 @@ public abstract class AbstractBeanConfigurerTests extends TestCase {
@Configurable("beanOne")
@SuppressWarnings("serial")
protected static class ShouldBeConfiguredBySpring implements Serializable {
private String name;
@ -263,6 +264,7 @@ public abstract class AbstractBeanConfigurerTests extends TestCase {
@Configurable("beanOne")
@SuppressWarnings("serial")
private static class ShouldBeConfiguredBySpringContainsPublicReadResolve implements Serializable {
private String name;
@ -317,6 +319,7 @@ public abstract class AbstractBeanConfigurerTests extends TestCase {
}
@SuppressWarnings("serial")
private static class SerializableThatShouldNotBeConfiguredBySpring implements Serializable {
private String name;
@ -444,6 +447,7 @@ public abstract class AbstractBeanConfigurerTests extends TestCase {
}
@Configurable
@SuppressWarnings("serial")
private static class BaseSerializableBean implements Serializable {
public int setterCount;
@ -457,6 +461,7 @@ public abstract class AbstractBeanConfigurerTests extends TestCase {
}
@SuppressWarnings("serial")
private static class SubSerializableBean extends BaseSerializableBean {
}
@ -551,6 +556,7 @@ public abstract class AbstractBeanConfigurerTests extends TestCase {
}
}
@SuppressWarnings("serial")
public static class Order implements MailSenderClient, Serializable {
private transient MailSender mailSender;
@ -577,6 +583,7 @@ public abstract class AbstractBeanConfigurerTests extends TestCase {
}
@Configurable
@SuppressWarnings("serial")
private static class PreOrPostConstructionConfiguredBean implements Serializable {
private transient String name;
protected transient boolean preConstructionConfigured;
@ -597,11 +604,13 @@ public abstract class AbstractBeanConfigurerTests extends TestCase {
@Configurable(preConstruction=true)
@SuppressWarnings("serial")
public static class PreConstructionConfiguredBean extends PreOrPostConstructionConfiguredBean {
}
@Configurable(preConstruction=false)
@SuppressWarnings("serial")
private static class PostConstructionConfiguredBean extends PreOrPostConstructionConfiguredBean {
}

View File

@ -23,6 +23,7 @@ import org.springframework.transaction.support.DefaultTransactionStatus;
* @author Rod Johnson
* @author Juergen Hoeller
*/
@SuppressWarnings("serial")
public class CallCountingTransactionManager extends AbstractPlatformTransactionManager {
public TransactionDefinition lastDefinition;

View File

@ -23,6 +23,7 @@ package org.springframework.beans;
* @author Juergen Hoeller
* @since 1.2.8
*/
@SuppressWarnings("serial")
public class BeanInstantiationException extends FatalBeanException {
private Class beanClass;

View File

@ -26,6 +26,7 @@ import org.springframework.core.AttributeAccessorSupport;
* @author Juergen Hoeller
* @since 2.5
*/
@SuppressWarnings("serial")
public class BeanMetadataAttributeAccessor extends AttributeAccessorSupport implements BeanMetadataElement {
private Object source;

View File

@ -19,7 +19,6 @@ package org.springframework.beans;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyDescriptor;
import java.lang.reflect.Array;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
@ -41,7 +40,6 @@ import org.apache.commons.logging.LogFactory;
import org.springframework.core.CollectionFactory;
import org.springframework.core.GenericCollectionTypeResolver;
import org.springframework.core.MethodParameter;
import org.springframework.core.convert.ConversionException;
import org.springframework.core.convert.ConverterNotFoundException;
import org.springframework.core.convert.Property;

View File

@ -29,6 +29,7 @@ import org.springframework.util.ObjectUtils;
* @author Rod Johnson
* @author Juergen Hoeller
*/
@SuppressWarnings("serial")
public abstract class BeansException extends NestedRuntimeException {
/**

View File

@ -25,6 +25,7 @@ import java.beans.PropertyChangeEvent;
* @author Juergen Hoeller
* @since 3.0
*/
@SuppressWarnings("serial")
public class ConversionNotSupportedException extends TypeMismatchException {
/**

View File

@ -16,7 +16,6 @@
package org.springframework.beans;
import org.springframework.core.MethodParameter;
import org.springframework.core.convert.ConversionException;
import org.springframework.core.convert.ConverterNotFoundException;
import org.springframework.core.convert.TypeDescriptor;

View File

@ -495,7 +495,7 @@ class PropertyDescriptorUtils {
// copy all attributes (emulating behavior of private FeatureDescriptor#addTable)
Enumeration<String> keys = source.attributeNames();
while (keys.hasMoreElements()) {
String key = (String)keys.nextElement();
String key = keys.nextElement();
target.setValue(key, source.getValue(key));
}

View File

@ -22,6 +22,7 @@ package org.springframework.beans;
*
* @author Rod Johnson
*/
@SuppressWarnings("serial")
public class FatalBeanException extends BeansException {
/**

View File

@ -23,6 +23,7 @@ package org.springframework.beans;
* @author Juergen Hoeller
* @since 1.0.2
*/
@SuppressWarnings("serial")
public class InvalidPropertyException extends FatalBeanException {
private Class beanClass;

View File

@ -24,6 +24,7 @@ import java.beans.PropertyChangeEvent;
*
* @author Rod Johnson
*/
@SuppressWarnings("serial")
public class MethodInvocationException extends PropertyAccessException {
/**

View File

@ -35,6 +35,7 @@ import org.springframework.util.StringUtils;
* @author Rob Harrop
* @since 13 May 2001
*/
@SuppressWarnings("serial")
public class MutablePropertyValues implements PropertyValues, Serializable {
private final List<PropertyValue> propertyValueList;

View File

@ -23,6 +23,7 @@ package org.springframework.beans;
* @author Juergen Hoeller
* @since 1.0.2
*/
@SuppressWarnings("serial")
public class NotReadablePropertyException extends InvalidPropertyException {
/**

View File

@ -24,6 +24,7 @@ package org.springframework.beans;
* @author Alef Arendsen
* @author Arjen Poutsma
*/
@SuppressWarnings("serial")
public class NotWritablePropertyException extends InvalidPropertyException {
private String[] possibleMatches = null;

View File

@ -25,6 +25,7 @@ package org.springframework.beans;
*
* @author Rod Johnson
*/
@SuppressWarnings("serial")
public class NullValueInNestedPathException extends InvalidPropertyException {
/**

View File

@ -27,6 +27,7 @@ import org.springframework.core.ErrorCoded;
* @author Rod Johnson
* @author Juergen Hoeller
*/
@SuppressWarnings("serial")
public abstract class PropertyAccessException extends BeansException implements ErrorCoded {
private transient PropertyChangeEvent propertyChangeEvent;

View File

@ -35,6 +35,7 @@ import org.springframework.util.ObjectUtils;
* @author Juergen Hoeller
* @since 18 April 2001
*/
@SuppressWarnings("serial")
public class PropertyBatchUpdateException extends BeansException {
/** List of PropertyAccessException objects */

View File

@ -39,6 +39,7 @@ import org.springframework.util.ObjectUtils;
* @see PropertyValues
* @see BeanWrapper
*/
@SuppressWarnings("serial")
public class PropertyValue extends BeanMetadataAttributeAccessor implements Serializable {
private final String name;

View File

@ -26,6 +26,7 @@ import org.springframework.util.ClassUtils;
* @author Rod Johnson
* @author Juergen Hoeller
*/
@SuppressWarnings("serial")
public class TypeMismatchException extends PropertyAccessException {
/**

View File

@ -30,6 +30,7 @@ import org.springframework.core.NestedRuntimeException;
*
* @author Juergen Hoeller
*/
@SuppressWarnings("serial")
public class BeanCreationException extends FatalBeanException {
private String beanName;

View File

@ -24,6 +24,7 @@ package org.springframework.beans.factory;
* @author Juergen Hoeller
* @since 2.0
*/
@SuppressWarnings("serial")
public class BeanCreationNotAllowedException extends BeanCreationException {
/**

View File

@ -23,6 +23,7 @@ package org.springframework.beans.factory;
* @author Juergen Hoeller
* @since 1.1
*/
@SuppressWarnings("serial")
public class BeanCurrentlyInCreationException extends BeanCreationException {
/**

View File

@ -26,6 +26,7 @@ import org.springframework.beans.FatalBeanException;
* @author Juergen Hoeller
* @author Rob Harrop
*/
@SuppressWarnings("serial")
public class BeanDefinitionStoreException extends FatalBeanException {
private String resourceDescription;

View File

@ -24,6 +24,7 @@ import org.springframework.beans.FatalBeanException;
* @author Juergen Hoeller
* @since 3.0
*/
@SuppressWarnings("serial")
public class BeanExpressionException extends FatalBeanException {
/**
@ -44,4 +45,4 @@ public class BeanExpressionException extends FatalBeanException {
super(msg, cause);
}
}
}

Some files were not shown because too many files have changed in this diff Show More