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:
commit
aa824641ab
21
build.gradle
21
build.gradle
|
@ -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"]
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ import org.springframework.core.NestedRuntimeException;
|
|||
* @author Juergen Hoeller
|
||||
* @since 2.0
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class AopInvocationException extends NestedRuntimeException {
|
||||
|
||||
/**
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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 {
|
||||
|
||||
/**
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@ import org.springframework.core.NestedRuntimeException;
|
|||
* @author Rod Johnson
|
||||
* @since 13.03.2003
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class AopConfigException extends NestedRuntimeException {
|
||||
|
||||
/**
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -45,6 +45,7 @@ import org.springframework.aop.SpringProxy;
|
|||
* @see AdvisedSupport#setProxyTargetClass
|
||||
* @see AdvisedSupport#setInterfaces
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class DefaultAopProxyFactory implements AopProxyFactory, Serializable {
|
||||
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -32,6 +32,7 @@ import org.springframework.util.ClassUtils;
|
|||
* @author Rob Harrop
|
||||
* @since 14.03.2003
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class ProxyFactory extends ProxyCreatorSupport {
|
||||
|
||||
/**
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -31,6 +31,7 @@ import org.springframework.util.Assert;
|
|||
*
|
||||
* @author Rod Johnson
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class MethodBeforeAdviceInterceptor implements MethodInterceptor, Serializable {
|
||||
|
||||
private MethodBeforeAdvice advice;
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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 {
|
||||
|
||||
/**
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -42,6 +42,7 @@ import org.springframework.util.StringUtils;
|
|||
* @see #setInterceptorNames
|
||||
* @see AbstractAutoProxyCreator
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class BeanNameAutoProxyCreator extends AbstractAutoProxyCreator {
|
||||
|
||||
private List<String> beanNames;
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -36,6 +36,7 @@ import org.aopalliance.intercept.MethodInvocation;
|
|||
* @see #setSuffix
|
||||
* @see #createInvocationTraceName
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public abstract class AbstractMonitoringInterceptor extends AbstractTraceInterceptor {
|
||||
|
||||
private String prefix = "";
|
||||
|
|
|
@ -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 {
|
||||
|
||||
/**
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -67,6 +67,7 @@ import org.springframework.util.StringUtils;
|
|||
* @see #setExceptionMessage
|
||||
* @see SimpleTraceInterceptor
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class CustomizableTraceInterceptor extends AbstractTraceInterceptor {
|
||||
|
||||
/**
|
||||
|
|
|
@ -32,6 +32,7 @@ import org.aopalliance.intercept.MethodInvocation;
|
|||
* @see SimpleTraceInterceptor
|
||||
* @see CustomizableTraceInterceptor
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class DebugInterceptor extends SimpleTraceInterceptor {
|
||||
|
||||
private volatile long count;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -33,6 +33,7 @@ import org.springframework.util.StopWatch;
|
|||
* @see org.springframework.util.StopWatch
|
||||
* @see JamonPerformanceMonitorInterceptor
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class PerformanceMonitorInterceptor extends AbstractMonitoringInterceptor {
|
||||
|
||||
/**
|
||||
|
|
|
@ -32,6 +32,7 @@ import org.apache.commons.logging.Log;
|
|||
* @since 1.2
|
||||
* @see CustomizableTraceInterceptor
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class SimpleTraceInterceptor extends AbstractTraceInterceptor {
|
||||
|
||||
/**
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -28,6 +28,7 @@ import java.io.Serializable;
|
|||
* @see #setLocation
|
||||
* @see #setExpression
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public abstract class AbstractExpressionPointcut implements ExpressionPointcut, Serializable {
|
||||
|
||||
private String location;
|
||||
|
|
|
@ -26,6 +26,7 @@ import org.aopalliance.aop.Advice;
|
|||
* @see #setAdvice
|
||||
* @see DefaultPointcutAdvisor
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public abstract class AbstractGenericPointcutAdvisor extends AbstractPointcutAdvisor {
|
||||
|
||||
private Advice advice;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -47,6 +47,7 @@ import org.springframework.util.StringUtils;
|
|||
* @since 1.1
|
||||
* @see JdkRegexpMethodPointcut
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public abstract class AbstractRegexpMethodPointcut extends StaticMethodMatcherPointcut
|
||||
implements Serializable {
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -50,6 +50,7 @@ import org.springframework.aop.ProxyMethodInvocation;
|
|||
* @see #suppressInterface
|
||||
* @see DelegatingIntroductionInterceptor
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class DelegatePerTargetObjectIntroductionInterceptor extends IntroductionInfoSupport
|
||||
implements IntroductionInterceptor {
|
||||
|
||||
|
|
|
@ -48,6 +48,7 @@ import org.springframework.util.Assert;
|
|||
* @see #suppressInterface
|
||||
* @see DelegatePerTargetObjectIntroductionInterceptor
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class DelegatingIntroductionInterceptor extends IntroductionInfoSupport
|
||||
implements IntroductionInterceptor {
|
||||
|
||||
|
|
|
@ -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>();
|
||||
|
|
|
@ -37,6 +37,7 @@ import java.util.regex.PatternSyntaxException;
|
|||
* @author Rob Harrop
|
||||
* @since 1.1
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class JdkRegexpMethodPointcut extends AbstractRegexpMethodPointcut {
|
||||
|
||||
/**
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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>();
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -41,6 +41,7 @@ import org.springframework.util.ObjectUtils;
|
|||
* @see #setPatterns
|
||||
* @see JdkRegexpMethodPointcut
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class RegexpMethodPointcutAdvisor extends AbstractGenericPointcutAdvisor {
|
||||
|
||||
private String[] patterns;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -115,6 +115,7 @@ public class TrickyAspectJPointcutExpressionTests {
|
|||
|
||||
}
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public static class TestException extends RuntimeException {
|
||||
|
||||
public TestException(String string) {
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -80,6 +80,7 @@ public final class LazyInitTargetSourceTests {
|
|||
}
|
||||
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public static class CustomLazyInitTargetSource extends LazyInitTargetSource {
|
||||
|
||||
protected void postProcessTargetObject(Object targetObject) {
|
||||
|
|
|
@ -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 {
|
|||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -29,6 +29,7 @@ import org.springframework.util.ObjectUtils;
|
|||
* @author Rod Johnson
|
||||
* @author Juergen Hoeller
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public abstract class BeansException extends NestedRuntimeException {
|
||||
|
||||
/**
|
||||
|
|
|
@ -25,6 +25,7 @@ import java.beans.PropertyChangeEvent;
|
|||
* @author Juergen Hoeller
|
||||
* @since 3.0
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class ConversionNotSupportedException extends TypeMismatchException {
|
||||
|
||||
/**
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@ package org.springframework.beans;
|
|||
*
|
||||
* @author Rod Johnson
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class FatalBeanException extends BeansException {
|
||||
|
||||
/**
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -24,6 +24,7 @@ import java.beans.PropertyChangeEvent;
|
|||
*
|
||||
* @author Rod Johnson
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class MethodInvocationException extends PropertyAccessException {
|
||||
|
||||
/**
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -23,6 +23,7 @@ package org.springframework.beans;
|
|||
* @author Juergen Hoeller
|
||||
* @since 1.0.2
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class NotReadablePropertyException extends InvalidPropertyException {
|
||||
|
||||
/**
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -25,6 +25,7 @@ package org.springframework.beans;
|
|||
*
|
||||
* @author Rod Johnson
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class NullValueInNestedPathException extends InvalidPropertyException {
|
||||
|
||||
/**
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -26,6 +26,7 @@ import org.springframework.util.ClassUtils;
|
|||
* @author Rod Johnson
|
||||
* @author Juergen Hoeller
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class TypeMismatchException extends PropertyAccessException {
|
||||
|
||||
/**
|
||||
|
|
|
@ -30,6 +30,7 @@ import org.springframework.core.NestedRuntimeException;
|
|||
*
|
||||
* @author Juergen Hoeller
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class BeanCreationException extends FatalBeanException {
|
||||
|
||||
private String beanName;
|
||||
|
|
|
@ -24,6 +24,7 @@ package org.springframework.beans.factory;
|
|||
* @author Juergen Hoeller
|
||||
* @since 2.0
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class BeanCreationNotAllowedException extends BeanCreationException {
|
||||
|
||||
/**
|
||||
|
|
|
@ -23,6 +23,7 @@ package org.springframework.beans.factory;
|
|||
* @author Juergen Hoeller
|
||||
* @since 1.1
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class BeanCurrentlyInCreationException extends BeanCreationException {
|
||||
|
||||
/**
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
Loading…
Reference in New Issue