diff --git a/build.gradle b/build.gradle index 7cc210cf45..b2e7af70c6 100644 --- a/build.gradle +++ b/build.gradle @@ -33,8 +33,8 @@ configure(allprojects) { group = "org.springframework" compileJava { - sourceCompatibility=1.6 - targetCompatibility=1.6 + sourceCompatibility=1.5 + targetCompatibility=1.5 } compileTestJava { sourceCompatibility=1.7 diff --git a/spring-aop/src/main/java/org/springframework/aop/TargetSource.java b/spring-aop/src/main/java/org/springframework/aop/TargetSource.java index 8e5ccc1fa6..9633b4b33b 100644 --- a/spring-aop/src/main/java/org/springframework/aop/TargetSource.java +++ b/spring-aop/src/main/java/org/springframework/aop/TargetSource.java @@ -39,7 +39,6 @@ public interface TargetSource extends TargetClassAware { * target class. * @return the type of targets returned by this {@link TargetSource} */ - @Override Class getTargetClass(); /** diff --git a/spring-aop/src/main/java/org/springframework/aop/TrueClassFilter.java b/spring-aop/src/main/java/org/springframework/aop/TrueClassFilter.java index 1d622196f7..248e2f6416 100644 --- a/spring-aop/src/main/java/org/springframework/aop/TrueClassFilter.java +++ b/spring-aop/src/main/java/org/springframework/aop/TrueClassFilter.java @@ -34,7 +34,6 @@ class TrueClassFilter implements ClassFilter, Serializable { private TrueClassFilter() { } - @Override public boolean matches(Class clazz) { return true; } diff --git a/spring-aop/src/main/java/org/springframework/aop/TrueMethodMatcher.java b/spring-aop/src/main/java/org/springframework/aop/TrueMethodMatcher.java index b4722cdf00..a8bf94dcae 100644 --- a/spring-aop/src/main/java/org/springframework/aop/TrueMethodMatcher.java +++ b/spring-aop/src/main/java/org/springframework/aop/TrueMethodMatcher.java @@ -35,17 +35,14 @@ class TrueMethodMatcher implements MethodMatcher, Serializable { private TrueMethodMatcher() { } - @Override public boolean isRuntime() { return false; } - @Override public boolean matches(Method method, Class targetClass) { return true; } - @Override public boolean matches(Method method, Class targetClass, Object[] args) { // Should never be invoked as isRuntime returns false. throw new UnsupportedOperationException(); diff --git a/spring-aop/src/main/java/org/springframework/aop/TruePointcut.java b/spring-aop/src/main/java/org/springframework/aop/TruePointcut.java index 1a44c2ac26..553b0e9d6d 100644 --- a/spring-aop/src/main/java/org/springframework/aop/TruePointcut.java +++ b/spring-aop/src/main/java/org/springframework/aop/TruePointcut.java @@ -34,12 +34,10 @@ class TruePointcut implements Pointcut, Serializable { private TruePointcut() { } - @Override public ClassFilter getClassFilter() { return ClassFilter.TRUE; } - @Override public MethodMatcher getMethodMatcher() { return MethodMatcher.TRUE; } diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/AbstractAspectJAdvice.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/AbstractAspectJAdvice.java index 3a6436c7f8..515358c3e3 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/AbstractAspectJAdvice.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/AbstractAspectJAdvice.java @@ -203,7 +203,6 @@ public abstract class AbstractAspectJAdvice implements Advice, AspectJPrecedence return this.aspectInstanceFactory.getAspectClassLoader(); } - @Override public int getOrder() { return this.aspectInstanceFactory.getOrder(); } @@ -213,7 +212,6 @@ public abstract class AbstractAspectJAdvice implements Advice, AspectJPrecedence this.aspectName = name; } - @Override public String getAspectName() { return this.aspectName; } @@ -225,7 +223,6 @@ public abstract class AbstractAspectJAdvice implements Advice, AspectJPrecedence this.declarationOrder = order; } - @Override public int getDeclarationOrder() { return this.declarationOrder; } @@ -681,7 +678,6 @@ public abstract class AbstractAspectJAdvice implements Advice, AspectJPrecedence this.adviceMethod = adviceMethod; } - @Override public boolean matches(Method method, Class targetClass) { return !this.adviceMethod.equals(method); } diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAdviceParameterNameDiscoverer.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAdviceParameterNameDiscoverer.java index 0fbeed07b8..42a2c6f729 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAdviceParameterNameDiscoverer.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAdviceParameterNameDiscoverer.java @@ -222,7 +222,6 @@ public class AspectJAdviceParameterNameDiscoverer implements ParameterNameDiscov * @param method the target {@link Method} * @return the parameter names */ - @Override public String[] getParameterNames(Method method) { this.argumentTypes = method.getParameterTypes(); this.numberOfRemainingUnboundArguments = this.argumentTypes.length; @@ -310,7 +309,6 @@ public class AspectJAdviceParameterNameDiscoverer implements ParameterNameDiscov * @throws UnsupportedOperationException if * {@link #setRaiseExceptions(boolean) raiseExceptions} has been set to {@code true} */ - @Override public String[] getParameterNames(Constructor ctor) { if (this.raiseExceptions) { throw new UnsupportedOperationException("An advice method can never be a constructor"); diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAfterAdvice.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAfterAdvice.java index c6669af251..fd5b0d64c4 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAfterAdvice.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAfterAdvice.java @@ -37,7 +37,6 @@ public class AspectJAfterAdvice extends AbstractAspectJAdvice implements MethodI super(aspectJBeforeAdviceMethod, pointcut, aif); } - @Override public Object invoke(MethodInvocation mi) throws Throwable { try { return mi.proceed(); @@ -47,12 +46,10 @@ public class AspectJAfterAdvice extends AbstractAspectJAdvice implements MethodI } } - @Override public boolean isBeforeAdvice() { return false; } - @Override public boolean isAfterAdvice() { return true; } diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAfterReturningAdvice.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAfterReturningAdvice.java index 6ae24d5d7b..56adc943c1 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAfterReturningAdvice.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAfterReturningAdvice.java @@ -40,12 +40,10 @@ public class AspectJAfterReturningAdvice extends AbstractAspectJAdvice implement super(aspectJBeforeAdviceMethod, pointcut, aif); } - @Override public boolean isBeforeAdvice() { return false; } - @Override public boolean isAfterAdvice() { return true; } @@ -55,7 +53,6 @@ public class AspectJAfterReturningAdvice extends AbstractAspectJAdvice implement setReturningNameNoCheck(name); } - @Override public void afterReturning(Object returnValue, Method method, Object[] args, Object target) throws Throwable { if (shouldInvokeOnReturnValueOf(method, returnValue)) { invokeAdviceMethod(getJoinPointMatch(), returnValue, null); diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAfterThrowingAdvice.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAfterThrowingAdvice.java index a7bef4b213..dbdec73fbd 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAfterThrowingAdvice.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAfterThrowingAdvice.java @@ -37,12 +37,10 @@ public class AspectJAfterThrowingAdvice extends AbstractAspectJAdvice implements super(aspectJBeforeAdviceMethod, pointcut, aif); } - @Override public boolean isBeforeAdvice() { return false; } - @Override public boolean isAfterAdvice() { return true; } @@ -52,7 +50,6 @@ public class AspectJAfterThrowingAdvice extends AbstractAspectJAdvice implements setThrowingNameNoCheck(name); } - @Override public Object invoke(MethodInvocation mi) throws Throwable { try { return mi.proceed(); diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAroundAdvice.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAroundAdvice.java index b9c546342b..64059d88a9 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAroundAdvice.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAroundAdvice.java @@ -41,12 +41,10 @@ public class AspectJAroundAdvice extends AbstractAspectJAdvice implements Method super(aspectJAroundAdviceMethod, pointcut, aif); } - @Override public boolean isBeforeAdvice() { return false; } - @Override public boolean isAfterAdvice() { return false; } @@ -57,7 +55,6 @@ public class AspectJAroundAdvice extends AbstractAspectJAdvice implements Method } - @Override public Object invoke(MethodInvocation mi) throws Throwable { if (!(mi instanceof ProxyMethodInvocation)) { throw new IllegalStateException("MethodInvocation is not a Spring ProxyMethodInvocation: " + mi); diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJExpressionPointcut.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJExpressionPointcut.java index 2f92de4f8f..7e101ea57d 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJExpressionPointcut.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJExpressionPointcut.java @@ -155,19 +155,16 @@ public class AspectJExpressionPointcut extends AbstractExpressionPointcut this.pointcutParameterTypes = types; } - @Override public void setBeanFactory(BeanFactory beanFactory) { this.beanFactory = beanFactory; } - @Override public ClassFilter getClassFilter() { checkReadyToMatch(); return this; } - @Override public MethodMatcher getMethodMatcher() { checkReadyToMatch(); return this; @@ -247,7 +244,6 @@ public class AspectJExpressionPointcut extends AbstractExpressionPointcut return this.pointcutExpression; } - @Override public boolean matches(Class targetClass) { checkReadyToMatch(); try { @@ -271,7 +267,6 @@ public class AspectJExpressionPointcut extends AbstractExpressionPointcut } } - @Override public boolean matches(Method method, Class targetClass, boolean beanHasIntroductions) { checkReadyToMatch(); Method targetMethod = AopUtils.getMostSpecificMethod(method, targetClass); @@ -292,18 +287,15 @@ public class AspectJExpressionPointcut extends AbstractExpressionPointcut } } - @Override public boolean matches(Method method, Class targetClass) { return matches(method, targetClass, false); } - @Override public boolean isRuntime() { checkReadyToMatch(); return this.pointcutExpression.mayNeedDynamicTest(); } - @Override public boolean matches(Method method, Class targetClass, Object[] args) { checkReadyToMatch(); ShadowMatch shadowMatch = getShadowMatch(AopUtils.getMostSpecificMethod(method, targetClass), method); @@ -514,12 +506,10 @@ public class AspectJExpressionPointcut extends AbstractExpressionPointcut private static final String BEAN_DESIGNATOR_NAME = "bean"; - @Override public String getDesignatorName() { return BEAN_DESIGNATOR_NAME; } - @Override public ContextBasedMatcher parse(String expression) { return new BeanNameContextMatcher(expression); } @@ -541,27 +531,22 @@ public class AspectJExpressionPointcut extends AbstractExpressionPointcut this.expressionPattern = new NamePattern(expression); } - @Override public boolean couldMatchJoinPointsInType(Class someClass) { return (contextMatch(someClass) == FuzzyBoolean.YES); } - @Override public boolean couldMatchJoinPointsInType(Class someClass, MatchingContext context) { return (contextMatch(someClass) == FuzzyBoolean.YES); } - @Override public boolean matchesDynamically(MatchingContext context) { return true; } - @Override public FuzzyBoolean matchesStatically(MatchingContext context) { return contextMatch(null); } - @Override public boolean mayNeedDynamicTest() { return false; } @@ -626,22 +611,18 @@ public class AspectJExpressionPointcut extends AbstractExpressionPointcut this.other = other; } - @Override public boolean alwaysMatches() { return primary.alwaysMatches(); } - @Override public boolean maybeMatches() { return primary.maybeMatches(); } - @Override public boolean neverMatches() { return primary.neverMatches(); } - @Override public JoinPointMatch matchesJoinPoint(Object thisObject, Object targetObject, Object[] args) { try { @@ -651,7 +632,6 @@ public class AspectJExpressionPointcut extends AbstractExpressionPointcut } } - @Override public void setMatchingContext(MatchingContext aMatchContext) { primary.setMatchingContext(aMatchContext); other.setMatchingContext(aMatchContext); diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJExpressionPointcutAdvisor.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJExpressionPointcutAdvisor.java index 5354360cd4..70b6575076 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJExpressionPointcutAdvisor.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJExpressionPointcutAdvisor.java @@ -31,7 +31,6 @@ public class AspectJExpressionPointcutAdvisor extends AbstractGenericPointcutAdv private final AspectJExpressionPointcut pointcut = new AspectJExpressionPointcut(); - @Override public Pointcut getPointcut() { return this.pointcut; } diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJMethodBeforeAdvice.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJMethodBeforeAdvice.java index 6f7ce26b39..a9c5556d9e 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJMethodBeforeAdvice.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJMethodBeforeAdvice.java @@ -35,17 +35,14 @@ public class AspectJMethodBeforeAdvice extends AbstractAspectJAdvice implements super(aspectJBeforeAdviceMethod, pointcut, aif); } - @Override public void before(Method method, Object[] args, Object target) throws Throwable { invokeAdviceMethod(getJoinPointMatch(), null, null); } - @Override public boolean isBeforeAdvice() { return true; } - @Override public boolean isAfterAdvice() { return false; } diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJPointcutAdvisor.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJPointcutAdvisor.java index 14ad6c67a9..ea32055248 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJPointcutAdvisor.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJPointcutAdvisor.java @@ -56,22 +56,18 @@ public class AspectJPointcutAdvisor implements PointcutAdvisor, Ordered { } - @Override public boolean isPerInstance() { return true; } - @Override public Advice getAdvice() { return this.advice; } - @Override public Pointcut getPointcut() { return this.pointcut; } - @Override public int getOrder() { if (this.order != null) { return this.order; diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJWeaverMessageHandler.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJWeaverMessageHandler.java index c6e568b7d8..4505e6f330 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJWeaverMessageHandler.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJWeaverMessageHandler.java @@ -48,7 +48,6 @@ public class AspectJWeaverMessageHandler implements IMessageHandler { private static final Log LOGGER = LogFactory.getLog("AspectJ Weaver"); - @Override public boolean handleMessage(IMessage message) throws AbortException { Kind messageKind = message.getKind(); @@ -94,18 +93,15 @@ public class AspectJWeaverMessageHandler implements IMessageHandler { return AJ_ID + aMessage.getMessage(); } - @Override public boolean isIgnoring(Kind messageKind) { // We want to see everything, and allow configuration of log levels dynamically. return false; } - @Override public void dontIgnore(Kind messageKind) { // We weren't ignoring anything anyway... } - @Override public void ignore(Kind kind) { // We weren't ignoring anything anyway... } diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/DeclareParentsAdvisor.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/DeclareParentsAdvisor.java index 0d1a84247b..27618c9b46 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/DeclareParentsAdvisor.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/DeclareParentsAdvisor.java @@ -77,7 +77,6 @@ public class DeclareParentsAdvisor implements IntroductionAdvisor { // Excludes methods implemented. ClassFilter exclusion = new ClassFilter() { - @Override public boolean matches(Class clazz) { return !(introducedInterface.isAssignableFrom(clazz)); } @@ -88,27 +87,22 @@ public class DeclareParentsAdvisor implements IntroductionAdvisor { } - @Override public ClassFilter getClassFilter() { return this.typePatternClassFilter; } - @Override public void validateInterfaces() throws IllegalArgumentException { // Do nothing } - @Override public boolean isPerInstance() { return true; } - @Override public Advice getAdvice() { return this.advice; } - @Override public Class[] getInterfaces() { return new Class[] {this.introducedInterface}; } diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/MethodInvocationProceedingJoinPoint.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/MethodInvocationProceedingJoinPoint.java index 952706078e..fbdcf09313 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/MethodInvocationProceedingJoinPoint.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/MethodInvocationProceedingJoinPoint.java @@ -72,17 +72,14 @@ public class MethodInvocationProceedingJoinPoint implements ProceedingJoinPoint, this.methodInvocation = methodInvocation; } - @Override public void set$AroundClosure(AroundClosure aroundClosure) { throw new UnsupportedOperationException(); } - @Override public Object proceed() throws Throwable { return this.methodInvocation.invocableClone().proceed(); } - @Override public Object proceed(Object[] arguments) throws Throwable { Assert.notNull(arguments, "Argument array passed to proceed cannot be null"); if (arguments.length != this.methodInvocation.getArguments().length) { @@ -97,7 +94,6 @@ public class MethodInvocationProceedingJoinPoint implements ProceedingJoinPoint, /** * Returns the Spring AOP proxy. Cannot be {@code null}. */ - @Override public Object getThis() { return this.methodInvocation.getProxy(); } @@ -105,12 +101,10 @@ public class MethodInvocationProceedingJoinPoint implements ProceedingJoinPoint, /** * Returns the Spring AOP target. May be {@code null} if there is no target. */ - @Override public Object getTarget() { return this.methodInvocation.getThis(); } - @Override public Object[] getArgs() { if (this.defensiveCopyOfArgs == null) { Object[] argsSource = this.methodInvocation.getArguments(); @@ -120,7 +114,6 @@ public class MethodInvocationProceedingJoinPoint implements ProceedingJoinPoint, return this.defensiveCopyOfArgs; } - @Override public Signature getSignature() { if (this.signature == null) { this.signature = new MethodSignatureImpl(); @@ -128,7 +121,6 @@ public class MethodInvocationProceedingJoinPoint implements ProceedingJoinPoint, return signature; } - @Override public SourceLocation getSourceLocation() { if (this.sourceLocation == null) { this.sourceLocation = new SourceLocationImpl(); @@ -136,28 +128,23 @@ public class MethodInvocationProceedingJoinPoint implements ProceedingJoinPoint, return this.sourceLocation; } - @Override public String getKind() { return ProceedingJoinPoint.METHOD_EXECUTION; } - @Override public int getId() { // TODO: It's just an adapter but returning 0 might still have side effects... return 0; } - @Override public JoinPoint.StaticPart getStaticPart() { return this; } - @Override public String toShortString() { return "execution(" + getSignature().toShortString() + ")"; } - @Override public String toLongString() { return "execution(" + getSignature().toLongString() + ")"; } @@ -174,42 +161,34 @@ public class MethodInvocationProceedingJoinPoint implements ProceedingJoinPoint, private volatile String[] parameterNames; - @Override public String getName() { return methodInvocation.getMethod().getName(); } - @Override public int getModifiers() { return methodInvocation.getMethod().getModifiers(); } - @Override public Class getDeclaringType() { return methodInvocation.getMethod().getDeclaringClass(); } - @Override public String getDeclaringTypeName() { return methodInvocation.getMethod().getDeclaringClass().getName(); } - @Override public Class getReturnType() { return methodInvocation.getMethod().getReturnType(); } - @Override public Method getMethod() { return methodInvocation.getMethod(); } - @Override public Class[] getParameterTypes() { return methodInvocation.getMethod().getParameterTypes(); } - @Override public String[] getParameterNames() { if (this.parameterNames == null) { this.parameterNames = (new LocalVariableTableParameterNameDiscoverer()).getParameterNames(getMethod()); @@ -217,17 +196,14 @@ public class MethodInvocationProceedingJoinPoint implements ProceedingJoinPoint, return this.parameterNames; } - @Override public Class[] getExceptionTypes() { return methodInvocation.getMethod().getExceptionTypes(); } - @Override public String toShortString() { return toString(false, false, false, false); } - @Override public String toLongString() { return toString(true, true, true, true); } @@ -291,7 +267,6 @@ public class MethodInvocationProceedingJoinPoint implements ProceedingJoinPoint, */ private class SourceLocationImpl implements SourceLocation { - @Override public Class getWithinType() { if (methodInvocation.getThis() == null) { throw new UnsupportedOperationException("No source location joinpoint available: target is null"); @@ -299,17 +274,14 @@ public class MethodInvocationProceedingJoinPoint implements ProceedingJoinPoint, return methodInvocation.getThis().getClass(); } - @Override public String getFileName() { throw new UnsupportedOperationException(); } - @Override public int getLine() { throw new UnsupportedOperationException(); } - @Override public int getColumn() { throw new UnsupportedOperationException(); } diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/RuntimeTestWalker.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/RuntimeTestWalker.java index 7d52c03615..fa470759cd 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/RuntimeTestWalker.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/RuntimeTestWalker.java @@ -106,44 +106,35 @@ class RuntimeTestWalker { protected static final int AT_TARGET_VAR = 4; protected static final int AT_ANNOTATION_VAR = 8; - @Override public void visit(And e) { e.getLeft().accept(this); e.getRight().accept(this); } - @Override public void visit(Or e) { e.getLeft().accept(this); e.getRight().accept(this); } - @Override public void visit(Not e) { e.getBody().accept(this); } - @Override public void visit(Instanceof i) { } - @Override public void visit(Literal literal) { } - @Override public void visit(Call call) { } - @Override public void visit(FieldGetCall fieldGetCall) { } - @Override public void visit(HasAnnotation hasAnnotation) { } - @Override public void visit(MatchingContextBasedTest matchingContextTest) { } diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/SimpleAspectInstanceFactory.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/SimpleAspectInstanceFactory.java index dfb36d6a72..40049e978e 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/SimpleAspectInstanceFactory.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/SimpleAspectInstanceFactory.java @@ -49,7 +49,6 @@ public class SimpleAspectInstanceFactory implements AspectInstanceFactory { } - @Override public final Object getAspectInstance() { try { return this.aspectClass.newInstance(); @@ -62,7 +61,6 @@ public class SimpleAspectInstanceFactory implements AspectInstanceFactory { } } - @Override public ClassLoader getAspectClassLoader() { return this.aspectClass.getClassLoader(); } @@ -75,7 +73,6 @@ public class SimpleAspectInstanceFactory implements AspectInstanceFactory { * @see org.springframework.core.Ordered * @see #getOrderForAspectClass */ - @Override public int getOrder() { return getOrderForAspectClass(this.aspectClass); } diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/SingletonAspectInstanceFactory.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/SingletonAspectInstanceFactory.java index 1e8f723efb..7f550a333d 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/SingletonAspectInstanceFactory.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/SingletonAspectInstanceFactory.java @@ -44,12 +44,10 @@ public class SingletonAspectInstanceFactory implements AspectInstanceFactory { } - @Override public final Object getAspectInstance() { return this.aspectInstance; } - @Override public ClassLoader getAspectClassLoader() { return this.aspectInstance.getClass().getClassLoader(); } @@ -62,7 +60,6 @@ public class SingletonAspectInstanceFactory implements AspectInstanceFactory { * @see org.springframework.core.Ordered * @see #getOrderForAspectClass */ - @Override public int getOrder() { if (this.aspectInstance instanceof Ordered) { return ((Ordered) this.aspectInstance).getOrder(); diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/TypePatternClassFilter.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/TypePatternClassFilter.java index f2893fc583..adb8c4db37 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/TypePatternClassFilter.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/TypePatternClassFilter.java @@ -93,7 +93,6 @@ public class TypePatternClassFilter implements ClassFilter { * @return whether the advice should apply to this candidate target class * @throws IllegalStateException if no {@link #setTypePattern(String)} has been set */ - @Override public boolean matches(Class clazz) { if (this.aspectJTypePatternMatcher == null) { throw new IllegalStateException("No 'typePattern' has been set via ctor/setter."); diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/AbstractAspectJAdvisorFactory.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/AbstractAspectJAdvisorFactory.java index add6c5fac2..5b3f48bce8 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/AbstractAspectJAdvisorFactory.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/AbstractAspectJAdvisorFactory.java @@ -111,7 +111,6 @@ public abstract class AbstractAspectJAdvisorFactory implements AspectJAdvisorFac * is that aspects written in the code-style (AspectJ language) also have the annotation present * when compiled by ajc with the -1.5 flag, yet they cannot be consumed by Spring AOP. */ - @Override public boolean isAspect(Class clazz) { return (hasAspectAnnotation(clazz) && !compiledByAjc(clazz)); } @@ -136,7 +135,6 @@ public abstract class AbstractAspectJAdvisorFactory implements AspectJAdvisorFac return false; } - @Override public void validate(Class aspectClass) throws AopConfigException { // If the parent has the annotation and isn't abstract it's an error if (aspectClass.getSuperclass().getAnnotation(Aspect.class) != null && @@ -311,7 +309,6 @@ public abstract class AbstractAspectJAdvisorFactory implements AspectJAdvisorFac */ private static class AspectJAnnotationParameterNameDiscoverer implements ParameterNameDiscoverer { - @Override public String[] getParameterNames(Method method) { if (method.getParameterTypes().length == 0) { return new String[0]; @@ -333,7 +330,6 @@ public abstract class AbstractAspectJAdvisorFactory implements AspectJAdvisorFac } } - @Override public String[] getParameterNames(Constructor ctor) { throw new UnsupportedOperationException("Spring AOP cannot handle constructor advice"); } diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/BeanFactoryAspectInstanceFactory.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/BeanFactoryAspectInstanceFactory.java index 855af77216..81a6c2a3ad 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/BeanFactoryAspectInstanceFactory.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/BeanFactoryAspectInstanceFactory.java @@ -72,12 +72,10 @@ public class BeanFactoryAspectInstanceFactory implements MetadataAwareAspectInst } - @Override public Object getAspectInstance() { return this.beanFactory.getBean(this.name); } - @Override public ClassLoader getAspectClassLoader() { if (this.beanFactory instanceof ConfigurableBeanFactory) { return ((ConfigurableBeanFactory) this.beanFactory).getBeanClassLoader(); @@ -87,7 +85,6 @@ public class BeanFactoryAspectInstanceFactory implements MetadataAwareAspectInst } } - @Override public AspectMetadata getAspectMetadata() { return this.aspectMetadata; } @@ -102,7 +99,6 @@ public class BeanFactoryAspectInstanceFactory implements MetadataAwareAspectInst * @see org.springframework.core.Ordered * @see org.springframework.core.annotation.Order */ - @Override public int getOrder() { Class type = this.beanFactory.getType(this.name); if (type != null) { diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/InstantiationModelAwarePointcutAdvisorImpl.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/InstantiationModelAwarePointcutAdvisorImpl.java index 2d16ece7c5..b9863ab67a 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/InstantiationModelAwarePointcutAdvisorImpl.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/InstantiationModelAwarePointcutAdvisorImpl.java @@ -97,7 +97,6 @@ class InstantiationModelAwarePointcutAdvisorImpl * The pointcut for Spring AOP to use. Actual behaviour of the pointcut will change * depending on the state of the advice. */ - @Override public Pointcut getPointcut() { return this.pointcut; } @@ -107,7 +106,6 @@ class InstantiationModelAwarePointcutAdvisorImpl * are much richer. In AspectJ terminology, all a return of {@code true} * means here is that the aspect is not a SINGLETON. */ - @Override public boolean isPerInstance() { return (getAspectMetadata().getAjType().getPerClause().getKind() != PerClauseKind.SINGLETON); } @@ -122,7 +120,6 @@ class InstantiationModelAwarePointcutAdvisorImpl /** * Lazily instantiate advice if necessary. */ - @Override public synchronized Advice getAdvice() { if (this.instantiatedAdvice == null) { this.instantiatedAdvice = instantiateAdvice(this.declaredPointcut); @@ -130,12 +127,10 @@ class InstantiationModelAwarePointcutAdvisorImpl return this.instantiatedAdvice; } - @Override public boolean isLazy() { return this.lazy; } - @Override public synchronized boolean isAdviceInstantiated() { return (this.instantiatedAdvice != null); } @@ -154,22 +149,18 @@ class InstantiationModelAwarePointcutAdvisorImpl return this.declaredPointcut; } - @Override public int getOrder() { return this.aspectInstanceFactory.getOrder(); } - @Override public String getAspectName() { return this.aspectName; } - @Override public int getDeclarationOrder() { return this.declarationOrder; } - @Override public boolean isBeforeAdvice() { if (this.isBeforeAdvice == null) { determineAdviceType(); @@ -177,7 +168,6 @@ class InstantiationModelAwarePointcutAdvisorImpl return this.isBeforeAdvice; } - @Override public boolean isAfterAdvice() { if (this.isAfterAdvice == null) { determineAdviceType(); @@ -255,7 +245,6 @@ class InstantiationModelAwarePointcutAdvisorImpl this.preInstantiationPointcut.getMethodMatcher().matches(method, targetClass); } - @Override public boolean matches(Method method, Class targetClass, Object[] args) { // This can match only on declared pointcut. return (isAspectMaterialized() && this.declaredPointcut.matches(method, targetClass)); diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/LazySingletonAspectInstanceFactoryDecorator.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/LazySingletonAspectInstanceFactoryDecorator.java index 36bb4eeb42..d4f0709b61 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/LazySingletonAspectInstanceFactoryDecorator.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/LazySingletonAspectInstanceFactoryDecorator.java @@ -42,7 +42,6 @@ public class LazySingletonAspectInstanceFactoryDecorator implements MetadataAwar } - @Override public synchronized Object getAspectInstance() { if (this.materialized == null) { synchronized (this) { @@ -58,17 +57,14 @@ public class LazySingletonAspectInstanceFactoryDecorator implements MetadataAwar return (this.materialized != null); } - @Override public ClassLoader getAspectClassLoader() { return this.maaif.getAspectClassLoader(); } - @Override public AspectMetadata getAspectMetadata() { return this.maaif.getAspectMetadata(); } - @Override public int getOrder() { return this.maaif.getOrder(); } diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/ReflectiveAspectJAdvisorFactory.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/ReflectiveAspectJAdvisorFactory.java index 35ed1e2847..f8d684bc3b 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/ReflectiveAspectJAdvisorFactory.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/ReflectiveAspectJAdvisorFactory.java @@ -75,7 +75,6 @@ public class ReflectiveAspectJAdvisorFactory extends AbstractAspectJAdvisorFacto new InstanceComparator( Around.class, Before.class, After.class, AfterReturning.class, AfterThrowing.class), new Converter() { - @Override public Annotation convert(Method method) { AspectJAnnotation annotation = AbstractAspectJAdvisorFactory.findAspectJAnnotationOnMethod(method); return annotation == null ? null : annotation.getAnnotation(); @@ -83,7 +82,6 @@ public class ReflectiveAspectJAdvisorFactory extends AbstractAspectJAdvisorFacto })); comparator.addComparator(new ConvertingComparator( new Converter() { - @Override public String convert(Method method) { return method.getName(); } @@ -92,7 +90,6 @@ public class ReflectiveAspectJAdvisorFactory extends AbstractAspectJAdvisorFacto } - @Override public List getAdvisors(MetadataAwareAspectInstanceFactory maaif) { final Class aspectClass = maaif.getAspectMetadata().getAspectClass(); final String aspectName = maaif.getAspectMetadata().getAspectName(); @@ -131,7 +128,6 @@ public class ReflectiveAspectJAdvisorFactory extends AbstractAspectJAdvisorFacto private List getAdvisorMethods(Class aspectClass) { final List methods = new LinkedList(); ReflectionUtils.doWithMethods(aspectClass, new ReflectionUtils.MethodCallback() { - @Override public void doWith(Method method) throws IllegalArgumentException { // Exclude pointcuts if (AnnotationUtils.getAnnotation(method, Pointcut.class) == null) { @@ -168,7 +164,6 @@ public class ReflectiveAspectJAdvisorFactory extends AbstractAspectJAdvisorFacto } - @Override public Advisor getAdvisor(Method candidateAdviceMethod, MetadataAwareAspectInstanceFactory aif, int declarationOrderInAspect, String aspectName) { @@ -196,7 +191,6 @@ public class ReflectiveAspectJAdvisorFactory extends AbstractAspectJAdvisorFacto } - @Override public Advice getAdvice(Method candidateAdviceMethod, AspectJExpressionPointcut ajexp, MetadataAwareAspectInstanceFactory aif, int declarationOrderInAspect, String aspectName) { @@ -278,7 +272,6 @@ public class ReflectiveAspectJAdvisorFactory extends AbstractAspectJAdvisorFacto public SyntheticInstantiationAdvisor(final MetadataAwareAspectInstanceFactory aif) { super(aif.getAspectMetadata().getPerClausePointcut(), new MethodBeforeAdvice() { - @Override public void before(Method method, Object[] args, Object target) { // Simply instantiate the aspect aif.getAspectInstance(); diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/SimpleMetadataAwareAspectInstanceFactory.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/SimpleMetadataAwareAspectInstanceFactory.java index 70ff5e6532..bb623b372b 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/SimpleMetadataAwareAspectInstanceFactory.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/SimpleMetadataAwareAspectInstanceFactory.java @@ -45,7 +45,6 @@ public class SimpleMetadataAwareAspectInstanceFactory extends SimpleAspectInstan } - @Override public final AspectMetadata getAspectMetadata() { return this.metadata; } diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/SingletonMetadataAwareAspectInstanceFactory.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/SingletonMetadataAwareAspectInstanceFactory.java index 31f1e18f27..ef9014a144 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/SingletonMetadataAwareAspectInstanceFactory.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/SingletonMetadataAwareAspectInstanceFactory.java @@ -47,7 +47,6 @@ public class SingletonMetadataAwareAspectInstanceFactory extends SingletonAspect } - @Override public final AspectMetadata getAspectMetadata() { return this.metadata; } diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/autoproxy/AspectJAwareAdvisorAutoProxyCreator.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/autoproxy/AspectJAwareAdvisorAutoProxyCreator.java index 847b1932af..dbfcbd380e 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/autoproxy/AspectJAwareAdvisorAutoProxyCreator.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/autoproxy/AspectJAwareAdvisorAutoProxyCreator.java @@ -131,13 +131,11 @@ public class AspectJAwareAdvisorAutoProxyCreator extends AbstractAdvisorAutoProx this.comparator = comparator; } - @Override public int compareTo(Object obj) { Advisor otherAdvisor = ((PartiallyComparableAdvisorHolder) obj).advisor; return this.comparator.compare(this.advisor, otherAdvisor); } - @Override public int fallbackCompareTo(Object obj) { return 0; } diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/autoproxy/AspectJPrecedenceComparator.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/autoproxy/AspectJPrecedenceComparator.java index 2e2134675b..0dd176354e 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/autoproxy/AspectJPrecedenceComparator.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/autoproxy/AspectJPrecedenceComparator.java @@ -76,7 +76,6 @@ class AspectJPrecedenceComparator implements Comparator { } - @Override public int compare(Object o1, Object o2) { if (!(o1 instanceof Advisor && o2 instanceof Advisor)) { throw new IllegalArgumentException( diff --git a/spring-aop/src/main/java/org/springframework/aop/config/AbstractInterceptorDrivenBeanDefinitionDecorator.java b/spring-aop/src/main/java/org/springframework/aop/config/AbstractInterceptorDrivenBeanDefinitionDecorator.java index 65169d1a8d..6e58344f80 100644 --- a/spring-aop/src/main/java/org/springframework/aop/config/AbstractInterceptorDrivenBeanDefinitionDecorator.java +++ b/spring-aop/src/main/java/org/springframework/aop/config/AbstractInterceptorDrivenBeanDefinitionDecorator.java @@ -58,7 +58,6 @@ import org.springframework.util.StringUtils; */ public abstract class AbstractInterceptorDrivenBeanDefinitionDecorator implements BeanDefinitionDecorator { - @Override public final BeanDefinitionHolder decorate(Node node, BeanDefinitionHolder definitionHolder, ParserContext parserContext) { BeanDefinitionRegistry registry = parserContext.getRegistry(); diff --git a/spring-aop/src/main/java/org/springframework/aop/config/AdvisorComponentDefinition.java b/spring-aop/src/main/java/org/springframework/aop/config/AdvisorComponentDefinition.java index bd86b2ea2e..374e40290a 100644 --- a/spring-aop/src/main/java/org/springframework/aop/config/AdvisorComponentDefinition.java +++ b/spring-aop/src/main/java/org/springframework/aop/config/AdvisorComponentDefinition.java @@ -91,7 +91,6 @@ public class AdvisorComponentDefinition extends AbstractComponentDefinition { } - @Override public String getName() { return this.advisorBeanName; } @@ -111,7 +110,6 @@ public class AdvisorComponentDefinition extends AbstractComponentDefinition { return this.beanReferences; } - @Override public Object getSource() { return this.advisorDefinition.getSource(); } diff --git a/spring-aop/src/main/java/org/springframework/aop/config/AopNamespaceHandler.java b/spring-aop/src/main/java/org/springframework/aop/config/AopNamespaceHandler.java index 459c394219..611376efb9 100644 --- a/spring-aop/src/main/java/org/springframework/aop/config/AopNamespaceHandler.java +++ b/spring-aop/src/main/java/org/springframework/aop/config/AopNamespaceHandler.java @@ -59,7 +59,6 @@ public class AopNamespaceHandler extends NamespaceHandlerSupport { * '{@code config}', '{@code spring-configured}', '{@code aspectj-autoproxy}' * and '{@code scoped-proxy}' tags. */ - @Override public void init() { // In 2.0 XSD as well as in 2.1 XSD. registerBeanDefinitionParser("config", new ConfigBeanDefinitionParser()); diff --git a/spring-aop/src/main/java/org/springframework/aop/config/AspectJAutoProxyBeanDefinitionParser.java b/spring-aop/src/main/java/org/springframework/aop/config/AspectJAutoProxyBeanDefinitionParser.java index 95371f59b7..aa3d70d11e 100644 --- a/spring-aop/src/main/java/org/springframework/aop/config/AspectJAutoProxyBeanDefinitionParser.java +++ b/spring-aop/src/main/java/org/springframework/aop/config/AspectJAutoProxyBeanDefinitionParser.java @@ -37,7 +37,6 @@ import org.springframework.beans.factory.xml.ParserContext; */ class AspectJAutoProxyBeanDefinitionParser implements BeanDefinitionParser { - @Override public BeanDefinition parse(Element element, ParserContext parserContext) { AopNamespaceUtils.registerAspectJAnnotationAutoProxyCreatorIfNecessary(parserContext, element); extendBeanDefinition(element, parserContext); diff --git a/spring-aop/src/main/java/org/springframework/aop/config/ConfigBeanDefinitionParser.java b/spring-aop/src/main/java/org/springframework/aop/config/ConfigBeanDefinitionParser.java index c7cb6735d6..9f75cba9be 100644 --- a/spring-aop/src/main/java/org/springframework/aop/config/ConfigBeanDefinitionParser.java +++ b/spring-aop/src/main/java/org/springframework/aop/config/ConfigBeanDefinitionParser.java @@ -95,7 +95,6 @@ class ConfigBeanDefinitionParser implements BeanDefinitionParser { private ParseState parseState = new ParseState(); - @Override public BeanDefinition parse(Element element, ParserContext parserContext) { CompositeComponentDefinition compositeDef = new CompositeComponentDefinition(element.getTagName(), parserContext.extractSource(element)); diff --git a/spring-aop/src/main/java/org/springframework/aop/config/MethodLocatingFactoryBean.java b/spring-aop/src/main/java/org/springframework/aop/config/MethodLocatingFactoryBean.java index abb26930cb..2db62fc3b5 100644 --- a/spring-aop/src/main/java/org/springframework/aop/config/MethodLocatingFactoryBean.java +++ b/spring-aop/src/main/java/org/springframework/aop/config/MethodLocatingFactoryBean.java @@ -57,7 +57,6 @@ public class MethodLocatingFactoryBean implements FactoryBean, BeanFacto this.methodName = methodName; } - @Override public void setBeanFactory(BeanFactory beanFactory) { if (!StringUtils.hasText(this.targetBeanName)) { throw new IllegalArgumentException("Property 'targetBeanName' is required"); @@ -79,17 +78,14 @@ public class MethodLocatingFactoryBean implements FactoryBean, BeanFacto } - @Override public Method getObject() throws Exception { return this.method; } - @Override public Class getObjectType() { return Method.class; } - @Override public boolean isSingleton() { return true; } diff --git a/spring-aop/src/main/java/org/springframework/aop/config/PointcutComponentDefinition.java b/spring-aop/src/main/java/org/springframework/aop/config/PointcutComponentDefinition.java index 3cbf472e58..1c26f37810 100644 --- a/spring-aop/src/main/java/org/springframework/aop/config/PointcutComponentDefinition.java +++ b/spring-aop/src/main/java/org/springframework/aop/config/PointcutComponentDefinition.java @@ -46,7 +46,6 @@ public class PointcutComponentDefinition extends AbstractComponentDefinition { } - @Override public String getName() { return this.pointcutBeanName; } @@ -61,7 +60,6 @@ public class PointcutComponentDefinition extends AbstractComponentDefinition { return new BeanDefinition[] {this.pointcutDefinition}; } - @Override public Object getSource() { return this.pointcutDefinition.getSource(); } diff --git a/spring-aop/src/main/java/org/springframework/aop/config/ScopedProxyBeanDefinitionDecorator.java b/spring-aop/src/main/java/org/springframework/aop/config/ScopedProxyBeanDefinitionDecorator.java index 0acf968b51..0d2daf364f 100644 --- a/spring-aop/src/main/java/org/springframework/aop/config/ScopedProxyBeanDefinitionDecorator.java +++ b/spring-aop/src/main/java/org/springframework/aop/config/ScopedProxyBeanDefinitionDecorator.java @@ -39,7 +39,6 @@ class ScopedProxyBeanDefinitionDecorator implements BeanDefinitionDecorator { private static final String PROXY_TARGET_CLASS = "proxy-target-class"; - @Override public BeanDefinitionHolder decorate(Node node, BeanDefinitionHolder definition, ParserContext parserContext) { boolean proxyTargetClass = true; if (node instanceof Element) { diff --git a/spring-aop/src/main/java/org/springframework/aop/config/SimpleBeanFactoryAwareAspectInstanceFactory.java b/spring-aop/src/main/java/org/springframework/aop/config/SimpleBeanFactoryAwareAspectInstanceFactory.java index 64cc673bab..cd6dd5a293 100644 --- a/spring-aop/src/main/java/org/springframework/aop/config/SimpleBeanFactoryAwareAspectInstanceFactory.java +++ b/spring-aop/src/main/java/org/springframework/aop/config/SimpleBeanFactoryAwareAspectInstanceFactory.java @@ -47,7 +47,6 @@ public class SimpleBeanFactoryAwareAspectInstanceFactory implements AspectInstan this.aspectBeanName = aspectBeanName; } - @Override public void setBeanFactory(BeanFactory beanFactory) { this.beanFactory = beanFactory; if (!StringUtils.hasText(this.aspectBeanName)) { @@ -60,12 +59,10 @@ public class SimpleBeanFactoryAwareAspectInstanceFactory implements AspectInstan * Look up the aspect bean from the {@link BeanFactory} and returns it. * @see #setAspectBeanName */ - @Override public Object getAspectInstance() { return this.beanFactory.getBean(this.aspectBeanName); } - @Override public ClassLoader getAspectClassLoader() { if (this.beanFactory instanceof ConfigurableBeanFactory) { return ((ConfigurableBeanFactory) this.beanFactory).getBeanClassLoader(); @@ -75,7 +72,6 @@ public class SimpleBeanFactoryAwareAspectInstanceFactory implements AspectInstan } } - @Override public int getOrder() { if (this.beanFactory.isSingleton(this.aspectBeanName) && this.beanFactory.isTypeMatch(this.aspectBeanName, Ordered.class)) { diff --git a/spring-aop/src/main/java/org/springframework/aop/config/SpringConfiguredBeanDefinitionParser.java b/spring-aop/src/main/java/org/springframework/aop/config/SpringConfiguredBeanDefinitionParser.java index 59aed08e0e..21bf0edd5b 100644 --- a/spring-aop/src/main/java/org/springframework/aop/config/SpringConfiguredBeanDefinitionParser.java +++ b/spring-aop/src/main/java/org/springframework/aop/config/SpringConfiguredBeanDefinitionParser.java @@ -50,7 +50,6 @@ class SpringConfiguredBeanDefinitionParser implements BeanDefinitionParser { "org.springframework.beans.factory.aspectj.AnnotationBeanConfigurerAspect"; - @Override public BeanDefinition parse(Element element, ParserContext parserContext) { if (!parserContext.getRegistry().containsBeanDefinition(BEAN_CONFIGURER_ASPECT_BEAN_NAME)) { RootBeanDefinition def = new RootBeanDefinition(); diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/AbstractAdvisingBeanPostProcessor.java b/spring-aop/src/main/java/org/springframework/aop/framework/AbstractAdvisingBeanPostProcessor.java index f65ae62508..9e6baee932 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/AbstractAdvisingBeanPostProcessor.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/AbstractAdvisingBeanPostProcessor.java @@ -50,7 +50,6 @@ public abstract class AbstractAdvisingBeanPostProcessor extends ProxyConfig private final Map eligibleBeans = new ConcurrentHashMap(64); - @Override public void setBeanClassLoader(ClassLoader beanClassLoader) { this.beanClassLoader = beanClassLoader; } @@ -59,18 +58,15 @@ public abstract class AbstractAdvisingBeanPostProcessor extends ProxyConfig this.order = order; } - @Override public int getOrder() { return this.order; } - @Override public Object postProcessBeforeInitialization(Object bean, String beanName) { return bean; } - @Override public Object postProcessAfterInitialization(Object bean, String beanName) { if (bean instanceof AopInfrastructureBean) { // Ignore AOP infrastructure such as scoped proxies. diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/AbstractSingletonProxyFactoryBean.java b/spring-aop/src/main/java/org/springframework/aop/framework/AbstractSingletonProxyFactoryBean.java index 261d1cab60..8617107350 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/AbstractSingletonProxyFactoryBean.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/AbstractSingletonProxyFactoryBean.java @@ -122,7 +122,6 @@ public abstract class AbstractSingletonProxyFactoryBean extends ProxyConfig this.proxyClassLoader = classLoader; } - @Override public void setBeanClassLoader(ClassLoader classLoader) { if (this.proxyClassLoader == null) { this.proxyClassLoader = classLoader; @@ -130,7 +129,6 @@ public abstract class AbstractSingletonProxyFactoryBean extends ProxyConfig } - @Override public void afterPropertiesSet() { if (this.target == null) { throw new IllegalArgumentException("Property 'target' is required"); @@ -192,7 +190,6 @@ public abstract class AbstractSingletonProxyFactoryBean extends ProxyConfig } - @Override public Object getObject() { if (this.proxy == null) { throw new FactoryBeanNotInitializedException(); @@ -200,7 +197,6 @@ public abstract class AbstractSingletonProxyFactoryBean extends ProxyConfig return this.proxy; } - @Override public Class getObjectType() { if (this.proxy != null) { return this.proxy.getClass(); @@ -217,7 +213,6 @@ public abstract class AbstractSingletonProxyFactoryBean extends ProxyConfig return null; } - @Override public final boolean isSingleton() { return true; } diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/AdvisedSupport.java b/spring-aop/src/main/java/org/springframework/aop/framework/AdvisedSupport.java index 5cf6828d66..e5f89177b6 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/AdvisedSupport.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/AdvisedSupport.java @@ -137,12 +137,10 @@ public class AdvisedSupport extends ProxyConfig implements Advised { setTargetSource(new SingletonTargetSource(target)); } - @Override public void setTargetSource(TargetSource targetSource) { this.targetSource = (targetSource != null ? targetSource : EMPTY_TARGET_SOURCE); } - @Override public TargetSource getTargetSource() { return this.targetSource; } @@ -164,17 +162,14 @@ public class AdvisedSupport extends ProxyConfig implements Advised { this.targetSource = EmptyTargetSource.forClass(targetClass); } - @Override public Class getTargetClass() { return this.targetSource.getTargetClass(); } - @Override public void setPreFiltered(boolean preFiltered) { this.preFiltered = preFiltered; } - @Override public boolean isPreFiltered() { return this.preFiltered; } @@ -233,12 +228,10 @@ public class AdvisedSupport extends ProxyConfig implements Advised { return this.interfaces.remove(intf); } - @Override public Class[] getProxiedInterfaces() { return this.interfaces.toArray(new Class[this.interfaces.size()]); } - @Override public boolean isInterfaceProxied(Class intf) { for (Class proxyIntf : this.interfaces) { if (intf.isAssignableFrom(proxyIntf)) { @@ -249,18 +242,15 @@ public class AdvisedSupport extends ProxyConfig implements Advised { } - @Override public final Advisor[] getAdvisors() { return this.advisorArray; } - @Override public void addAdvisor(Advisor advisor) { int pos = this.advisors.size(); addAdvisor(pos, advisor); } - @Override public void addAdvisor(int pos, Advisor advisor) throws AopConfigException { if (advisor instanceof IntroductionAdvisor) { validateIntroductionAdvisor((IntroductionAdvisor) advisor); @@ -268,7 +258,6 @@ public class AdvisedSupport extends ProxyConfig implements Advised { addAdvisorInternal(pos, advisor); } - @Override public boolean removeAdvisor(Advisor advisor) { int index = indexOf(advisor); if (index == -1) { @@ -280,7 +269,6 @@ public class AdvisedSupport extends ProxyConfig implements Advised { } } - @Override public void removeAdvisor(int index) throws AopConfigException { if (isFrozen()) { throw new AopConfigException("Cannot remove Advisor: Configuration is frozen."); @@ -304,13 +292,11 @@ public class AdvisedSupport extends ProxyConfig implements Advised { adviceChanged(); } - @Override public int indexOf(Advisor advisor) { Assert.notNull(advisor, "Advisor must not be null"); return this.advisors.indexOf(advisor); } - @Override public boolean replaceAdvisor(Advisor a, Advisor b) throws AopConfigException { Assert.notNull(a, "Advisor a must not be null"); Assert.notNull(b, "Advisor b must not be null"); @@ -402,7 +388,6 @@ public class AdvisedSupport extends ProxyConfig implements Advised { } - @Override public void addAdvice(Advice advice) throws AopConfigException { int pos = this.advisors.size(); addAdvice(pos, advice); @@ -411,7 +396,6 @@ public class AdvisedSupport extends ProxyConfig implements Advised { /** * Cannot add introductions this way unless the advice implements IntroductionInfo. */ - @Override public void addAdvice(int pos, Advice advice) throws AopConfigException { Assert.notNull(advice, "Advice must not be null"); if (advice instanceof IntroductionInfo) { @@ -428,7 +412,6 @@ public class AdvisedSupport extends ProxyConfig implements Advised { } } - @Override public boolean removeAdvice(Advice advice) throws AopConfigException { int index = indexOf(advice); if (index == -1) { @@ -440,7 +423,6 @@ public class AdvisedSupport extends ProxyConfig implements Advised { } } - @Override public int indexOf(Advice advice) { Assert.notNull(advice, "Advice must not be null"); for (int i = 0; i < this.advisors.size(); i++) { @@ -572,7 +554,6 @@ public class AdvisedSupport extends ProxyConfig implements Advised { } - @Override public String toProxyConfigString() { return toString(); } diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/CglibAopProxy.java b/spring-aop/src/main/java/org/springframework/aop/framework/CglibAopProxy.java index 6ee9f6d450..5801458ff0 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/CglibAopProxy.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/CglibAopProxy.java @@ -146,12 +146,10 @@ final class CglibAopProxy implements AopProxy, Serializable { } - @Override public Object getProxy() { return getProxy(null); } - @Override public Object getProxy(ClassLoader classLoader) { if (logger.isDebugEnabled()) { logger.debug("Creating CGLIB proxy: target source is " + this.advised.getTargetSource()); @@ -388,7 +386,6 @@ final class CglibAopProxy implements AopProxy, Serializable { this.target = target; } - @Override public Object intercept(Object proxy, Method method, Object[] args, MethodProxy methodProxy) throws Throwable { Object retVal = methodProxy.invoke(this.target, args); return processReturnType(proxy, this.target, method, retVal); @@ -408,7 +405,6 @@ final class CglibAopProxy implements AopProxy, Serializable { this.target = target; } - @Override public Object intercept(Object proxy, Method method, Object[] args, MethodProxy methodProxy) throws Throwable { Object oldProxy = null; try { @@ -436,7 +432,6 @@ final class CglibAopProxy implements AopProxy, Serializable { this.targetSource = targetSource; } - @Override public Object intercept(Object proxy, Method method, Object[] args, MethodProxy methodProxy) throws Throwable { Object target = this.targetSource.getTarget(); try { @@ -461,7 +456,6 @@ final class CglibAopProxy implements AopProxy, Serializable { this.targetSource = targetSource; } - @Override public Object intercept(Object proxy, Method method, Object[] args, MethodProxy methodProxy) throws Throwable { Object oldProxy = null; Object target = this.targetSource.getTarget(); @@ -491,7 +485,6 @@ final class CglibAopProxy implements AopProxy, Serializable { this.target = target; } - @Override public Object loadObject() { return this.target; } @@ -509,7 +502,6 @@ final class CglibAopProxy implements AopProxy, Serializable { this.advised = advised; } - @Override public Object loadObject() throws Exception { return this.advised; } @@ -528,7 +520,6 @@ final class CglibAopProxy implements AopProxy, Serializable { this.advised = advised; } - @Override public Object intercept(Object proxy, Method method, Object[] args, MethodProxy methodProxy) { Object other = args[0]; if (proxy == other) { @@ -561,7 +552,6 @@ final class CglibAopProxy implements AopProxy, Serializable { this.advised = advised; } - @Override public Object intercept(Object proxy, Method method, Object[] args, MethodProxy methodProxy) { return CglibAopProxy.class.hashCode() * 13 + this.advised.getTargetSource().hashCode(); } @@ -585,7 +575,6 @@ final class CglibAopProxy implements AopProxy, Serializable { this.targetClass = targetClass; } - @Override public Object intercept(Object proxy, Method method, Object[] args, MethodProxy methodProxy) throws Throwable { MethodInvocation invocation = new CglibMethodInvocation(proxy, this.target, method, args, this.targetClass, this.adviceChain, methodProxy); @@ -609,7 +598,6 @@ final class CglibAopProxy implements AopProxy, Serializable { this.advised = advised; } - @Override public Object intercept(Object proxy, Method method, Object[] args, MethodProxy methodProxy) throws Throwable { Object oldProxy = null; boolean setProxyContext = false; @@ -766,7 +754,6 @@ final class CglibAopProxy implements AopProxy, Serializable { * DynamicUnadvisedInterceptor already considers this. * */ - @Override public int accept(Method method) { if (AopUtils.isFinalizeMethod(method)) { logger.debug("Found finalize() method - using NO_OVERRIDE"); diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/DefaultAdvisorChainFactory.java b/spring-aop/src/main/java/org/springframework/aop/framework/DefaultAdvisorChainFactory.java index 3eef11bd9b..90eeef7b48 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/DefaultAdvisorChainFactory.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/DefaultAdvisorChainFactory.java @@ -46,7 +46,6 @@ import org.springframework.aop.support.MethodMatchers; @SuppressWarnings("serial") public class DefaultAdvisorChainFactory implements AdvisorChainFactory, Serializable { - @Override public List getInterceptorsAndDynamicInterceptionAdvice( Advised config, Method method, Class targetClass) { diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/DefaultAopProxyFactory.java b/spring-aop/src/main/java/org/springframework/aop/framework/DefaultAopProxyFactory.java index 5d3640677a..8b95e3303b 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/DefaultAopProxyFactory.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/DefaultAopProxyFactory.java @@ -49,7 +49,6 @@ import org.springframework.aop.SpringProxy; public class DefaultAopProxyFactory implements AopProxyFactory, Serializable { - @Override public AopProxy createAopProxy(AdvisedSupport config) throws AopConfigException { if (config.isOptimize() || config.isProxyTargetClass() || hasNoUserSuppliedProxyInterfaces(config)) { Class targetClass = config.getTargetClass(); diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/JdkDynamicAopProxy.java b/spring-aop/src/main/java/org/springframework/aop/framework/JdkDynamicAopProxy.java index ad36cd8934..7e10c4c228 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/JdkDynamicAopProxy.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/JdkDynamicAopProxy.java @@ -106,12 +106,10 @@ final class JdkDynamicAopProxy implements AopProxy, InvocationHandler, Serializa } - @Override public Object getProxy() { return getProxy(ClassUtils.getDefaultClassLoader()); } - @Override public Object getProxy(ClassLoader classLoader) { if (logger.isDebugEnabled()) { logger.debug("Creating JDK dynamic proxy: target source is " + this.advised.getTargetSource()); @@ -149,7 +147,6 @@ final class JdkDynamicAopProxy implements AopProxy, InvocationHandler, Serializa *

Callers will see exactly the exception thrown by the target, * unless a hook method throws an exception. */ - @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { MethodInvocation invocation; Object oldProxy = null; diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/ProxyFactoryBean.java b/spring-aop/src/main/java/org/springframework/aop/framework/ProxyFactoryBean.java index 7e62678340..a369f56c82 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/ProxyFactoryBean.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/ProxyFactoryBean.java @@ -218,14 +218,12 @@ public class ProxyFactoryBean extends ProxyCreatorSupport this.classLoaderConfigured = (classLoader != null); } - @Override public void setBeanClassLoader(ClassLoader classLoader) { if (!this.classLoaderConfigured) { this.proxyClassLoader = classLoader; } } - @Override public void setBeanFactory(BeanFactory beanFactory) { this.beanFactory = beanFactory; checkInterceptorNames(); @@ -239,7 +237,6 @@ public class ProxyFactoryBean extends ProxyCreatorSupport * {@code getObject()} for a proxy. * @return a fresh AOP proxy reflecting the current state of this factory */ - @Override public Object getObject() throws BeansException { initializeAdvisorChain(); if (isSingleton()) { @@ -260,7 +257,6 @@ public class ProxyFactoryBean extends ProxyCreatorSupport * a single one), the target bean type, or the TargetSource's target class. * @see org.springframework.aop.TargetSource#getTargetClass */ - @Override public Class getObjectType() { synchronized (this) { if (this.singletonInstance != null) { @@ -282,7 +278,6 @@ public class ProxyFactoryBean extends ProxyCreatorSupport } } - @Override public boolean isSingleton() { return this.singleton; } @@ -643,12 +638,10 @@ public class ProxyFactoryBean extends ProxyCreatorSupport return beanName; } - @Override public Advice getAdvice() { throw new UnsupportedOperationException("Cannot invoke methods: " + this.message); } - @Override public boolean isPerInstance() { throw new UnsupportedOperationException("Cannot invoke methods: " + this.message); } diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/ReflectiveMethodInvocation.java b/spring-aop/src/main/java/org/springframework/aop/framework/ReflectiveMethodInvocation.java index 8556823d92..c9ac099b48 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/ReflectiveMethodInvocation.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/ReflectiveMethodInvocation.java @@ -114,17 +114,14 @@ public class ReflectiveMethodInvocation implements ProxyMethodInvocation, Clonea } - @Override public final Object getProxy() { return this.proxy; } - @Override public final Object getThis() { return this.target; } - @Override public final AccessibleObject getStaticPart() { return this.method; } @@ -134,23 +131,19 @@ public class ReflectiveMethodInvocation implements ProxyMethodInvocation, Clonea * May or may not correspond with a method invoked on an underlying * implementation of that interface. */ - @Override public final Method getMethod() { return this.method; } - @Override public final Object[] getArguments() { return (this.arguments != null ? this.arguments : new Object[0]); } - @Override public void setArguments(Object[] arguments) { this.arguments = arguments; } - @Override public Object proceed() throws Throwable { // We start with an index of -1 and increment early. if (this.currentInterceptorIndex == this.interceptorsAndDynamicMethodMatchers.size() - 1) { @@ -199,7 +192,6 @@ public class ReflectiveMethodInvocation implements ProxyMethodInvocation, Clonea * current interceptor index. * @see java.lang.Object#clone() */ - @Override public MethodInvocation invocableClone() { Object[] cloneArguments = null; if (this.arguments != null) { @@ -218,7 +210,6 @@ public class ReflectiveMethodInvocation implements ProxyMethodInvocation, Clonea * current interceptor index. * @see java.lang.Object#clone() */ - @Override public MethodInvocation invocableClone(Object[] arguments) { // Force initialization of the user attributes Map, // for having a shared Map reference in the clone. @@ -239,7 +230,6 @@ public class ReflectiveMethodInvocation implements ProxyMethodInvocation, Clonea } - @Override public void setUserAttribute(String key, Object value) { if (value != null) { if (this.userAttributes == null) { @@ -254,7 +244,6 @@ public class ReflectiveMethodInvocation implements ProxyMethodInvocation, Clonea } } - @Override public Object getUserAttribute(String key) { return (this.userAttributes != null ? this.userAttributes.get(key) : null); } diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/adapter/AdvisorAdapterRegistrationManager.java b/spring-aop/src/main/java/org/springframework/aop/framework/adapter/AdvisorAdapterRegistrationManager.java index 4ef00db86c..76b1d7c2d3 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/adapter/AdvisorAdapterRegistrationManager.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/adapter/AdvisorAdapterRegistrationManager.java @@ -48,12 +48,10 @@ public class AdvisorAdapterRegistrationManager implements BeanPostProcessor { } - @Override public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { return bean; } - @Override public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { if (bean instanceof AdvisorAdapter){ this.advisorAdapterRegistry.registerAdvisorAdapter((AdvisorAdapter) bean); diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/adapter/AfterReturningAdviceAdapter.java b/spring-aop/src/main/java/org/springframework/aop/framework/adapter/AfterReturningAdviceAdapter.java index de562f4fbe..a921e6e509 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/adapter/AfterReturningAdviceAdapter.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/adapter/AfterReturningAdviceAdapter.java @@ -34,12 +34,10 @@ import org.springframework.aop.AfterReturningAdvice; @SuppressWarnings("serial") class AfterReturningAdviceAdapter implements AdvisorAdapter, Serializable { - @Override public boolean supportsAdvice(Advice advice) { return (advice instanceof AfterReturningAdvice); } - @Override public MethodInterceptor getInterceptor(Advisor advisor) { AfterReturningAdvice advice = (AfterReturningAdvice) advisor.getAdvice(); return new AfterReturningAdviceInterceptor(advice); diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/adapter/AfterReturningAdviceInterceptor.java b/spring-aop/src/main/java/org/springframework/aop/framework/adapter/AfterReturningAdviceInterceptor.java index 5e0bd1d23d..9f8f698faf 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/adapter/AfterReturningAdviceInterceptor.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/adapter/AfterReturningAdviceInterceptor.java @@ -47,7 +47,6 @@ public class AfterReturningAdviceInterceptor implements MethodInterceptor, After this.advice = advice; } - @Override public Object invoke(MethodInvocation mi) throws Throwable { Object retVal = mi.proceed(); this.advice.afterReturning(retVal, mi.getMethod(), mi.getArguments(), mi.getThis()); diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/adapter/DefaultAdvisorAdapterRegistry.java b/spring-aop/src/main/java/org/springframework/aop/framework/adapter/DefaultAdvisorAdapterRegistry.java index 0925b818af..136f004586 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/adapter/DefaultAdvisorAdapterRegistry.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/adapter/DefaultAdvisorAdapterRegistry.java @@ -53,7 +53,6 @@ public class DefaultAdvisorAdapterRegistry implements AdvisorAdapterRegistry, Se } - @Override public Advisor wrap(Object adviceObject) throws UnknownAdviceTypeException { if (adviceObject instanceof Advisor) { return (Advisor) adviceObject; @@ -75,7 +74,6 @@ public class DefaultAdvisorAdapterRegistry implements AdvisorAdapterRegistry, Se throw new UnknownAdviceTypeException(advice); } - @Override public MethodInterceptor[] getInterceptors(Advisor advisor) throws UnknownAdviceTypeException { List interceptors = new ArrayList(3); Advice advice = advisor.getAdvice(); @@ -93,7 +91,6 @@ public class DefaultAdvisorAdapterRegistry implements AdvisorAdapterRegistry, Se return interceptors.toArray(new MethodInterceptor[interceptors.size()]); } - @Override public void registerAdvisorAdapter(AdvisorAdapter adapter) { this.adapters.add(adapter); } diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/adapter/MethodBeforeAdviceAdapter.java b/spring-aop/src/main/java/org/springframework/aop/framework/adapter/MethodBeforeAdviceAdapter.java index 57e0e16af7..6fc3cdef5e 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/adapter/MethodBeforeAdviceAdapter.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/adapter/MethodBeforeAdviceAdapter.java @@ -34,12 +34,10 @@ import org.springframework.aop.MethodBeforeAdvice; @SuppressWarnings("serial") class MethodBeforeAdviceAdapter implements AdvisorAdapter, Serializable { - @Override public boolean supportsAdvice(Advice advice) { return (advice instanceof MethodBeforeAdvice); } - @Override public MethodInterceptor getInterceptor(Advisor advisor) { MethodBeforeAdvice advice = (MethodBeforeAdvice) advisor.getAdvice(); return new MethodBeforeAdviceInterceptor(advice); diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/adapter/MethodBeforeAdviceInterceptor.java b/spring-aop/src/main/java/org/springframework/aop/framework/adapter/MethodBeforeAdviceInterceptor.java index 8b3fd0ce20..83d7b8e851 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/adapter/MethodBeforeAdviceInterceptor.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/adapter/MethodBeforeAdviceInterceptor.java @@ -46,7 +46,6 @@ public class MethodBeforeAdviceInterceptor implements MethodInterceptor, Seriali this.advice = advice; } - @Override public Object invoke(MethodInvocation mi) throws Throwable { this.advice.before(mi.getMethod(), mi.getArguments(), mi.getThis() ); return mi.proceed(); diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/adapter/ThrowsAdviceAdapter.java b/spring-aop/src/main/java/org/springframework/aop/framework/adapter/ThrowsAdviceAdapter.java index 822b789b54..687a6d5f8b 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/adapter/ThrowsAdviceAdapter.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/adapter/ThrowsAdviceAdapter.java @@ -34,12 +34,10 @@ import org.springframework.aop.ThrowsAdvice; @SuppressWarnings("serial") class ThrowsAdviceAdapter implements AdvisorAdapter, Serializable { - @Override public boolean supportsAdvice(Advice advice) { return (advice instanceof ThrowsAdvice); } - @Override public MethodInterceptor getInterceptor(Advisor advisor) { return new ThrowsAdviceInterceptor(advisor.getAdvice()); } diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/adapter/ThrowsAdviceInterceptor.java b/spring-aop/src/main/java/org/springframework/aop/framework/adapter/ThrowsAdviceInterceptor.java index de2767be2c..69b0bd1cc5 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/adapter/ThrowsAdviceInterceptor.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/adapter/ThrowsAdviceInterceptor.java @@ -119,7 +119,6 @@ public class ThrowsAdviceInterceptor implements MethodInterceptor, AfterAdvice { return handler; } - @Override public Object invoke(MethodInvocation mi) throws Throwable { try { return mi.proceed(); diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/AbstractAutoProxyCreator.java b/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/AbstractAutoProxyCreator.java index db4f429198..06010d6710 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/AbstractAutoProxyCreator.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/AbstractAutoProxyCreator.java @@ -155,7 +155,6 @@ public abstract class AbstractAutoProxyCreator extends ProxyConfig this.order = order; } - @Override public final int getOrder() { return this.order; } @@ -233,14 +232,12 @@ public abstract class AbstractAutoProxyCreator extends ProxyConfig this.classLoaderConfigured = (classLoader != null); } - @Override public void setBeanClassLoader(ClassLoader classLoader) { if (!this.classLoaderConfigured) { this.proxyClassLoader = classLoader; } } - @Override public void setBeanFactory(BeanFactory beanFactory) { this.beanFactory = beanFactory; } @@ -254,25 +251,21 @@ public abstract class AbstractAutoProxyCreator extends ProxyConfig } - @Override public Class predictBeanType(Class beanClass, String beanName) { Object cacheKey = getCacheKey(beanClass, beanName); return this.proxyTypes.get(cacheKey); } - @Override public Constructor[] determineCandidateConstructors(Class beanClass, String beanName) throws BeansException { return null; } - @Override public Object getEarlyBeanReference(Object bean, String beanName) throws BeansException { Object cacheKey = getCacheKey(bean.getClass(), beanName); this.earlyProxyReferences.put(cacheKey, Boolean.TRUE); return wrapIfNecessary(bean, beanName, cacheKey); } - @Override public Object postProcessBeforeInstantiation(Class beanClass, String beanName) throws BeansException { Object cacheKey = getCacheKey(beanClass, beanName); @@ -303,19 +296,16 @@ public abstract class AbstractAutoProxyCreator extends ProxyConfig return null; } - @Override public boolean postProcessAfterInstantiation(Object bean, String beanName) { return true; } - @Override public PropertyValues postProcessPropertyValues( PropertyValues pvs, PropertyDescriptor[] pds, Object bean, String beanName) { return pvs; } - @Override public Object postProcessBeforeInitialization(Object bean, String beanName) { return bean; } @@ -325,7 +315,6 @@ public abstract class AbstractAutoProxyCreator extends ProxyConfig * identified as one to proxy by the subclass. * @see #getAdvicesAndAdvisorsForBean */ - @Override public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { if (bean != null) { Object cacheKey = getCacheKey(bean.getClass(), beanName); diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/DefaultAdvisorAutoProxyCreator.java b/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/DefaultAdvisorAutoProxyCreator.java index 044c7bbc11..953a751d32 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/DefaultAdvisorAutoProxyCreator.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/DefaultAdvisorAutoProxyCreator.java @@ -79,7 +79,6 @@ public class DefaultAdvisorAutoProxyCreator extends AbstractAdvisorAutoProxyCrea return this.advisorBeanNamePrefix; } - @Override public void setBeanName(String name) { // If no infrastructure bean name prefix has been set, override it. if (this.advisorBeanNamePrefix == null) { diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/target/AbstractBeanFactoryBasedTargetSourceCreator.java b/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/target/AbstractBeanFactoryBasedTargetSourceCreator.java index 3735ba06e7..c1ef00cbe2 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/target/AbstractBeanFactoryBasedTargetSourceCreator.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/target/AbstractBeanFactoryBasedTargetSourceCreator.java @@ -66,7 +66,6 @@ public abstract class AbstractBeanFactoryBasedTargetSourceCreator new HashMap(); - @Override public final void setBeanFactory(BeanFactory beanFactory) { if (!(beanFactory instanceof ConfigurableBeanFactory)) { throw new IllegalStateException("Cannot do auto-TargetSource creation with a BeanFactory " + @@ -87,7 +86,6 @@ public abstract class AbstractBeanFactoryBasedTargetSourceCreator // Implementation of the TargetSourceCreator interface //--------------------------------------------------------------------- - @Override public final TargetSource getTargetSource(Class beanClass, String beanName) { AbstractBeanFactoryBasedTargetSource targetSource = createBeanFactoryBasedTargetSource(beanClass, beanName); @@ -161,7 +159,6 @@ public abstract class AbstractBeanFactoryBasedTargetSourceCreator * Destroys the internal BeanFactory on shutdown of the TargetSourceCreator. * @see #getInternalBeanFactoryForBean */ - @Override public void destroy() { synchronized (this.internalBeanFactories) { for (DefaultListableBeanFactory bf : this.internalBeanFactories.values()) { diff --git a/spring-aop/src/main/java/org/springframework/aop/interceptor/AbstractTraceInterceptor.java b/spring-aop/src/main/java/org/springframework/aop/interceptor/AbstractTraceInterceptor.java index 1ba6dca904..7c29c775bc 100644 --- a/spring-aop/src/main/java/org/springframework/aop/interceptor/AbstractTraceInterceptor.java +++ b/spring-aop/src/main/java/org/springframework/aop/interceptor/AbstractTraceInterceptor.java @@ -105,7 +105,6 @@ public abstract class AbstractTraceInterceptor implements MethodInterceptor, Ser * to the {@code invokeUnderTrace} method for handling. * @see #invokeUnderTrace(org.aopalliance.intercept.MethodInvocation, org.apache.commons.logging.Log) */ - @Override public Object invoke(MethodInvocation invocation) throws Throwable { Log logger = getLoggerForInvocation(invocation); if (isInterceptorEnabled(invocation, logger)) { diff --git a/spring-aop/src/main/java/org/springframework/aop/interceptor/AsyncExecutionAspectSupport.java b/spring-aop/src/main/java/org/springframework/aop/interceptor/AsyncExecutionAspectSupport.java index f94b575806..96237b86d1 100644 --- a/spring-aop/src/main/java/org/springframework/aop/interceptor/AsyncExecutionAspectSupport.java +++ b/spring-aop/src/main/java/org/springframework/aop/interceptor/AsyncExecutionAspectSupport.java @@ -80,7 +80,6 @@ public abstract class AsyncExecutionAspectSupport implements BeanFactoryAware { /** * Set the {@link BeanFactory} to be used when looking up executors by qualifier. */ - @Override public void setBeanFactory(BeanFactory beanFactory) throws BeansException { this.beanFactory = beanFactory; } diff --git a/spring-aop/src/main/java/org/springframework/aop/interceptor/AsyncExecutionInterceptor.java b/spring-aop/src/main/java/org/springframework/aop/interceptor/AsyncExecutionInterceptor.java index 7730f54426..792639b1c6 100644 --- a/spring-aop/src/main/java/org/springframework/aop/interceptor/AsyncExecutionInterceptor.java +++ b/spring-aop/src/main/java/org/springframework/aop/interceptor/AsyncExecutionInterceptor.java @@ -75,11 +75,9 @@ public class AsyncExecutionInterceptor extends AsyncExecutionAspectSupport * @return {@link Future} if the original method returns {@code Future}; {@code null} * otherwise. */ - @Override public Object invoke(final MethodInvocation invocation) throws Throwable { Future result = this.determineAsyncExecutor(invocation.getMethod()).submit( new Callable() { - @Override public Object call() throws Exception { try { Object result = invocation.proceed(); @@ -115,7 +113,6 @@ public class AsyncExecutionInterceptor extends AsyncExecutionAspectSupport return null; } - @Override public int getOrder() { return Ordered.HIGHEST_PRECEDENCE; } diff --git a/spring-aop/src/main/java/org/springframework/aop/interceptor/ConcurrencyThrottleInterceptor.java b/spring-aop/src/main/java/org/springframework/aop/interceptor/ConcurrencyThrottleInterceptor.java index ad57e4c635..8f6f3ee479 100644 --- a/spring-aop/src/main/java/org/springframework/aop/interceptor/ConcurrencyThrottleInterceptor.java +++ b/spring-aop/src/main/java/org/springframework/aop/interceptor/ConcurrencyThrottleInterceptor.java @@ -47,7 +47,6 @@ public class ConcurrencyThrottleInterceptor extends ConcurrencyThrottleSupport setConcurrencyLimit(1); } - @Override public Object invoke(MethodInvocation methodInvocation) throws Throwable { beforeAccess(); try { diff --git a/spring-aop/src/main/java/org/springframework/aop/interceptor/ExposeBeanNameAdvisors.java b/spring-aop/src/main/java/org/springframework/aop/interceptor/ExposeBeanNameAdvisors.java index 78479765ca..a4ce58d528 100644 --- a/spring-aop/src/main/java/org/springframework/aop/interceptor/ExposeBeanNameAdvisors.java +++ b/spring-aop/src/main/java/org/springframework/aop/interceptor/ExposeBeanNameAdvisors.java @@ -109,7 +109,6 @@ public abstract class ExposeBeanNameAdvisors { this.beanName = beanName; } - @Override public Object invoke(MethodInvocation mi) throws Throwable { if (!(mi instanceof ProxyMethodInvocation)) { throw new IllegalStateException("MethodInvocation is not a Spring ProxyMethodInvocation: " + mi); @@ -143,7 +142,6 @@ public abstract class ExposeBeanNameAdvisors { return super.invoke(mi); } - @Override public String getBeanName() { return this.beanName; } diff --git a/spring-aop/src/main/java/org/springframework/aop/interceptor/ExposeInvocationInterceptor.java b/spring-aop/src/main/java/org/springframework/aop/interceptor/ExposeInvocationInterceptor.java index 9f9d887e7a..c5443e7dc3 100644 --- a/spring-aop/src/main/java/org/springframework/aop/interceptor/ExposeInvocationInterceptor.java +++ b/spring-aop/src/main/java/org/springframework/aop/interceptor/ExposeInvocationInterceptor.java @@ -84,7 +84,6 @@ public class ExposeInvocationInterceptor implements MethodInterceptor, Ordered, private ExposeInvocationInterceptor() { } - @Override public Object invoke(MethodInvocation mi) throws Throwable { MethodInvocation oldInvocation = invocation.get(); invocation.set(mi); @@ -96,7 +95,6 @@ public class ExposeInvocationInterceptor implements MethodInterceptor, Ordered, } } - @Override public int getOrder() { return Ordered.HIGHEST_PRECEDENCE + 1; } diff --git a/spring-aop/src/main/java/org/springframework/aop/scope/DefaultScopedObject.java b/spring-aop/src/main/java/org/springframework/aop/scope/DefaultScopedObject.java index 337c660022..95009495ba 100644 --- a/spring-aop/src/main/java/org/springframework/aop/scope/DefaultScopedObject.java +++ b/spring-aop/src/main/java/org/springframework/aop/scope/DefaultScopedObject.java @@ -55,12 +55,10 @@ public class DefaultScopedObject implements ScopedObject, Serializable { } - @Override public Object getTargetObject() { return this.beanFactory.getBean(this.targetBeanName); } - @Override public void removeFromScope() { this.beanFactory.destroyScopedBean(this.targetBeanName); } diff --git a/spring-aop/src/main/java/org/springframework/aop/scope/ScopedProxyFactoryBean.java b/spring-aop/src/main/java/org/springframework/aop/scope/ScopedProxyFactoryBean.java index a0c6fee7b6..34bc7b9b74 100644 --- a/spring-aop/src/main/java/org/springframework/aop/scope/ScopedProxyFactoryBean.java +++ b/spring-aop/src/main/java/org/springframework/aop/scope/ScopedProxyFactoryBean.java @@ -78,7 +78,6 @@ public class ScopedProxyFactoryBean extends ProxyConfig implements FactoryBean getObjectType() { if (this.proxy != null) { return this.proxy.getClass(); @@ -131,7 +128,6 @@ public class ScopedProxyFactoryBean extends ProxyConfig implements FactoryBean targetClass) { return true; } diff --git a/spring-aop/src/main/java/org/springframework/aop/support/DynamicMethodMatcherPointcut.java b/spring-aop/src/main/java/org/springframework/aop/support/DynamicMethodMatcherPointcut.java index df3963dc85..35d765c297 100644 --- a/spring-aop/src/main/java/org/springframework/aop/support/DynamicMethodMatcherPointcut.java +++ b/spring-aop/src/main/java/org/springframework/aop/support/DynamicMethodMatcherPointcut.java @@ -30,12 +30,10 @@ import org.springframework.aop.Pointcut; */ public abstract class DynamicMethodMatcherPointcut extends DynamicMethodMatcher implements Pointcut { - @Override public ClassFilter getClassFilter() { return ClassFilter.TRUE; } - @Override public final MethodMatcher getMethodMatcher() { return this; } diff --git a/spring-aop/src/main/java/org/springframework/aop/support/IntroductionInfoSupport.java b/spring-aop/src/main/java/org/springframework/aop/support/IntroductionInfoSupport.java index e10c0c9921..c8807f7639 100644 --- a/spring-aop/src/main/java/org/springframework/aop/support/IntroductionInfoSupport.java +++ b/spring-aop/src/main/java/org/springframework/aop/support/IntroductionInfoSupport.java @@ -59,7 +59,6 @@ public class IntroductionInfoSupport implements IntroductionInfo, Serializable { this.publishedInterfaces.remove(intf); } - @Override public Class[] getInterfaces() { return this.publishedInterfaces.toArray(new Class[this.publishedInterfaces.size()]); } diff --git a/spring-aop/src/main/java/org/springframework/aop/support/MethodMatchers.java b/spring-aop/src/main/java/org/springframework/aop/support/MethodMatchers.java index 160496c074..be8b5bca7f 100644 --- a/spring-aop/src/main/java/org/springframework/aop/support/MethodMatchers.java +++ b/spring-aop/src/main/java/org/springframework/aop/support/MethodMatchers.java @@ -112,13 +112,11 @@ public abstract class MethodMatchers { this.mm2 = mm2; } - @Override public boolean matches(Method method, Class targetClass, boolean hasIntroductions) { return (matchesClass1(targetClass) && MethodMatchers.matches(this.mm1, method, targetClass, hasIntroductions)) || (matchesClass2(targetClass) && MethodMatchers.matches(this.mm2, method, targetClass, hasIntroductions)); } - @Override public boolean matches(Method method, Class targetClass) { return (matchesClass1(targetClass) && this.mm1.matches(method, targetClass)) || (matchesClass2(targetClass) && this.mm2.matches(method, targetClass)); @@ -132,12 +130,10 @@ public abstract class MethodMatchers { return true; } - @Override public boolean isRuntime() { return this.mm1.isRuntime() || this.mm2.isRuntime(); } - @Override public boolean matches(Method method, Class targetClass, Object[] args) { return this.mm1.matches(method, targetClass, args) || this.mm2.matches(method, targetClass, args); } @@ -220,23 +216,19 @@ public abstract class MethodMatchers { this.mm2 = mm2; } - @Override public boolean matches(Method method, Class targetClass, boolean hasIntroductions) { return MethodMatchers.matches(this.mm1, method, targetClass, hasIntroductions) && MethodMatchers.matches(this.mm2, method, targetClass, hasIntroductions); } - @Override public boolean matches(Method method, Class targetClass) { return this.mm1.matches(method, targetClass) && this.mm2.matches(method, targetClass); } - @Override public boolean isRuntime() { return this.mm1.isRuntime() || this.mm2.isRuntime(); } - @Override public boolean matches(Method method, Class targetClass, Object[] args) { // Because a dynamic intersection may be composed of a static and dynamic part, // we must avoid calling the 3-arg matches method on a dynamic matcher, as diff --git a/spring-aop/src/main/java/org/springframework/aop/support/NameMatchMethodPointcut.java b/spring-aop/src/main/java/org/springframework/aop/support/NameMatchMethodPointcut.java index 26ffedaf5a..69389d0bf5 100644 --- a/spring-aop/src/main/java/org/springframework/aop/support/NameMatchMethodPointcut.java +++ b/spring-aop/src/main/java/org/springframework/aop/support/NameMatchMethodPointcut.java @@ -77,7 +77,6 @@ public class NameMatchMethodPointcut extends StaticMethodMatcherPointcut impleme } - @Override public boolean matches(Method method, Class targetClass) { for (String mappedName : this.mappedNames) { if (mappedName.equals(method.getName()) || isMatch(method.getName(), mappedName)) { diff --git a/spring-aop/src/main/java/org/springframework/aop/support/NameMatchMethodPointcutAdvisor.java b/spring-aop/src/main/java/org/springframework/aop/support/NameMatchMethodPointcutAdvisor.java index 375ecdeac7..c2f85b5881 100644 --- a/spring-aop/src/main/java/org/springframework/aop/support/NameMatchMethodPointcutAdvisor.java +++ b/spring-aop/src/main/java/org/springframework/aop/support/NameMatchMethodPointcutAdvisor.java @@ -85,7 +85,6 @@ public class NameMatchMethodPointcutAdvisor extends AbstractGenericPointcutAdvis } - @Override public Pointcut getPointcut() { return this.pointcut; } diff --git a/spring-aop/src/main/java/org/springframework/aop/support/Pointcuts.java b/spring-aop/src/main/java/org/springframework/aop/support/Pointcuts.java index 957f5d319e..2bfbcb1c32 100644 --- a/spring-aop/src/main/java/org/springframework/aop/support/Pointcuts.java +++ b/spring-aop/src/main/java/org/springframework/aop/support/Pointcuts.java @@ -96,7 +96,6 @@ public abstract class Pointcuts { public static SetterPointcut INSTANCE = new SetterPointcut(); - @Override public boolean matches(Method method, Class targetClass) { return method.getName().startsWith("set") && method.getParameterTypes().length == 1 && @@ -117,7 +116,6 @@ public abstract class Pointcuts { public static GetterPointcut INSTANCE = new GetterPointcut(); - @Override public boolean matches(Method method, Class targetClass) { return method.getName().startsWith("get") && method.getParameterTypes().length == 0; diff --git a/spring-aop/src/main/java/org/springframework/aop/support/RegexpMethodPointcutAdvisor.java b/spring-aop/src/main/java/org/springframework/aop/support/RegexpMethodPointcutAdvisor.java index 177fe9b277..1edb2d746b 100644 --- a/spring-aop/src/main/java/org/springframework/aop/support/RegexpMethodPointcutAdvisor.java +++ b/spring-aop/src/main/java/org/springframework/aop/support/RegexpMethodPointcutAdvisor.java @@ -116,7 +116,6 @@ public class RegexpMethodPointcutAdvisor extends AbstractGenericPointcutAdvisor /** * Initialize the singleton Pointcut held within this Advisor. */ - @Override public Pointcut getPointcut() { synchronized (this.pointcutMonitor) { if (this.pointcut == null) { diff --git a/spring-aop/src/main/java/org/springframework/aop/support/RootClassFilter.java b/spring-aop/src/main/java/org/springframework/aop/support/RootClassFilter.java index c232b2826b..461252e617 100644 --- a/spring-aop/src/main/java/org/springframework/aop/support/RootClassFilter.java +++ b/spring-aop/src/main/java/org/springframework/aop/support/RootClassFilter.java @@ -35,7 +35,6 @@ public class RootClassFilter implements ClassFilter, Serializable { this.clazz = clazz; } - @Override public boolean matches(Class candidate) { return clazz.isAssignableFrom(candidate); } diff --git a/spring-aop/src/main/java/org/springframework/aop/support/StaticMethodMatcher.java b/spring-aop/src/main/java/org/springframework/aop/support/StaticMethodMatcher.java index 8bb1d74d73..6efebf1106 100644 --- a/spring-aop/src/main/java/org/springframework/aop/support/StaticMethodMatcher.java +++ b/spring-aop/src/main/java/org/springframework/aop/support/StaticMethodMatcher.java @@ -26,12 +26,10 @@ import org.springframework.aop.MethodMatcher; */ public abstract class StaticMethodMatcher implements MethodMatcher { - @Override public final boolean isRuntime() { return false; } - @Override public final boolean matches(Method method, Class targetClass, Object[] args) { // should never be invoked because isRuntime() returns false throw new UnsupportedOperationException("Illegal MethodMatcher usage"); diff --git a/spring-aop/src/main/java/org/springframework/aop/support/StaticMethodMatcherPointcut.java b/spring-aop/src/main/java/org/springframework/aop/support/StaticMethodMatcherPointcut.java index 1c2f1106cb..5d8e0c6576 100644 --- a/spring-aop/src/main/java/org/springframework/aop/support/StaticMethodMatcherPointcut.java +++ b/spring-aop/src/main/java/org/springframework/aop/support/StaticMethodMatcherPointcut.java @@ -43,13 +43,11 @@ public abstract class StaticMethodMatcherPointcut extends StaticMethodMatcher im this.classFilter = classFilter; } - @Override public ClassFilter getClassFilter() { return this.classFilter; } - @Override public final MethodMatcher getMethodMatcher() { return this; } diff --git a/spring-aop/src/main/java/org/springframework/aop/support/StaticMethodMatcherPointcutAdvisor.java b/spring-aop/src/main/java/org/springframework/aop/support/StaticMethodMatcherPointcutAdvisor.java index 9dbe10dbf4..5ff78837c5 100644 --- a/spring-aop/src/main/java/org/springframework/aop/support/StaticMethodMatcherPointcutAdvisor.java +++ b/spring-aop/src/main/java/org/springframework/aop/support/StaticMethodMatcherPointcutAdvisor.java @@ -63,7 +63,6 @@ public abstract class StaticMethodMatcherPointcutAdvisor extends StaticMethodMat this.order = order; } - @Override public int getOrder() { return this.order; } @@ -72,17 +71,14 @@ public abstract class StaticMethodMatcherPointcutAdvisor extends StaticMethodMat this.advice = advice; } - @Override public Advice getAdvice() { return this.advice; } - @Override public boolean isPerInstance() { return true; } - @Override public Pointcut getPointcut() { return this; } diff --git a/spring-aop/src/main/java/org/springframework/aop/support/annotation/AnnotationClassFilter.java b/spring-aop/src/main/java/org/springframework/aop/support/annotation/AnnotationClassFilter.java index aacf645c3f..e12438c447 100644 --- a/spring-aop/src/main/java/org/springframework/aop/support/annotation/AnnotationClassFilter.java +++ b/spring-aop/src/main/java/org/springframework/aop/support/annotation/AnnotationClassFilter.java @@ -59,7 +59,6 @@ public class AnnotationClassFilter implements ClassFilter { } - @Override public boolean matches(Class clazz) { return (this.checkInherited ? (AnnotationUtils.findAnnotation(clazz, this.annotationType) != null) : diff --git a/spring-aop/src/main/java/org/springframework/aop/support/annotation/AnnotationMatchingPointcut.java b/spring-aop/src/main/java/org/springframework/aop/support/annotation/AnnotationMatchingPointcut.java index 46c6f69e3e..acdbbeff88 100644 --- a/spring-aop/src/main/java/org/springframework/aop/support/annotation/AnnotationMatchingPointcut.java +++ b/spring-aop/src/main/java/org/springframework/aop/support/annotation/AnnotationMatchingPointcut.java @@ -90,12 +90,10 @@ public class AnnotationMatchingPointcut implements Pointcut { } - @Override public ClassFilter getClassFilter() { return this.classFilter; } - @Override public MethodMatcher getMethodMatcher() { return this.methodMatcher; } diff --git a/spring-aop/src/main/java/org/springframework/aop/support/annotation/AnnotationMethodMatcher.java b/spring-aop/src/main/java/org/springframework/aop/support/annotation/AnnotationMethodMatcher.java index 9b557473ff..4f4dd6c391 100644 --- a/spring-aop/src/main/java/org/springframework/aop/support/annotation/AnnotationMethodMatcher.java +++ b/spring-aop/src/main/java/org/springframework/aop/support/annotation/AnnotationMethodMatcher.java @@ -47,7 +47,6 @@ public class AnnotationMethodMatcher extends StaticMethodMatcher { } - @Override public boolean matches(Method method, Class targetClass) { if (method.isAnnotationPresent(this.annotationType)) { return true; diff --git a/spring-aop/src/main/java/org/springframework/aop/target/AbstractBeanFactoryBasedTargetSource.java b/spring-aop/src/main/java/org/springframework/aop/target/AbstractBeanFactoryBasedTargetSource.java index 0928b54b89..3192fab5fe 100644 --- a/spring-aop/src/main/java/org/springframework/aop/target/AbstractBeanFactoryBasedTargetSource.java +++ b/spring-aop/src/main/java/org/springframework/aop/target/AbstractBeanFactoryBasedTargetSource.java @@ -105,7 +105,6 @@ public abstract class AbstractBeanFactoryBasedTargetSource * Set the owning BeanFactory. We need to save a reference so that we can * use the {@code getBean} method on every invocation. */ - @Override public void setBeanFactory(BeanFactory beanFactory) { if (this.targetBeanName == null) { throw new IllegalStateException("Property'targetBeanName' is required"); @@ -121,7 +120,6 @@ public abstract class AbstractBeanFactoryBasedTargetSource } - @Override public synchronized Class getTargetClass() { if (this.targetClass == null && this.beanFactory != null) { // Determine type of the target bean. @@ -139,12 +137,10 @@ public abstract class AbstractBeanFactoryBasedTargetSource return this.targetClass; } - @Override public boolean isStatic() { return false; } - @Override public void releaseTarget(Object target) throws Exception { // Nothing to do here. } diff --git a/spring-aop/src/main/java/org/springframework/aop/target/AbstractLazyCreationTargetSource.java b/spring-aop/src/main/java/org/springframework/aop/target/AbstractLazyCreationTargetSource.java index 97f3ae8732..6fdd24ef92 100644 --- a/spring-aop/src/main/java/org/springframework/aop/target/AbstractLazyCreationTargetSource.java +++ b/spring-aop/src/main/java/org/springframework/aop/target/AbstractLazyCreationTargetSource.java @@ -64,12 +64,10 @@ public abstract class AbstractLazyCreationTargetSource implements TargetSource { * a meaningful value when the target is still {@code null}. * @see #isInitialized() */ - @Override public synchronized Class getTargetClass() { return (this.lazyTarget != null ? this.lazyTarget.getClass() : null); } - @Override public boolean isStatic() { return false; } @@ -79,7 +77,6 @@ public abstract class AbstractLazyCreationTargetSource implements TargetSource { * creating it on-the-fly if it doesn't exist already. * @see #createObject() */ - @Override public synchronized Object getTarget() throws Exception { if (this.lazyTarget == null) { logger.debug("Initializing lazy target object"); @@ -88,7 +85,6 @@ public abstract class AbstractLazyCreationTargetSource implements TargetSource { return this.lazyTarget; } - @Override public void releaseTarget(Object target) throws Exception { // nothing to do } diff --git a/spring-aop/src/main/java/org/springframework/aop/target/AbstractPoolingTargetSource.java b/spring-aop/src/main/java/org/springframework/aop/target/AbstractPoolingTargetSource.java index c0bef77145..91e1b72ee7 100644 --- a/spring-aop/src/main/java/org/springframework/aop/target/AbstractPoolingTargetSource.java +++ b/spring-aop/src/main/java/org/springframework/aop/target/AbstractPoolingTargetSource.java @@ -68,7 +68,6 @@ public abstract class AbstractPoolingTargetSource extends AbstractPrototypeBased /** * Return the maximum size of the pool. */ - @Override public int getMaxSize() { return this.maxSize; } @@ -98,7 +97,6 @@ public abstract class AbstractPoolingTargetSource extends AbstractPrototypeBased * @throws Exception we may need to deal with checked exceptions from pool * APIs, so we're forgiving with our exception signature */ - @Override public abstract Object getTarget() throws Exception; /** diff --git a/spring-aop/src/main/java/org/springframework/aop/target/CommonsPoolTargetSource.java b/spring-aop/src/main/java/org/springframework/aop/target/CommonsPoolTargetSource.java index 08f16258a1..47a35f756e 100644 --- a/spring-aop/src/main/java/org/springframework/aop/target/CommonsPoolTargetSource.java +++ b/spring-aop/src/main/java/org/springframework/aop/target/CommonsPoolTargetSource.java @@ -252,12 +252,10 @@ public class CommonsPoolTargetSource extends AbstractPoolingTargetSource this.pool.returnObject(target); } - @Override public int getActiveCount() throws UnsupportedOperationException { return this.pool.getNumActive(); } - @Override public int getIdleCount() throws UnsupportedOperationException { return this.pool.getNumIdle(); } @@ -266,7 +264,6 @@ public class CommonsPoolTargetSource extends AbstractPoolingTargetSource /** * Closes the underlying {@code ObjectPool} when destroying this object. */ - @Override public void destroy() throws Exception { logger.debug("Closing Commons ObjectPool"); this.pool.close(); @@ -277,26 +274,21 @@ public class CommonsPoolTargetSource extends AbstractPoolingTargetSource // Implementation of org.apache.commons.pool.PoolableObjectFactory interface //---------------------------------------------------------------------------- - @Override public Object makeObject() throws BeansException { return newPrototypeInstance(); } - @Override public void destroyObject(Object obj) throws Exception { destroyPrototypeInstance(obj); } - @Override public boolean validateObject(Object obj) { return true; } - @Override public void activateObject(Object obj) { } - @Override public void passivateObject(Object obj) { } diff --git a/spring-aop/src/main/java/org/springframework/aop/target/EmptyTargetSource.java b/spring-aop/src/main/java/org/springframework/aop/target/EmptyTargetSource.java index 826917a561..193259ba8d 100644 --- a/spring-aop/src/main/java/org/springframework/aop/target/EmptyTargetSource.java +++ b/spring-aop/src/main/java/org/springframework/aop/target/EmptyTargetSource.java @@ -89,7 +89,6 @@ public class EmptyTargetSource implements TargetSource, Serializable { /** * Always returns the specified target Class, or {@code null} if none. */ - @Override public Class getTargetClass() { return this.targetClass; } @@ -97,7 +96,6 @@ public class EmptyTargetSource implements TargetSource, Serializable { /** * Always returns {@code true}. */ - @Override public boolean isStatic() { return this.isStatic; } @@ -105,7 +103,6 @@ public class EmptyTargetSource implements TargetSource, Serializable { /** * Always returns {@code null}. */ - @Override public Object getTarget() { return null; } @@ -113,7 +110,6 @@ public class EmptyTargetSource implements TargetSource, Serializable { /** * Nothing to release. */ - @Override public void releaseTarget(Object target) { } diff --git a/spring-aop/src/main/java/org/springframework/aop/target/HotSwappableTargetSource.java b/spring-aop/src/main/java/org/springframework/aop/target/HotSwappableTargetSource.java index 9f7e5fc263..50c8778042 100644 --- a/spring-aop/src/main/java/org/springframework/aop/target/HotSwappableTargetSource.java +++ b/spring-aop/src/main/java/org/springframework/aop/target/HotSwappableTargetSource.java @@ -59,22 +59,18 @@ public class HotSwappableTargetSource implements TargetSource, Serializable { * Return the type of the current target object. *

The returned type should usually be constant across all target objects. */ - @Override public synchronized Class getTargetClass() { return this.target.getClass(); } - @Override public final boolean isStatic() { return false; } - @Override public synchronized Object getTarget() { return this.target; } - @Override public void releaseTarget(Object target) { // nothing to do } diff --git a/spring-aop/src/main/java/org/springframework/aop/target/LazyInitTargetSource.java b/spring-aop/src/main/java/org/springframework/aop/target/LazyInitTargetSource.java index bad59acf1b..dcb6108e87 100644 --- a/spring-aop/src/main/java/org/springframework/aop/target/LazyInitTargetSource.java +++ b/spring-aop/src/main/java/org/springframework/aop/target/LazyInitTargetSource.java @@ -62,7 +62,6 @@ public class LazyInitTargetSource extends AbstractBeanFactoryBasedTargetSource { private Object target; - @Override public synchronized Object getTarget() throws BeansException { if (this.target == null) { this.target = getBeanFactory().getBean(getTargetBeanName()); diff --git a/spring-aop/src/main/java/org/springframework/aop/target/PrototypeTargetSource.java b/spring-aop/src/main/java/org/springframework/aop/target/PrototypeTargetSource.java index a404a93234..81642f6b2e 100644 --- a/spring-aop/src/main/java/org/springframework/aop/target/PrototypeTargetSource.java +++ b/spring-aop/src/main/java/org/springframework/aop/target/PrototypeTargetSource.java @@ -37,7 +37,6 @@ public class PrototypeTargetSource extends AbstractPrototypeBasedTargetSource { * Obtain a new prototype instance for every call. * @see #newPrototypeInstance() */ - @Override public Object getTarget() throws BeansException { return newPrototypeInstance(); } diff --git a/spring-aop/src/main/java/org/springframework/aop/target/SimpleBeanTargetSource.java b/spring-aop/src/main/java/org/springframework/aop/target/SimpleBeanTargetSource.java index 805f1a0562..14560404c4 100644 --- a/spring-aop/src/main/java/org/springframework/aop/target/SimpleBeanTargetSource.java +++ b/spring-aop/src/main/java/org/springframework/aop/target/SimpleBeanTargetSource.java @@ -30,7 +30,6 @@ package org.springframework.aop.target; @SuppressWarnings("serial") public class SimpleBeanTargetSource extends AbstractBeanFactoryBasedTargetSource { - @Override public Object getTarget() throws Exception { return getBeanFactory().getBean(getTargetBeanName()); } diff --git a/spring-aop/src/main/java/org/springframework/aop/target/SingletonTargetSource.java b/spring-aop/src/main/java/org/springframework/aop/target/SingletonTargetSource.java index 439e59509a..cd2dfb0c0c 100644 --- a/spring-aop/src/main/java/org/springframework/aop/target/SingletonTargetSource.java +++ b/spring-aop/src/main/java/org/springframework/aop/target/SingletonTargetSource.java @@ -55,22 +55,18 @@ public class SingletonTargetSource implements TargetSource, Serializable { } - @Override public Class getTargetClass() { return this.target.getClass(); } - @Override public Object getTarget() { return this.target; } - @Override public void releaseTarget(Object target) { // nothing to do } - @Override public boolean isStatic() { return true; } diff --git a/spring-aop/src/main/java/org/springframework/aop/target/ThreadLocalTargetSource.java b/spring-aop/src/main/java/org/springframework/aop/target/ThreadLocalTargetSource.java index af22df411d..7b100fe0da 100644 --- a/spring-aop/src/main/java/org/springframework/aop/target/ThreadLocalTargetSource.java +++ b/spring-aop/src/main/java/org/springframework/aop/target/ThreadLocalTargetSource.java @@ -75,7 +75,6 @@ public class ThreadLocalTargetSource extends AbstractPrototypeBasedTargetSource * We look for a target held in a ThreadLocal. If we don't find one, * we create one and bind it to the thread. No synchronization is required. */ - @Override public Object getTarget() throws BeansException { ++this.invocationCount; Object target = this.targetInThread.get(); @@ -103,7 +102,6 @@ public class ThreadLocalTargetSource extends AbstractPrototypeBasedTargetSource * Dispose of targets if necessary; clear ThreadLocal. * @see #destroyPrototypeInstance */ - @Override public void destroy() { logger.debug("Destroying ThreadLocalTargetSource bindings"); synchronized (this.targetSet) { @@ -117,17 +115,14 @@ public class ThreadLocalTargetSource extends AbstractPrototypeBasedTargetSource } - @Override public int getInvocationCount() { return this.invocationCount; } - @Override public int getHitCount() { return this.hitCount; } - @Override public int getObjectCount() { synchronized (this.targetSet) { return this.targetSet.size(); diff --git a/spring-aop/src/main/java/org/springframework/aop/target/dynamic/AbstractRefreshableTargetSource.java b/spring-aop/src/main/java/org/springframework/aop/target/dynamic/AbstractRefreshableTargetSource.java index c96c21e193..7aba951ee5 100644 --- a/spring-aop/src/main/java/org/springframework/aop/target/dynamic/AbstractRefreshableTargetSource.java +++ b/spring-aop/src/main/java/org/springframework/aop/target/dynamic/AbstractRefreshableTargetSource.java @@ -63,7 +63,6 @@ public abstract class AbstractRefreshableTargetSource implements TargetSource, R } - @Override public synchronized Class getTargetClass() { if (this.targetObject == null) { refresh(); @@ -74,12 +73,10 @@ public abstract class AbstractRefreshableTargetSource implements TargetSource, R /** * Not static. */ - @Override public boolean isStatic() { return false; } - @Override public final synchronized Object getTarget() { if ((refreshCheckDelayElapsed() && requiresRefresh()) || this.targetObject == null) { refresh(); @@ -90,12 +87,10 @@ public abstract class AbstractRefreshableTargetSource implements TargetSource, R /** * No need to release target. */ - @Override public void releaseTarget(Object object) { } - @Override public final synchronized void refresh() { logger.debug("Attempting to refresh target"); @@ -106,12 +101,10 @@ public abstract class AbstractRefreshableTargetSource implements TargetSource, R logger.debug("Target refreshed successfully"); } - @Override public synchronized long getRefreshCount() { return this.refreshCount; } - @Override public synchronized long getLastRefreshTime() { return this.lastRefreshTime; } diff --git a/spring-beans/src/main/java/org/springframework/beans/AbstractPropertyAccessor.java b/spring-beans/src/main/java/org/springframework/beans/AbstractPropertyAccessor.java index 8be616c7dd..258313c90f 100644 --- a/spring-beans/src/main/java/org/springframework/beans/AbstractPropertyAccessor.java +++ b/spring-beans/src/main/java/org/springframework/beans/AbstractPropertyAccessor.java @@ -36,38 +36,31 @@ public abstract class AbstractPropertyAccessor extends TypeConverterSupport impl private boolean extractOldValueForEditor = false; - @Override public void setExtractOldValueForEditor(boolean extractOldValueForEditor) { this.extractOldValueForEditor = extractOldValueForEditor; } - @Override public boolean isExtractOldValueForEditor() { return this.extractOldValueForEditor; } - @Override public void setPropertyValue(PropertyValue pv) throws BeansException { setPropertyValue(pv.getName(), pv.getValue()); } - @Override public void setPropertyValues(Map map) throws BeansException { setPropertyValues(new MutablePropertyValues(map)); } - @Override public void setPropertyValues(PropertyValues pvs) throws BeansException { setPropertyValues(pvs, false, false); } - @Override public void setPropertyValues(PropertyValues pvs, boolean ignoreUnknown) throws BeansException { setPropertyValues(pvs, ignoreUnknown, false); } - @Override public void setPropertyValues(PropertyValues pvs, boolean ignoreUnknown, boolean ignoreInvalid) throws BeansException { @@ -125,7 +118,6 @@ public abstract class AbstractPropertyAccessor extends TypeConverterSupport impl * @throws PropertyAccessException if the property was valid but the * accessor method failed */ - @Override public abstract Object getPropertyValue(String propertyName) throws BeansException; /** @@ -137,7 +129,6 @@ public abstract class AbstractPropertyAccessor extends TypeConverterSupport impl * @throws PropertyAccessException if the property was valid but the * accessor method failed or a type mismatch occured */ - @Override public abstract void setPropertyValue(String propertyName, Object value) throws BeansException; } diff --git a/spring-beans/src/main/java/org/springframework/beans/BeanMetadataAttribute.java b/spring-beans/src/main/java/org/springframework/beans/BeanMetadataAttribute.java index 366256452c..f806b9f6a5 100644 --- a/spring-beans/src/main/java/org/springframework/beans/BeanMetadataAttribute.java +++ b/spring-beans/src/main/java/org/springframework/beans/BeanMetadataAttribute.java @@ -69,7 +69,6 @@ public class BeanMetadataAttribute implements BeanMetadataElement { this.source = source; } - @Override public Object getSource() { return this.source; } diff --git a/spring-beans/src/main/java/org/springframework/beans/BeanMetadataAttributeAccessor.java b/spring-beans/src/main/java/org/springframework/beans/BeanMetadataAttributeAccessor.java index d08a8fa341..c683f50ab8 100644 --- a/spring-beans/src/main/java/org/springframework/beans/BeanMetadataAttributeAccessor.java +++ b/spring-beans/src/main/java/org/springframework/beans/BeanMetadataAttributeAccessor.java @@ -40,7 +40,6 @@ public class BeanMetadataAttributeAccessor extends AttributeAccessorSupport impl this.source = source; } - @Override public Object getSource() { return this.source; } diff --git a/spring-beans/src/main/java/org/springframework/beans/BeanWrapperImpl.java b/spring-beans/src/main/java/org/springframework/beans/BeanWrapperImpl.java index 705d4a7ac7..bac8df4ce6 100644 --- a/spring-beans/src/main/java/org/springframework/beans/BeanWrapperImpl.java +++ b/spring-beans/src/main/java/org/springframework/beans/BeanWrapperImpl.java @@ -219,12 +219,10 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra setIntrospectionClass(object.getClass()); } - @Override public final Object getWrappedInstance() { return this.object; } - @Override public final Class getWrappedClass() { return (this.object != null ? this.object.getClass() : null); } @@ -259,7 +257,6 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra * enables auto-growth of collection elements when accessing an out-of-bounds index. *

Default is "false" on a plain BeanWrapper. */ - @Override public void setAutoGrowNestedPaths(boolean autoGrowNestedPaths) { this.autoGrowNestedPaths = autoGrowNestedPaths; } @@ -267,7 +264,6 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra /** * Return whether "auto-growing" of nested paths has been activated. */ - @Override public boolean isAutoGrowNestedPaths() { return this.autoGrowNestedPaths; } @@ -276,7 +272,6 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra * Specify a limit for array and collection auto-growing. *

Default is unlimited on a plain BeanWrapper. */ - @Override public void setAutoGrowCollectionLimit(int autoGrowCollectionLimit) { this.autoGrowCollectionLimit = autoGrowCollectionLimit; } @@ -284,7 +279,6 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra /** * Return the limit for array and collection auto-growing. */ - @Override public int getAutoGrowCollectionLimit() { return this.autoGrowCollectionLimit; } @@ -330,12 +324,10 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra } - @Override public PropertyDescriptor[] getPropertyDescriptors() { return getCachedIntrospectionResults().getPropertyDescriptors(); } - @Override public PropertyDescriptor getPropertyDescriptor(String propertyName) throws BeansException { PropertyDescriptor pd = getPropertyDescriptorInternal(propertyName); if (pd == null) { @@ -386,7 +378,6 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra return null; } - @Override public TypeDescriptor getPropertyTypeDescriptor(String propertyName) throws BeansException { try { BeanWrapperImpl nestedBw = getBeanWrapperForPropertyPath(propertyName); @@ -411,7 +402,6 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra return null; } - @Override public boolean isReadableProperty(String propertyName) { try { PropertyDescriptor pd = getPropertyDescriptorInternal(propertyName); @@ -432,7 +422,6 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra return false; } - @Override public boolean isWritableProperty(String propertyName) { try { PropertyDescriptor pd = getPropertyDescriptorInternal(propertyName); @@ -722,7 +711,6 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra if (!Modifier.isPublic(readMethod.getDeclaringClass().getModifiers()) && !readMethod.isAccessible()) { if (System.getSecurityManager() != null) { AccessController.doPrivileged(new PrivilegedAction() { - @Override public Object run() { readMethod.setAccessible(true); return null; @@ -738,7 +726,6 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra if (System.getSecurityManager() != null) { try { value = AccessController.doPrivileged(new PrivilegedExceptionAction() { - @Override public Object run() throws Exception { return readMethod.invoke(object, (Object[]) null); } @@ -1075,7 +1062,6 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra !readMethod.isAccessible()) { if (System.getSecurityManager()!= null) { AccessController.doPrivileged(new PrivilegedAction() { - @Override public Object run() { readMethod.setAccessible(true); return null; @@ -1089,7 +1075,6 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra try { if (System.getSecurityManager() != null) { oldValue = AccessController.doPrivileged(new PrivilegedExceptionAction() { - @Override public Object run() throws Exception { return readMethod.invoke(object); } @@ -1119,7 +1104,6 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra if (!Modifier.isPublic(writeMethod.getDeclaringClass().getModifiers()) && !writeMethod.isAccessible()) { if (System.getSecurityManager()!= null) { AccessController.doPrivileged(new PrivilegedAction() { - @Override public Object run() { writeMethod.setAccessible(true); return null; @@ -1134,7 +1118,6 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra if (System.getSecurityManager() != null) { try { AccessController.doPrivileged(new PrivilegedExceptionAction() { - @Override public Object run() throws Exception { writeMethod.invoke(object, value); return null; diff --git a/spring-beans/src/main/java/org/springframework/beans/DirectFieldAccessor.java b/spring-beans/src/main/java/org/springframework/beans/DirectFieldAccessor.java index 9e6c67703c..d7913aa906 100644 --- a/spring-beans/src/main/java/org/springframework/beans/DirectFieldAccessor.java +++ b/spring-beans/src/main/java/org/springframework/beans/DirectFieldAccessor.java @@ -59,7 +59,6 @@ public class DirectFieldAccessor extends AbstractPropertyAccessor { Assert.notNull(target, "Target object must not be null"); this.target = target; ReflectionUtils.doWithFields(this.target.getClass(), new ReflectionUtils.FieldCallback() { - @Override public void doWith(Field field) { if (fieldMap.containsKey(field.getName())) { // ignore superclass declarations of fields already found in a subclass @@ -75,12 +74,10 @@ public class DirectFieldAccessor extends AbstractPropertyAccessor { } - @Override public boolean isReadableProperty(String propertyName) throws BeansException { return this.fieldMap.containsKey(propertyName); } - @Override public boolean isWritableProperty(String propertyName) throws BeansException { return this.fieldMap.containsKey(propertyName); } @@ -94,7 +91,6 @@ public class DirectFieldAccessor extends AbstractPropertyAccessor { return null; } - @Override public TypeDescriptor getPropertyTypeDescriptor(String propertyName) throws BeansException { Field field = this.fieldMap.get(propertyName); if (field != null) { diff --git a/spring-beans/src/main/java/org/springframework/beans/ExtendedBeanInfo.java b/spring-beans/src/main/java/org/springframework/beans/ExtendedBeanInfo.java index caf47703a4..856e62c031 100644 --- a/spring-beans/src/main/java/org/springframework/beans/ExtendedBeanInfo.java +++ b/spring-beans/src/main/java/org/springframework/beans/ExtendedBeanInfo.java @@ -217,43 +217,35 @@ class ExtendedBeanInfo implements BeanInfo { * method found during construction. * @see #ExtendedBeanInfo(BeanInfo) */ - @Override public PropertyDescriptor[] getPropertyDescriptors() { return this.propertyDescriptors.toArray( new PropertyDescriptor[this.propertyDescriptors.size()]); } - @Override public BeanInfo[] getAdditionalBeanInfo() { return delegate.getAdditionalBeanInfo(); } - @Override public BeanDescriptor getBeanDescriptor() { return delegate.getBeanDescriptor(); } - @Override public int getDefaultEventIndex() { return delegate.getDefaultEventIndex(); } - @Override public int getDefaultPropertyIndex() { return delegate.getDefaultPropertyIndex(); } - @Override public EventSetDescriptor[] getEventSetDescriptors() { return delegate.getEventSetDescriptors(); } - @Override public Image getIcon(int iconKind) { return delegate.getIcon(iconKind); } - @Override public MethodDescriptor[] getMethodDescriptors() { return delegate.getMethodDescriptors(); } @@ -663,7 +655,6 @@ class PropertyDescriptorUtils { */ class PropertyDescriptorComparator implements Comparator { - @Override public int compare(PropertyDescriptor desc1, PropertyDescriptor desc2) { String left = desc1.getName(); String right = desc2.getName(); diff --git a/spring-beans/src/main/java/org/springframework/beans/ExtendedBeanInfoFactory.java b/spring-beans/src/main/java/org/springframework/beans/ExtendedBeanInfoFactory.java index 6908cc06b6..7e46211922 100644 --- a/spring-beans/src/main/java/org/springframework/beans/ExtendedBeanInfoFactory.java +++ b/spring-beans/src/main/java/org/springframework/beans/ExtendedBeanInfoFactory.java @@ -40,7 +40,6 @@ public class ExtendedBeanInfoFactory implements Ordered, BeanInfoFactory { /** * Return a new {@link ExtendedBeanInfo} for the given bean class. */ - @Override public BeanInfo getBeanInfo(Class beanClass) throws IntrospectionException { return supports(beanClass) ? new ExtendedBeanInfo(Introspector.getBeanInfo(beanClass)) : null; @@ -59,7 +58,6 @@ public class ExtendedBeanInfoFactory implements Ordered, BeanInfoFactory { return false; } - @Override public int getOrder() { return Ordered.LOWEST_PRECEDENCE; } diff --git a/spring-beans/src/main/java/org/springframework/beans/MethodInvocationException.java b/spring-beans/src/main/java/org/springframework/beans/MethodInvocationException.java index e82daabbcb..e079bb0f56 100644 --- a/spring-beans/src/main/java/org/springframework/beans/MethodInvocationException.java +++ b/spring-beans/src/main/java/org/springframework/beans/MethodInvocationException.java @@ -42,7 +42,6 @@ public class MethodInvocationException extends PropertyAccessException { super(propertyChangeEvent, "Property '" + propertyChangeEvent.getPropertyName() + "' threw exception", cause); } - @Override public String getErrorCode() { return ERROR_CODE; } diff --git a/spring-beans/src/main/java/org/springframework/beans/MutablePropertyValues.java b/spring-beans/src/main/java/org/springframework/beans/MutablePropertyValues.java index 56bf9bb374..390b3f8a12 100644 --- a/spring-beans/src/main/java/org/springframework/beans/MutablePropertyValues.java +++ b/spring-beans/src/main/java/org/springframework/beans/MutablePropertyValues.java @@ -244,12 +244,10 @@ public class MutablePropertyValues implements PropertyValues, Serializable { } - @Override public PropertyValue[] getPropertyValues() { return this.propertyValueList.toArray(new PropertyValue[this.propertyValueList.size()]); } - @Override public PropertyValue getPropertyValue(String propertyName) { for (PropertyValue pv : this.propertyValueList) { if (pv.getName().equals(propertyName)) { @@ -259,7 +257,6 @@ public class MutablePropertyValues implements PropertyValues, Serializable { return null; } - @Override public PropertyValues changesSince(PropertyValues old) { MutablePropertyValues changes = new MutablePropertyValues(); if (old == this) { @@ -281,13 +278,11 @@ public class MutablePropertyValues implements PropertyValues, Serializable { return changes; } - @Override public boolean contains(String propertyName) { return (getPropertyValue(propertyName) != null || (this.processedProperties != null && this.processedProperties.contains(propertyName))); } - @Override public boolean isEmpty() { return this.propertyValueList.isEmpty(); } diff --git a/spring-beans/src/main/java/org/springframework/beans/PropertyEditorRegistrySupport.java b/spring-beans/src/main/java/org/springframework/beans/PropertyEditorRegistrySupport.java index b598879b3e..81854100d4 100644 --- a/spring-beans/src/main/java/org/springframework/beans/PropertyEditorRegistrySupport.java +++ b/spring-beans/src/main/java/org/springframework/beans/PropertyEditorRegistrySupport.java @@ -269,12 +269,10 @@ public class PropertyEditorRegistrySupport implements PropertyEditorRegistry { // Management of custom editors //--------------------------------------------------------------------- - @Override public void registerCustomEditor(Class requiredType, PropertyEditor propertyEditor) { registerCustomEditor(requiredType, null, propertyEditor); } - @Override public void registerCustomEditor(Class requiredType, String propertyPath, PropertyEditor propertyEditor) { if (requiredType == null && propertyPath == null) { throw new IllegalArgumentException("Either requiredType or propertyPath is required"); @@ -321,7 +319,6 @@ public class PropertyEditorRegistrySupport implements PropertyEditorRegistry { return (this.sharedEditors != null && this.sharedEditors.contains(propertyEditor)); } - @Override public PropertyEditor findCustomEditor(Class requiredType, String propertyPath) { Class requiredTypeToUse = requiredType; if (propertyPath != null) { diff --git a/spring-beans/src/main/java/org/springframework/beans/TypeConverterSupport.java b/spring-beans/src/main/java/org/springframework/beans/TypeConverterSupport.java index ec1f5a2b4c..61fb062afe 100644 --- a/spring-beans/src/main/java/org/springframework/beans/TypeConverterSupport.java +++ b/spring-beans/src/main/java/org/springframework/beans/TypeConverterSupport.java @@ -35,19 +35,16 @@ public abstract class TypeConverterSupport extends PropertyEditorRegistrySupport TypeConverterDelegate typeConverterDelegate; - @Override public T convertIfNecessary(Object value, Class requiredType) throws TypeMismatchException { return doConvert(value, requiredType, null, null); } - @Override public T convertIfNecessary(Object value, Class requiredType, MethodParameter methodParam) throws TypeMismatchException { return doConvert(value, requiredType, methodParam, null); } - @Override public T convertIfNecessary(Object value, Class requiredType, Field field) throws TypeMismatchException { diff --git a/spring-beans/src/main/java/org/springframework/beans/TypeMismatchException.java b/spring-beans/src/main/java/org/springframework/beans/TypeMismatchException.java index 83883a31a1..d1b7c48130 100644 --- a/spring-beans/src/main/java/org/springframework/beans/TypeMismatchException.java +++ b/spring-beans/src/main/java/org/springframework/beans/TypeMismatchException.java @@ -107,7 +107,6 @@ public class TypeMismatchException extends PropertyAccessException { return this.requiredType; } - @Override public String getErrorCode() { return ERROR_CODE; } diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/access/SingletonBeanFactoryLocator.java b/spring-beans/src/main/java/org/springframework/beans/factory/access/SingletonBeanFactoryLocator.java index c9536c7729..1dc3257819 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/access/SingletonBeanFactoryLocator.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/access/SingletonBeanFactoryLocator.java @@ -349,7 +349,6 @@ public class SingletonBeanFactoryLocator implements BeanFactoryLocator { this.resourceLocation = resourceLocation; } - @Override public BeanFactoryReference useBeanFactory(String factoryKey) throws BeansException { synchronized (this.bfgInstancesByKey) { BeanFactoryGroup bfg = this.bfgInstancesByKey.get(this.resourceLocation); @@ -501,13 +500,11 @@ public class SingletonBeanFactoryLocator implements BeanFactoryLocator { this.groupContextRef = groupContext; } - @Override public BeanFactory getFactory() { return this.beanFactory; } // Note that it's legal to call release more than once! - @Override public void release() throws FatalBeanException { synchronized (bfgInstancesByKey) { BeanFactory savedRef = this.groupContextRef; diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/annotation/AnnotatedGenericBeanDefinition.java b/spring-beans/src/main/java/org/springframework/beans/factory/annotation/AnnotatedGenericBeanDefinition.java index 9cbd62ccf5..f0fd4c5cac 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/annotation/AnnotatedGenericBeanDefinition.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/annotation/AnnotatedGenericBeanDefinition.java @@ -71,7 +71,6 @@ public class AnnotatedGenericBeanDefinition extends GenericBeanDefinition implem } - @Override public final AnnotationMetadata getMetadata() { return this.metadata; } diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/annotation/AnnotationBeanWiringInfoResolver.java b/spring-beans/src/main/java/org/springframework/beans/factory/annotation/AnnotationBeanWiringInfoResolver.java index 78fe8fe86a..75a00b70cd 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/annotation/AnnotationBeanWiringInfoResolver.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/annotation/AnnotationBeanWiringInfoResolver.java @@ -36,7 +36,6 @@ import org.springframework.util.ClassUtils; */ public class AnnotationBeanWiringInfoResolver implements BeanWiringInfoResolver { - @Override public BeanWiringInfo resolveWiringInfo(Object beanInstance) { Assert.notNull(beanInstance, "Bean instance must not be null"); Configurable annotation = beanInstance.getClass().getAnnotation(Configurable.class); diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java b/spring-beans/src/main/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java index 6a0442c3d0..e1f0e2f392 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java @@ -199,12 +199,10 @@ public class AutowiredAnnotationBeanPostProcessor extends InstantiationAwareBean this.order = order; } - @Override public int getOrder() { return this.order; } - @Override public void setBeanFactory(BeanFactory beanFactory) throws BeansException { if (!(beanFactory instanceof ConfigurableListableBeanFactory)) { throw new IllegalArgumentException( @@ -214,7 +212,6 @@ public class AutowiredAnnotationBeanPostProcessor extends InstantiationAwareBean } - @Override public void postProcessMergedBeanDefinition(RootBeanDefinition beanDefinition, Class beanType, String beanName) { if (beanType != null) { InjectionMetadata metadata = findAutowiringMetadata(beanType); diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/annotation/CustomAutowireConfigurer.java b/spring-beans/src/main/java/org/springframework/beans/factory/annotation/CustomAutowireConfigurer.java index 2d6934de0c..5148933084 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/annotation/CustomAutowireConfigurer.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/annotation/CustomAutowireConfigurer.java @@ -59,12 +59,10 @@ public class CustomAutowireConfigurer implements BeanFactoryPostProcessor, BeanC this.order = order; } - @Override public int getOrder() { return this.order; } - @Override public void setBeanClassLoader(ClassLoader beanClassLoader) { this.beanClassLoader = beanClassLoader; } @@ -84,7 +82,6 @@ public class CustomAutowireConfigurer implements BeanFactoryPostProcessor, BeanC } - @Override @SuppressWarnings("unchecked") public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { if (this.customQualifierTypes != null) { diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/annotation/InitDestroyAnnotationBeanPostProcessor.java b/spring-beans/src/main/java/org/springframework/beans/factory/annotation/InitDestroyAnnotationBeanPostProcessor.java index 2bc1537f9a..74a5e59d24 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/annotation/InitDestroyAnnotationBeanPostProcessor.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/annotation/InitDestroyAnnotationBeanPostProcessor.java @@ -112,13 +112,11 @@ public class InitDestroyAnnotationBeanPostProcessor this.order = order; } - @Override public int getOrder() { return this.order; } - @Override public void postProcessMergedBeanDefinition(RootBeanDefinition beanDefinition, Class beanType, String beanName) { if (beanType != null) { LifecycleMetadata metadata = findLifecycleMetadata(beanType); @@ -126,7 +124,6 @@ public class InitDestroyAnnotationBeanPostProcessor } } - @Override public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { LifecycleMetadata metadata = findLifecycleMetadata(bean.getClass()); try { @@ -141,12 +138,10 @@ public class InitDestroyAnnotationBeanPostProcessor return bean; } - @Override public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { return bean; } - @Override public void postProcessBeforeDestruction(Object bean, String beanName) throws BeansException { LifecycleMetadata metadata = findLifecycleMetadata(bean.getClass()); try { diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/annotation/QualifierAnnotationAutowireCandidateResolver.java b/spring-beans/src/main/java/org/springframework/beans/factory/annotation/QualifierAnnotationAutowireCandidateResolver.java index 2a7f122f9d..657ee22666 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/annotation/QualifierAnnotationAutowireCandidateResolver.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/annotation/QualifierAnnotationAutowireCandidateResolver.java @@ -126,7 +126,6 @@ public class QualifierAnnotationAutowireCandidateResolver implements AutowireCan this.valueAnnotationType = valueAnnotationType; } - @Override public void setBeanFactory(BeanFactory beanFactory) { this.beanFactory = beanFactory; } @@ -144,7 +143,6 @@ public class QualifierAnnotationAutowireCandidateResolver implements AutowireCan * attribute does not match. * @see Qualifier */ - @Override public boolean isAutowireCandidate(BeanDefinitionHolder bdHolder, DependencyDescriptor descriptor) { if (!bdHolder.getBeanDefinition().isAutowireCandidate()) { // if explicitly false, do not proceed with qualifier check @@ -295,7 +293,6 @@ public class QualifierAnnotationAutowireCandidateResolver implements AutowireCan * Determine whether the given dependency carries a value annotation. * @see Value */ - @Override public Object getSuggestedValue(DependencyDescriptor descriptor) { Object value = findValue(descriptor.getAnnotations()); if (value == null) { diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/annotation/RequiredAnnotationBeanPostProcessor.java b/spring-beans/src/main/java/org/springframework/beans/factory/annotation/RequiredAnnotationBeanPostProcessor.java index 19f3035a36..862dbd6fa6 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/annotation/RequiredAnnotationBeanPostProcessor.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/annotation/RequiredAnnotationBeanPostProcessor.java @@ -116,7 +116,6 @@ public class RequiredAnnotationBeanPostProcessor extends InstantiationAwareBeanP return this.requiredAnnotationType; } - @Override public void setBeanFactory(BeanFactory beanFactory) { if (beanFactory instanceof ConfigurableListableBeanFactory) { this.beanFactory = (ConfigurableListableBeanFactory) beanFactory; @@ -127,13 +126,11 @@ public class RequiredAnnotationBeanPostProcessor extends InstantiationAwareBeanP this.order = order; } - @Override public int getOrder() { return this.order; } - @Override public void postProcessMergedBeanDefinition(RootBeanDefinition beanDefinition, Class beanType, String beanName) { } diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/AbstractFactoryBean.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/AbstractFactoryBean.java index 2dda2ca735..5c1ad4b751 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/config/AbstractFactoryBean.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/AbstractFactoryBean.java @@ -84,17 +84,14 @@ public abstract class AbstractFactoryBean this.singleton = singleton; } - @Override public boolean isSingleton() { return this.singleton; } - @Override public void setBeanClassLoader(ClassLoader classLoader) { this.beanClassLoader = classLoader; } - @Override public void setBeanFactory(BeanFactory beanFactory) { this.beanFactory = beanFactory; } @@ -127,7 +124,6 @@ public abstract class AbstractFactoryBean /** * Eagerly create the singleton instance, if necessary. */ - @Override public void afterPropertiesSet() throws Exception { if (isSingleton()) { this.initialized = true; @@ -142,7 +138,6 @@ public abstract class AbstractFactoryBean * @see #createInstance() * @see #getEarlySingletonInterfaces() */ - @Override public final T getObject() throws Exception { if (isSingleton()) { return (this.initialized ? this.singletonInstance : getEarlySingletonInstance()); @@ -186,7 +181,6 @@ public abstract class AbstractFactoryBean * Destroy the singleton instance, if any. * @see #destroyInstance(Object) */ - @Override public void destroy() throws Exception { if (isSingleton()) { destroyInstance(this.singletonInstance); @@ -199,7 +193,6 @@ public abstract class AbstractFactoryBean * interface, for a consistent offering of abstract template methods. * @see org.springframework.beans.factory.FactoryBean#getObjectType() */ - @Override public abstract Class getObjectType(); /** @@ -248,7 +241,6 @@ public abstract class AbstractFactoryBean */ private class EarlySingletonInvocationHandler implements InvocationHandler { - @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { if (ReflectionUtils.isEqualsMethod(method)) { // Only consider equal when proxies are identical. diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/BeanDefinitionHolder.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/BeanDefinitionHolder.java index 0f8148f060..c9d442c335 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/config/BeanDefinitionHolder.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/BeanDefinitionHolder.java @@ -108,7 +108,6 @@ public class BeanDefinitionHolder implements BeanMetadataElement { * Expose the bean definition's source object. * @see BeanDefinition#getSource() */ - @Override public Object getSource() { return this.beanDefinition.getSource(); } diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/BeanReferenceFactoryBean.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/BeanReferenceFactoryBean.java index f637b891e1..bbe7ddf804 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/config/BeanReferenceFactoryBean.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/BeanReferenceFactoryBean.java @@ -65,7 +65,6 @@ public class BeanReferenceFactoryBean implements SmartFactoryBean, BeanFactoryAw this.targetBeanName = targetBeanName; } - @Override public void setBeanFactory(BeanFactory beanFactory) { this.beanFactory = beanFactory; if (this.targetBeanName == null) { @@ -77,7 +76,6 @@ public class BeanReferenceFactoryBean implements SmartFactoryBean, BeanFactoryAw } - @Override public Object getObject() throws BeansException { if (this.beanFactory == null) { throw new FactoryBeanNotInitializedException(); @@ -85,7 +83,6 @@ public class BeanReferenceFactoryBean implements SmartFactoryBean, BeanFactoryAw return this.beanFactory.getBean(this.targetBeanName); } - @Override public Class getObjectType() { if (this.beanFactory == null) { return null; @@ -93,7 +90,6 @@ public class BeanReferenceFactoryBean implements SmartFactoryBean, BeanFactoryAw return this.beanFactory.getType(this.targetBeanName); } - @Override public boolean isSingleton() { if (this.beanFactory == null) { throw new FactoryBeanNotInitializedException(); @@ -101,7 +97,6 @@ public class BeanReferenceFactoryBean implements SmartFactoryBean, BeanFactoryAw return this.beanFactory.isSingleton(this.targetBeanName); } - @Override public boolean isPrototype() { if (this.beanFactory == null) { throw new FactoryBeanNotInitializedException(); @@ -109,7 +104,6 @@ public class BeanReferenceFactoryBean implements SmartFactoryBean, BeanFactoryAw return this.beanFactory.isPrototype(this.targetBeanName); } - @Override public boolean isEagerInit() { return false; } diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/CommonsLogFactoryBean.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/CommonsLogFactoryBean.java index c49cb6db32..d0e93c8b0c 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/config/CommonsLogFactoryBean.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/CommonsLogFactoryBean.java @@ -53,24 +53,20 @@ public class CommonsLogFactoryBean implements FactoryBean, InitializingBean } - @Override public void afterPropertiesSet() { if (this.log == null) { throw new IllegalArgumentException("'logName' is required"); } } - @Override public Log getObject() { return this.log; } - @Override public Class getObjectType() { return (this.log != null ? this.log.getClass() : Log.class); } - @Override public boolean isSingleton() { return true; } diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/ConstructorArgumentValues.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/ConstructorArgumentValues.java index 795ef04a5c..1e59e7d134 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/config/ConstructorArgumentValues.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/ConstructorArgumentValues.java @@ -519,7 +519,6 @@ public class ConstructorArgumentValues { this.source = source; } - @Override public Object getSource() { return this.source; } diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/CustomEditorConfigurer.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/CustomEditorConfigurer.java index b10c74c78b..f155dedbdf 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/config/CustomEditorConfigurer.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/CustomEditorConfigurer.java @@ -119,7 +119,6 @@ public class CustomEditorConfigurer implements BeanFactoryPostProcessor, BeanCla this.order = order; } - @Override public int getOrder() { return this.order; } @@ -162,13 +161,11 @@ public class CustomEditorConfigurer implements BeanFactoryPostProcessor, BeanCla this.ignoreUnresolvableEditors = ignoreUnresolvableEditors; } - @Override public void setBeanClassLoader(ClassLoader beanClassLoader) { this.beanClassLoader = beanClassLoader; } - @Override @SuppressWarnings("unchecked") public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { if (this.propertyEditorRegistrars != null) { @@ -237,7 +234,6 @@ public class CustomEditorConfigurer implements BeanFactoryPostProcessor, BeanCla this.sharedEditor = sharedEditor; } - @Override public void registerCustomEditors(PropertyEditorRegistry registry) { if (!(registry instanceof PropertyEditorRegistrySupport)) { throw new IllegalArgumentException("Cannot registered shared editor " + diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/CustomScopeConfigurer.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/CustomScopeConfigurer.java index 0d5a281925..8d820ac04d 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/config/CustomScopeConfigurer.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/CustomScopeConfigurer.java @@ -65,18 +65,15 @@ public class CustomScopeConfigurer implements BeanFactoryPostProcessor, BeanClas this.order = order; } - @Override public int getOrder() { return this.order; } - @Override public void setBeanClassLoader(ClassLoader beanClassLoader) { this.beanClassLoader = beanClassLoader; } - @Override @SuppressWarnings("unchecked") public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { if (this.scopes != null) { diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/DeprecatedBeanWarner.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/DeprecatedBeanWarner.java index 893e4c2016..815173b6be 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/config/DeprecatedBeanWarner.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/DeprecatedBeanWarner.java @@ -52,7 +52,6 @@ public class DeprecatedBeanWarner implements BeanFactoryPostProcessor { } - @Override public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { if (isLogEnabled()) { String[] beanNames = beanFactory.getBeanDefinitionNames(); diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/FieldRetrievingFactoryBean.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/FieldRetrievingFactoryBean.java index b5471cb4e1..31edfa9144 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/config/FieldRetrievingFactoryBean.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/FieldRetrievingFactoryBean.java @@ -142,18 +142,15 @@ public class FieldRetrievingFactoryBean * nor "targetField" have been specified. * This allows for concise bean definitions with just an id/name. */ - @Override public void setBeanName(String beanName) { this.beanName = StringUtils.trimAllWhitespace(BeanFactoryUtils.originalBeanName(beanName)); } - @Override public void setBeanClassLoader(ClassLoader classLoader) { this.beanClassLoader = classLoader; } - @Override public void afterPropertiesSet() throws ClassNotFoundException, NoSuchFieldException { if (this.targetClass != null && this.targetObject != null) { throw new IllegalArgumentException("Specify either targetClass or targetObject, not both"); @@ -194,7 +191,6 @@ public class FieldRetrievingFactoryBean } - @Override public Object getObject() throws IllegalAccessException { if (this.fieldObject == null) { throw new FactoryBeanNotInitializedException(); @@ -210,12 +206,10 @@ public class FieldRetrievingFactoryBean } } - @Override public Class getObjectType() { return (this.fieldObject != null ? this.fieldObject.getType() : null); } - @Override public boolean isSingleton() { return false; } diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/InstantiationAwareBeanPostProcessorAdapter.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/InstantiationAwareBeanPostProcessorAdapter.java index 3e02846fcb..7846d91bdd 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/config/InstantiationAwareBeanPostProcessorAdapter.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/InstantiationAwareBeanPostProcessorAdapter.java @@ -39,32 +39,26 @@ import org.springframework.beans.PropertyValues; */ public abstract class InstantiationAwareBeanPostProcessorAdapter implements SmartInstantiationAwareBeanPostProcessor { - @Override public Class predictBeanType(Class beanClass, String beanName) { return null; } - @Override public Constructor[] determineCandidateConstructors(Class beanClass, String beanName) throws BeansException { return null; } - @Override public Object getEarlyBeanReference(Object bean, String beanName) throws BeansException { return bean; } - @Override public Object postProcessBeforeInstantiation(Class beanClass, String beanName) throws BeansException { return null; } - @Override public boolean postProcessAfterInstantiation(Object bean, String beanName) throws BeansException { return true; } - @Override public PropertyValues postProcessPropertyValues( PropertyValues pvs, PropertyDescriptor[] pds, Object bean, String beanName) throws BeansException { @@ -72,12 +66,10 @@ public abstract class InstantiationAwareBeanPostProcessorAdapter implements Smar return pvs; } - @Override public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { return bean; } - @Override public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { return bean; } diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/MethodInvokingFactoryBean.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/MethodInvokingFactoryBean.java index 0e6ad68f07..1615a8125f 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/config/MethodInvokingFactoryBean.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/MethodInvokingFactoryBean.java @@ -110,12 +110,10 @@ public class MethodInvokingFactoryBean extends ArgumentConvertingMethodInvoker this.singleton = singleton; } - @Override public boolean isSingleton() { return this.singleton; } - @Override public void setBeanClassLoader(ClassLoader classLoader) { this.beanClassLoader = classLoader; } @@ -125,7 +123,6 @@ public class MethodInvokingFactoryBean extends ArgumentConvertingMethodInvoker return ClassUtils.forName(className, this.beanClassLoader); } - @Override public void setBeanFactory(BeanFactory beanFactory) { if (beanFactory instanceof ConfigurableBeanFactory) { this.beanFactory = (ConfigurableBeanFactory) beanFactory; @@ -148,7 +145,6 @@ public class MethodInvokingFactoryBean extends ArgumentConvertingMethodInvoker } - @Override public void afterPropertiesSet() throws Exception { prepare(); if (this.singleton) { @@ -182,7 +178,6 @@ public class MethodInvokingFactoryBean extends ArgumentConvertingMethodInvoker * to "true", otherwise returns the value returned from invoking the * specified method on the fly. */ - @Override public Object getObject() throws Exception { if (this.singleton) { if (!this.initialized) { @@ -201,7 +196,6 @@ public class MethodInvokingFactoryBean extends ArgumentConvertingMethodInvoker * Return the type of object that this FactoryBean creates, * or {@code null} if not known in advance. */ - @Override public Class getObjectType() { if (!isPrepared()) { // Not fully initialized yet -> return null to indicate "not known yet". diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/ObjectFactoryCreatingFactoryBean.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/ObjectFactoryCreatingFactoryBean.java index 5c3ed77257..710eeddae6 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/config/ObjectFactoryCreatingFactoryBean.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/ObjectFactoryCreatingFactoryBean.java @@ -143,7 +143,6 @@ public class ObjectFactoryCreatingFactoryBean extends AbstractFactoryBean getObjectType() { return Properties.class; } diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/PropertyPathFactoryBean.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/PropertyPathFactoryBean.java index 4b8703abf0..b9b822e2e2 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/config/PropertyPathFactoryBean.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/PropertyPathFactoryBean.java @@ -147,13 +147,11 @@ public class PropertyPathFactoryBean implements FactoryBean, BeanNameAwa * "targetBeanName" nor "propertyPath" have been specified. * This allows for concise bean definitions with just an id/name. */ - @Override public void setBeanName(String beanName) { this.beanName = StringUtils.trimAllWhitespace(BeanFactoryUtils.originalBeanName(beanName)); } - @Override public void setBeanFactory(BeanFactory beanFactory) { this.beanFactory = beanFactory; @@ -192,7 +190,6 @@ public class PropertyPathFactoryBean implements FactoryBean, BeanNameAwa } - @Override public Object getObject() throws BeansException { BeanWrapper target = this.targetBeanWrapper; if (target != null) { @@ -211,7 +208,6 @@ public class PropertyPathFactoryBean implements FactoryBean, BeanNameAwa return target.getPropertyValue(this.propertyPath); } - @Override public Class getObjectType() { return this.resultType; } @@ -222,7 +218,6 @@ public class PropertyPathFactoryBean implements FactoryBean, BeanNameAwa * for each call, so we have to assume that we're not returning the * same object for each {@link #getObject()} call. */ - @Override public boolean isSingleton() { return false; } diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/PropertyPlaceholderConfigurer.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/PropertyPlaceholderConfigurer.java index c9d39f3bf5..bf9474138f 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/config/PropertyPlaceholderConfigurer.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/PropertyPlaceholderConfigurer.java @@ -251,7 +251,6 @@ public class PropertyPlaceholderConfigurer extends PlaceholderConfigurerSupport this.resolver = new PropertyPlaceholderConfigurerResolver(props); } - @Override public String resolveStringValue(String strVal) throws BeansException { String value = this.helper.replacePlaceholders(strVal, this.resolver); return (value.equals(nullValue) ? null : value); @@ -267,7 +266,6 @@ public class PropertyPlaceholderConfigurer extends PlaceholderConfigurerSupport this.props = props; } - @Override public String resolvePlaceholder(String placeholderName) { return PropertyPlaceholderConfigurer.this.resolvePlaceholder(placeholderName, props, systemPropertiesMode); } diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/PropertyResourceConfigurer.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/PropertyResourceConfigurer.java index a84bdc067a..b2ac317033 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/config/PropertyResourceConfigurer.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/PropertyResourceConfigurer.java @@ -63,7 +63,6 @@ public abstract class PropertyResourceConfigurer extends PropertiesLoaderSupport this.order = order; } - @Override public int getOrder() { return this.order; } @@ -74,7 +73,6 @@ public abstract class PropertyResourceConfigurer extends PropertiesLoaderSupport * {@linkplain #processProperties process} properties against the given bean factory. * @throws BeanInitializationException if any properties cannot be loaded */ - @Override public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { try { Properties mergedProps = mergeProperties(); diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/ProviderCreatingFactoryBean.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/ProviderCreatingFactoryBean.java index c0d2537042..b64f38ffe2 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/config/ProviderCreatingFactoryBean.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/ProviderCreatingFactoryBean.java @@ -88,7 +88,6 @@ public class ProviderCreatingFactoryBean extends AbstractFactoryBean { this.targetBeanName = targetBeanName; } - @Override public Object get() throws BeansException { return this.beanFactory.getBean(this.targetBeanName); } diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/RuntimeBeanNameReference.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/RuntimeBeanNameReference.java index 2e078aeb48..7477e197cb 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/config/RuntimeBeanNameReference.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/RuntimeBeanNameReference.java @@ -44,7 +44,6 @@ public class RuntimeBeanNameReference implements BeanReference { this.beanName = beanName; } - @Override public String getBeanName() { return this.beanName; } @@ -57,7 +56,6 @@ public class RuntimeBeanNameReference implements BeanReference { this.source = source; } - @Override public Object getSource() { return this.source; } diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/RuntimeBeanReference.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/RuntimeBeanReference.java index dd3648e3cc..836098ff8c 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/config/RuntimeBeanReference.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/RuntimeBeanReference.java @@ -61,7 +61,6 @@ public class RuntimeBeanReference implements BeanReference { } - @Override public String getBeanName() { return this.beanName; } @@ -82,7 +81,6 @@ public class RuntimeBeanReference implements BeanReference { this.source = source; } - @Override public Object getSource() { return this.source; } diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/ServiceLocatorFactoryBean.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/ServiceLocatorFactoryBean.java index ef91b2b749..e8f2b72b6c 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/config/ServiceLocatorFactoryBean.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/ServiceLocatorFactoryBean.java @@ -246,7 +246,6 @@ public class ServiceLocatorFactoryBean implements FactoryBean, BeanFacto this.serviceMappings = serviceMappings; } - @Override public void setBeanFactory(BeanFactory beanFactory) throws BeansException { if (!(beanFactory instanceof ListableBeanFactory)) { throw new FatalBeanException( @@ -255,7 +254,6 @@ public class ServiceLocatorFactoryBean implements FactoryBean, BeanFacto this.beanFactory = (ListableBeanFactory) beanFactory; } - @Override public void afterPropertiesSet() { if (this.serviceLocatorInterface == null) { throw new IllegalArgumentException("Property 'serviceLocatorInterface' is required"); @@ -325,17 +323,14 @@ public class ServiceLocatorFactoryBean implements FactoryBean, BeanFacto } - @Override public Object getObject() { return this.proxy; } - @Override public Class getObjectType() { return this.serviceLocatorInterface; } - @Override public boolean isSingleton() { return true; } @@ -346,7 +341,6 @@ public class ServiceLocatorFactoryBean implements FactoryBean, BeanFacto */ private class ServiceLocatorInvocationHandler implements InvocationHandler { - @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { if (ReflectionUtils.isEqualsMethod(method)) { // Only consider equal when proxies are identical. diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/TypedStringValue.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/TypedStringValue.java index a9ff4fdbfb..e4f27fec8b 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/config/TypedStringValue.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/TypedStringValue.java @@ -171,7 +171,6 @@ public class TypedStringValue implements BeanMetadataElement { this.source = source; } - @Override public Object getSource() { return this.source; } diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/parsing/AbstractComponentDefinition.java b/spring-beans/src/main/java/org/springframework/beans/factory/parsing/AbstractComponentDefinition.java index 08d4aa43c1..0b47dba2f8 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/parsing/AbstractComponentDefinition.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/parsing/AbstractComponentDefinition.java @@ -35,7 +35,6 @@ public abstract class AbstractComponentDefinition implements ComponentDefinition /** * Delegates to {@link #getName}. */ - @Override public String getDescription() { return getName(); } @@ -43,7 +42,6 @@ public abstract class AbstractComponentDefinition implements ComponentDefinition /** * Returns an empty array. */ - @Override public BeanDefinition[] getBeanDefinitions() { return new BeanDefinition[0]; } @@ -51,7 +49,6 @@ public abstract class AbstractComponentDefinition implements ComponentDefinition /** * Returns an empty array. */ - @Override public BeanDefinition[] getInnerBeanDefinitions() { return new BeanDefinition[0]; } @@ -59,7 +56,6 @@ public abstract class AbstractComponentDefinition implements ComponentDefinition /** * Returns an empty array. */ - @Override public BeanReference[] getBeanReferences() { return new BeanReference[0]; } diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/parsing/AliasDefinition.java b/spring-beans/src/main/java/org/springframework/beans/factory/parsing/AliasDefinition.java index 06d037c5d7..828cdc8257 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/parsing/AliasDefinition.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/parsing/AliasDefinition.java @@ -73,7 +73,6 @@ public class AliasDefinition implements BeanMetadataElement { return this.alias; } - @Override public final Object getSource() { return this.source; } diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/parsing/BeanComponentDefinition.java b/spring-beans/src/main/java/org/springframework/beans/factory/parsing/BeanComponentDefinition.java index 2b88d82765..d281d86cd4 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/parsing/BeanComponentDefinition.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/parsing/BeanComponentDefinition.java @@ -94,27 +94,22 @@ public class BeanComponentDefinition extends BeanDefinitionHolder implements Com } - @Override public String getName() { return getBeanName(); } - @Override public String getDescription() { return getShortDescription(); } - @Override public BeanDefinition[] getBeanDefinitions() { return new BeanDefinition[] {getBeanDefinition()}; } - @Override public BeanDefinition[] getInnerBeanDefinitions() { return this.innerBeanDefinitions; } - @Override public BeanReference[] getBeanReferences() { return this.beanReferences; } diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/parsing/CompositeComponentDefinition.java b/spring-beans/src/main/java/org/springframework/beans/factory/parsing/CompositeComponentDefinition.java index 550ae761c2..70e9ba209c 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/parsing/CompositeComponentDefinition.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/parsing/CompositeComponentDefinition.java @@ -51,12 +51,10 @@ public class CompositeComponentDefinition extends AbstractComponentDefinition { } - @Override public String getName() { return this.name; } - @Override public Object getSource() { return this.source; } diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/parsing/EmptyReaderEventListener.java b/spring-beans/src/main/java/org/springframework/beans/factory/parsing/EmptyReaderEventListener.java index f27831a63f..26cc3c0c40 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/parsing/EmptyReaderEventListener.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/parsing/EmptyReaderEventListener.java @@ -25,22 +25,18 @@ package org.springframework.beans.factory.parsing; */ public class EmptyReaderEventListener implements ReaderEventListener { - @Override public void defaultsRegistered(DefaultsDefinition defaultsDefinition) { // no-op } - @Override public void componentRegistered(ComponentDefinition componentDefinition) { // no-op } - @Override public void aliasRegistered(AliasDefinition aliasDefinition) { // no-op } - @Override public void importProcessed(ImportDefinition importDefinition) { // no-op } diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/parsing/FailFastProblemReporter.java b/spring-beans/src/main/java/org/springframework/beans/factory/parsing/FailFastProblemReporter.java index 859d611f14..76f3a2fd8a 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/parsing/FailFastProblemReporter.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/parsing/FailFastProblemReporter.java @@ -55,7 +55,6 @@ public class FailFastProblemReporter implements ProblemReporter { * that has occurred. * @param problem the source of the error */ - @Override public void fatal(Problem problem) { throw new BeanDefinitionParsingException(problem); } @@ -65,7 +64,6 @@ public class FailFastProblemReporter implements ProblemReporter { * that has occurred. * @param problem the source of the error */ - @Override public void error(Problem problem) { throw new BeanDefinitionParsingException(problem); } @@ -74,7 +72,6 @@ public class FailFastProblemReporter implements ProblemReporter { * Writes the supplied {@link Problem} to the {@link Log} at {@code WARN} level. * @param problem the source of the warning */ - @Override public void warning(Problem problem) { this.logger.warn(problem, problem.getRootCause()); } diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/parsing/ImportDefinition.java b/spring-beans/src/main/java/org/springframework/beans/factory/parsing/ImportDefinition.java index 85eea69610..ffc1cb2a1e 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/parsing/ImportDefinition.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/parsing/ImportDefinition.java @@ -77,7 +77,6 @@ public class ImportDefinition implements BeanMetadataElement { return this.actualResources; } - @Override public final Object getSource() { return this.source; } diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/parsing/NullSourceExtractor.java b/spring-beans/src/main/java/org/springframework/beans/factory/parsing/NullSourceExtractor.java index 3e3fa62524..66dfae23d9 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/parsing/NullSourceExtractor.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/parsing/NullSourceExtractor.java @@ -33,7 +33,6 @@ public class NullSourceExtractor implements SourceExtractor { /** * This implementation simply returns {@code null} for any input. */ - @Override public Object extractSource(Object sourceCandidate, Resource definitionResource) { return null; } diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/parsing/PassThroughSourceExtractor.java b/spring-beans/src/main/java/org/springframework/beans/factory/parsing/PassThroughSourceExtractor.java index a9f56dbfbb..4611365c07 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/parsing/PassThroughSourceExtractor.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/parsing/PassThroughSourceExtractor.java @@ -39,7 +39,6 @@ public class PassThroughSourceExtractor implements SourceExtractor { * @param sourceCandidate the source metadata * @return the supplied {@code sourceCandidate} */ - @Override public Object extractSource(Object sourceCandidate, Resource definingResource) { return sourceCandidate; } diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractAutowireCapableBeanFactory.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractAutowireCapableBeanFactory.java index 4bb0f75145..c112676ea1 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractAutowireCapableBeanFactory.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractAutowireCapableBeanFactory.java @@ -280,7 +280,6 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac // Typical methods for creating and populating external bean instances //------------------------------------------------------------------------- - @Override @SuppressWarnings("unchecked") public T createBean(Class beanClass) throws BeansException { // Use prototype bean definition, to avoid registering bean as dependent bean. @@ -290,7 +289,6 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac return (T) createBean(beanClass.getName(), bd, null); } - @Override public void autowireBean(Object existingBean) { // Use non-singleton bean definition, to avoid registering bean as dependent bean. RootBeanDefinition bd = new RootBeanDefinition(ClassUtils.getUserClass(existingBean)); @@ -301,7 +299,6 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac populateBean(bd.getBeanClass().getName(), bd, bw); } - @Override public Object configureBean(Object existingBean, String beanName) throws BeansException { markBeanAsCreated(beanName); BeanDefinition mbd = getMergedBeanDefinition(beanName); @@ -323,7 +320,6 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac return initializeBean(beanName, existingBean, bd); } - @Override public Object resolveDependency(DependencyDescriptor descriptor, String beanName) throws BeansException { return resolveDependency(descriptor, beanName, null, null); } @@ -333,7 +329,6 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac // Specialized methods for fine-grained control over the bean lifecycle //------------------------------------------------------------------------- - @Override public Object createBean(Class beanClass, int autowireMode, boolean dependencyCheck) throws BeansException { // Use non-singleton bean definition, to avoid registering bean as dependent bean. RootBeanDefinition bd = new RootBeanDefinition(beanClass, autowireMode, dependencyCheck); @@ -341,7 +336,6 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac return createBean(beanClass.getName(), bd, null); } - @Override public Object autowire(Class beanClass, int autowireMode, boolean dependencyCheck) throws BeansException { // Use non-singleton bean definition, to avoid registering bean as dependent bean. final RootBeanDefinition bd = new RootBeanDefinition(beanClass, autowireMode, dependencyCheck); @@ -356,7 +350,6 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac if (System.getSecurityManager() != null) { bean = AccessController.doPrivileged(new PrivilegedAction() { - @Override public Object run() { return getInstantiationStrategy().instantiate(bd, null, parent); } @@ -371,7 +364,6 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac } } - @Override public void autowireBeanProperties(Object existingBean, int autowireMode, boolean dependencyCheck) throws BeansException { @@ -387,7 +379,6 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac populateBean(bd.getBeanClass().getName(), bd, bw); } - @Override public void applyBeanPropertyValues(Object existingBean, String beanName) throws BeansException { markBeanAsCreated(beanName); BeanDefinition bd = getMergedBeanDefinition(beanName); @@ -396,12 +387,10 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac applyPropertyValues(beanName, bd, bw, bd.getPropertyValues()); } - @Override public Object initializeBean(Object existingBean, String beanName) { return initializeBean(beanName, existingBean, null); } - @Override public Object applyBeanPostProcessorsBeforeInitialization(Object existingBean, String beanName) throws BeansException { @@ -415,7 +404,6 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac return result; } - @Override public Object applyBeanPostProcessorsAfterInitialization(Object existingBean, String beanName) throws BeansException { @@ -522,7 +510,6 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac "' to allow for resolving potential circular references"); } addSingletonFactory(beanName, new ObjectFactory() { - @Override public Object getObject() throws BeansException { return getEarlyBeanReference(beanName, mbd, bean); } @@ -708,7 +695,6 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac // @Bean methods, there may be parameters present. ReflectionUtils.doWithMethods(fbClass, new ReflectionUtils.MethodCallback() { - @Override public void doWith(Method method) throws IllegalArgumentException, IllegalAccessException { if (method.getName().equals(factoryMethodName) && FactoryBean.class.isAssignableFrom(method.getReturnType())) { @@ -1009,7 +995,6 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac final BeanFactory parent = this; if (System.getSecurityManager() != null) { beanInstance = AccessController.doPrivileged(new PrivilegedAction() { - @Override public Object run() { return getInstantiationStrategy().instantiate(mbd, beanName, parent); } @@ -1479,7 +1464,6 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac protected Object initializeBean(final String beanName, final Object bean, RootBeanDefinition mbd) { if (System.getSecurityManager() != null) { AccessController.doPrivileged(new PrivilegedAction() { - @Override public Object run() { invokeAwareMethods(beanName, bean); return null; @@ -1547,7 +1531,6 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac if (System.getSecurityManager() != null) { try { AccessController.doPrivileged(new PrivilegedExceptionAction() { - @Override public Object run() throws Exception { ((InitializingBean) bean).afterPropertiesSet(); return null; @@ -1605,7 +1588,6 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac if (System.getSecurityManager() != null) { AccessController.doPrivileged(new PrivilegedExceptionAction() { - @Override public Object run() throws Exception { ReflectionUtils.makeAccessible(initMethod); return null; @@ -1613,7 +1595,6 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac }); try { AccessController.doPrivileged(new PrivilegedExceptionAction() { - @Override public Object run() throws Exception { initMethod.invoke(bean); return null; diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanDefinition.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanDefinition.java index 3d1895aa78..f93ea1b408 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanDefinition.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanDefinition.java @@ -386,12 +386,10 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess return (Class) beanClassObject; } - @Override public void setBeanClassName(String beanClassName) { this.beanClass = beanClassName; } - @Override public String getBeanClassName() { Object beanClassObject = this.beanClass; if (beanClassObject instanceof Class) { @@ -431,7 +429,6 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess * @see #SCOPE_SINGLETON * @see #SCOPE_PROTOTYPE */ - @Override public void setScope(String scope) { this.scope = scope; this.singleton = SCOPE_SINGLETON.equals(scope) || SCOPE_DEFAULT.equals(scope); @@ -441,7 +438,6 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess /** * Return the name of the target scope for the bean. */ - @Override public String getScope() { return this.scope; } @@ -471,7 +467,6 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess * returned from all calls. * @see #SCOPE_SINGLETON */ - @Override public boolean isSingleton() { return this.singleton; } @@ -481,7 +476,6 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess * returned for each call. * @see #SCOPE_PROTOTYPE */ - @Override public boolean isPrototype() { return this.prototype; } @@ -500,7 +494,6 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess * Return whether this bean is "abstract", i.e. not meant to be instantiated * itself but rather just serving as parent for concrete child bean definitions. */ - @Override public boolean isAbstract() { return this.abstractFlag; } @@ -510,7 +503,6 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess *

If {@code false}, the bean will get instantiated on startup by bean * factories that perform eager initialization of singletons. */ - @Override public void setLazyInit(boolean lazyInit) { this.lazyInit = lazyInit; } @@ -519,7 +511,6 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess * Return whether this bean should be lazily initialized, i.e. not * eagerly instantiated on startup. Only applicable to a singleton bean. */ - @Override public boolean isLazyInit() { return this.lazyInit; } @@ -600,7 +591,6 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess * constructor arguments. This property should just be necessary for other kinds * of dependencies like statics (*ugh*) or database preparation on startup. */ - @Override public void setDependsOn(String[] dependsOn) { this.dependsOn = dependsOn; } @@ -608,7 +598,6 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess /** * Return the bean names that this bean depends on. */ - @Override public String[] getDependsOn() { return this.dependsOn; } @@ -616,7 +605,6 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess /** * Set whether this bean is a candidate for getting autowired into some other bean. */ - @Override public void setAutowireCandidate(boolean autowireCandidate) { this.autowireCandidate = autowireCandidate; } @@ -624,7 +612,6 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess /** * Return whether this bean is a candidate for getting autowired into some other bean. */ - @Override public boolean isAutowireCandidate() { return this.autowireCandidate; } @@ -634,7 +621,6 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess * If this value is true for exactly one bean among multiple * matching candidates, it will serve as a tie-breaker. */ - @Override public void setPrimary(boolean primary) { this.primary = primary; } @@ -644,7 +630,6 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess * If this value is true for exactly one bean among multiple * matching candidates, it will serve as a tie-breaker. */ - @Override public boolean isPrimary() { return this.primary; } @@ -739,7 +724,6 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess /** * Return constructor argument values for this bean (never {@code null}). */ - @Override public ConstructorArgumentValues getConstructorArgumentValues() { return this.constructorArgumentValues; } @@ -761,7 +745,6 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess /** * Return property values for this bean (never {@code null}). */ - @Override public MutablePropertyValues getPropertyValues() { return this.propertyValues; } @@ -783,22 +766,18 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess } - @Override public void setFactoryBeanName(String factoryBeanName) { this.factoryBeanName = factoryBeanName; } - @Override public String getFactoryBeanName() { return this.factoryBeanName; } - @Override public void setFactoryMethodName(String factoryMethodName) { this.factoryMethodName = factoryMethodName; } - @Override public String getFactoryMethodName() { return this.factoryMethodName; } @@ -895,7 +874,6 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess /** * Return the role hint for this {@code BeanDefinition}. */ - @Override public int getRole() { return this.role; } @@ -908,7 +886,6 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess this.description = description; } - @Override public String getDescription() { return this.description; } @@ -936,7 +913,6 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess this.resource = new DescriptiveResource(resourceDescription); } - @Override public String getResourceDescription() { return (this.resource != null ? this.resource.getDescription() : null); } @@ -948,7 +924,6 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess this.resource = new BeanDefinitionResource(originatingBd); } - @Override public BeanDefinition getOriginatingBeanDefinition() { return (this.resource instanceof BeanDefinitionResource ? ((BeanDefinitionResource) this.resource).getBeanDefinition() : null); diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanDefinitionReader.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanDefinitionReader.java index 3f81a2a2b0..b07e211d16 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanDefinitionReader.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanDefinitionReader.java @@ -102,7 +102,6 @@ public abstract class AbstractBeanDefinitionReader implements EnvironmentCapable return this.registry; } - @Override public final BeanDefinitionRegistry getRegistry() { return this.registry; } @@ -122,7 +121,6 @@ public abstract class AbstractBeanDefinitionReader implements EnvironmentCapable this.resourceLoader = resourceLoader; } - @Override public ResourceLoader getResourceLoader() { return this.resourceLoader; } @@ -138,7 +136,6 @@ public abstract class AbstractBeanDefinitionReader implements EnvironmentCapable this.beanClassLoader = beanClassLoader; } - @Override public ClassLoader getBeanClassLoader() { return this.beanClassLoader; } @@ -152,7 +149,6 @@ public abstract class AbstractBeanDefinitionReader implements EnvironmentCapable this.environment = environment; } - @Override public Environment getEnvironment() { return this.environment; } @@ -166,13 +162,11 @@ public abstract class AbstractBeanDefinitionReader implements EnvironmentCapable this.beanNameGenerator = (beanNameGenerator != null ? beanNameGenerator : new DefaultBeanNameGenerator()); } - @Override public BeanNameGenerator getBeanNameGenerator() { return this.beanNameGenerator; } - @Override public int loadBeanDefinitions(Resource... resources) throws BeanDefinitionStoreException { Assert.notNull(resources, "Resource array must not be null"); int counter = 0; @@ -182,7 +176,6 @@ public abstract class AbstractBeanDefinitionReader implements EnvironmentCapable return counter; } - @Override public int loadBeanDefinitions(String location) throws BeanDefinitionStoreException { return loadBeanDefinitions(location, null); } @@ -243,7 +236,6 @@ public abstract class AbstractBeanDefinitionReader implements EnvironmentCapable } } - @Override public int loadBeanDefinitions(String... locations) throws BeanDefinitionStoreException { Assert.notNull(locations, "Location array must not be null"); int counter = 0; diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanFactory.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanFactory.java index 1d73ee4734..8db728ae57 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanFactory.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanFactory.java @@ -190,17 +190,14 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp // Implementation of BeanFactory interface //--------------------------------------------------------------------- - @Override public Object getBean(String name) throws BeansException { return doGetBean(name, null, null, false); } - @Override public T getBean(String name, Class requiredType) throws BeansException { return doGetBean(name, requiredType, null, false); } - @Override public Object getBean(String name, Object... args) throws BeansException { return doGetBean(name, null, args, false); } @@ -293,7 +290,6 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp // Create bean instance. if (mbd.isSingleton()) { sharedInstance = getSingleton(beanName, new ObjectFactory() { - @Override public Object getObject() throws BeansException { try { return createBean(beanName, mbd, args); @@ -331,7 +327,6 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp } try { Object scopedInstance = scope.get(beanName, new ObjectFactory() { - @Override public Object getObject() throws BeansException { beforePrototypeCreation(beanName); try { @@ -369,7 +364,6 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp return (T) bean; } - @Override public boolean containsBean(String name) { String beanName = transformedBeanName(name); if (containsSingleton(beanName) || containsBeanDefinition(beanName)) { @@ -380,7 +374,6 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp return (parentBeanFactory != null && parentBeanFactory.containsBean(originalBeanName(name))); } - @Override public boolean isSingleton(String name) throws NoSuchBeanDefinitionException { String beanName = transformedBeanName(name); @@ -426,7 +419,6 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp } } - @Override public boolean isPrototype(String name) throws NoSuchBeanDefinitionException { String beanName = transformedBeanName(name); @@ -451,7 +443,6 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp final FactoryBean factoryBean = (FactoryBean) getBean(FACTORY_BEAN_PREFIX + beanName); if (System.getSecurityManager() != null) { return AccessController.doPrivileged(new PrivilegedAction() { - @Override public Boolean run() { return ((factoryBean instanceof SmartFactoryBean && ((SmartFactoryBean) factoryBean).isPrototype()) || !factoryBean.isSingleton()); @@ -469,7 +460,6 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp } } - @Override public boolean isTypeMatch(String name, Class targetType) throws NoSuchBeanDefinitionException { String beanName = transformedBeanName(name); Class typeToMatch = (targetType != null ? targetType : Object.class); @@ -541,7 +531,6 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp } } - @Override public Class getType(String name) throws NoSuchBeanDefinitionException { String beanName = transformedBeanName(name); @@ -632,12 +621,10 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp // Implementation of HierarchicalBeanFactory interface //--------------------------------------------------------------------- - @Override public BeanFactory getParentBeanFactory() { return this.parentBeanFactory; } - @Override public boolean containsLocalBean(String name) { String beanName = transformedBeanName(name); return ((containsSingleton(beanName) || containsBeanDefinition(beanName)) && @@ -649,7 +636,6 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp // Implementation of ConfigurableBeanFactory interface //--------------------------------------------------------------------- - @Override public void setParentBeanFactory(BeanFactory parentBeanFactory) { if (this.parentBeanFactory != null && this.parentBeanFactory != parentBeanFactory) { throw new IllegalStateException("Already associated with parent BeanFactory: " + this.parentBeanFactory); @@ -657,57 +643,46 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp this.parentBeanFactory = parentBeanFactory; } - @Override public void setBeanClassLoader(ClassLoader beanClassLoader) { this.beanClassLoader = (beanClassLoader != null ? beanClassLoader : ClassUtils.getDefaultClassLoader()); } - @Override public ClassLoader getBeanClassLoader() { return this.beanClassLoader; } - @Override public void setTempClassLoader(ClassLoader tempClassLoader) { this.tempClassLoader = tempClassLoader; } - @Override public ClassLoader getTempClassLoader() { return this.tempClassLoader; } - @Override public void setCacheBeanMetadata(boolean cacheBeanMetadata) { this.cacheBeanMetadata = cacheBeanMetadata; } - @Override public boolean isCacheBeanMetadata() { return this.cacheBeanMetadata; } - @Override public void setBeanExpressionResolver(BeanExpressionResolver resolver) { this.beanExpressionResolver = resolver; } - @Override public BeanExpressionResolver getBeanExpressionResolver() { return this.beanExpressionResolver; } - @Override public void setConversionService(ConversionService conversionService) { this.conversionService = conversionService; } - @Override public ConversionService getConversionService() { return this.conversionService; } - @Override public void addPropertyEditorRegistrar(PropertyEditorRegistrar registrar) { Assert.notNull(registrar, "PropertyEditorRegistrar must not be null"); this.propertyEditorRegistrars.add(registrar); @@ -720,14 +695,12 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp return this.propertyEditorRegistrars; } - @Override public void registerCustomEditor(Class requiredType, Class propertyEditorClass) { Assert.notNull(requiredType, "Required type must not be null"); Assert.isAssignable(PropertyEditor.class, propertyEditorClass); this.customEditors.put(requiredType, propertyEditorClass); } - @Override public void copyRegisteredEditorsTo(PropertyEditorRegistry registry) { registerCustomEditors(registry); } @@ -739,7 +712,6 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp return this.customEditors; } - @Override public void setTypeConverter(TypeConverter typeConverter) { this.typeConverter = typeConverter; } @@ -752,7 +724,6 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp return this.typeConverter; } - @Override public TypeConverter getTypeConverter() { TypeConverter customConverter = getCustomTypeConverter(); if (customConverter != null) { @@ -767,13 +738,11 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp } } - @Override public void addEmbeddedValueResolver(StringValueResolver valueResolver) { Assert.notNull(valueResolver, "StringValueResolver must not be null"); this.embeddedValueResolvers.add(valueResolver); } - @Override public String resolveEmbeddedValue(String value) { String result = value; for (StringValueResolver resolver : this.embeddedValueResolvers) { @@ -782,7 +751,6 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp return result; } - @Override public void addBeanPostProcessor(BeanPostProcessor beanPostProcessor) { Assert.notNull(beanPostProcessor, "BeanPostProcessor must not be null"); this.beanPostProcessors.remove(beanPostProcessor); @@ -795,7 +763,6 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp } } - @Override public int getBeanPostProcessorCount() { return this.beanPostProcessors.size(); } @@ -828,7 +795,6 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp return this.hasDestructionAwareBeanPostProcessors; } - @Override public void registerScope(String scopeName, Scope scope) { Assert.notNull(scopeName, "Scope identifier must not be null"); Assert.notNull(scope, "Scope must not be null"); @@ -838,12 +804,10 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp this.scopes.put(scopeName, scope); } - @Override public String[] getRegisteredScopeNames() { return StringUtils.toStringArray(this.scopes.keySet()); } - @Override public Scope getRegisteredScope(String scopeName) { Assert.notNull(scopeName, "Scope identifier must not be null"); return this.scopes.get(scopeName); @@ -869,7 +833,6 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp AccessController.getContext()); } - @Override public void copyConfigurationFrom(ConfigurableBeanFactory otherFactory) { Assert.notNull(otherFactory, "BeanFactory must not be null"); setBeanClassLoader(otherFactory.getBeanClassLoader()); @@ -903,7 +866,6 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp * @throws NoSuchBeanDefinitionException if there is no bean with the given name * @throws BeanDefinitionStoreException in case of an invalid bean definition */ - @Override public BeanDefinition getMergedBeanDefinition(String name) throws BeansException { String beanName = transformedBeanName(name); @@ -915,7 +877,6 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp return getMergedLocalBeanDefinition(beanName); } - @Override public boolean isFactoryBean(String name) throws NoSuchBeanDefinitionException { String beanName = transformedBeanName(name); @@ -998,7 +959,6 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp } } - @Override public void destroyBean(String beanName, Object beanInstance) { destroyBean(beanName, beanInstance, getMergedLocalBeanDefinition(beanName)); } @@ -1014,7 +974,6 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp new DisposableBeanAdapter(beanInstance, beanName, mbd, getBeanPostProcessors(), getAccessControlContext()).destroy(); } - @Override public void destroyScopedBean(String beanName) { RootBeanDefinition mbd = getMergedLocalBeanDefinition(beanName); if (mbd.isSingleton() || mbd.isPrototype()) { @@ -1287,7 +1246,6 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp } if (System.getSecurityManager() != null) { return AccessController.doPrivileged(new PrivilegedExceptionAction>() { - @Override public Class run() throws Exception { return doResolveBeanClass(mbd, typesToMatch); } diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/AutowireUtils.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/AutowireUtils.java index 140e11569c..f8ffd5798b 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/AutowireUtils.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/AutowireUtils.java @@ -51,7 +51,6 @@ abstract class AutowireUtils { */ public static void sortConstructors(Constructor[] constructors) { Arrays.sort(constructors, new Comparator() { - @Override public int compare(Constructor c1, Constructor c2) { boolean p1 = Modifier.isPublic(c1.getModifiers()); boolean p2 = Modifier.isPublic(c2.getModifiers()); @@ -74,7 +73,6 @@ abstract class AutowireUtils { */ public static void sortFactoryMethods(Method[] factoryMethods) { Arrays.sort(factoryMethods, new Comparator() { - @Override public int compare(Method fm1, Method fm2) { boolean p1 = Modifier.isPublic(fm1.getModifiers()); boolean p2 = Modifier.isPublic(fm2.getModifiers()); @@ -164,7 +162,6 @@ abstract class AutowireUtils { this.objectFactory = objectFactory; } - @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { String methodName = method.getName(); if (methodName.equals("equals")) { diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/BeanDefinitionResource.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/BeanDefinitionResource.java index 7de75a1be6..330b699096 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/BeanDefinitionResource.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/BeanDefinitionResource.java @@ -64,13 +64,11 @@ class BeanDefinitionResource extends AbstractResource { return false; } - @Override public InputStream getInputStream() throws IOException { throw new FileNotFoundException( "Resource cannot be opened because it points to " + getDescription()); } - @Override public String getDescription() { return "BeanDefinition defined in " + this.beanDefinition.getResourceDescription(); } diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/CglibSubclassingInstantiationStrategy.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/CglibSubclassingInstantiationStrategy.java index 8c802f09d2..dc601c3bd4 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/CglibSubclassingInstantiationStrategy.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/CglibSubclassingInstantiationStrategy.java @@ -153,7 +153,6 @@ public class CglibSubclassingInstantiationStrategy extends SimpleInstantiationSt */ private class LookupOverrideMethodInterceptor extends CglibIdentitySupport implements MethodInterceptor { - @Override public Object intercept(Object obj, Method method, Object[] args, MethodProxy mp) throws Throwable { // Cast is safe, as CallbackFilter filters are used selectively. LookupOverride lo = (LookupOverride) beanDefinition.getMethodOverrides().getOverride(method); @@ -168,7 +167,6 @@ public class CglibSubclassingInstantiationStrategy extends SimpleInstantiationSt */ private class ReplaceOverrideMethodInterceptor extends CglibIdentitySupport implements MethodInterceptor { - @Override public Object intercept(Object obj, Method method, Object[] args, MethodProxy mp) throws Throwable { ReplaceOverride ro = (ReplaceOverride) beanDefinition.getMethodOverrides().getOverride(method); // TODO could cache if a singleton for minor performance optimization @@ -183,7 +181,6 @@ public class CglibSubclassingInstantiationStrategy extends SimpleInstantiationSt */ private class CallbackFilterImpl extends CglibIdentitySupport implements CallbackFilter { - @Override public int accept(Method method) { MethodOverride methodOverride = beanDefinition.getMethodOverrides().getOverride(method); if (logger.isTraceEnabled()) { diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/ChildBeanDefinition.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/ChildBeanDefinition.java index cbc43acfbe..b03ca67dcd 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/ChildBeanDefinition.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/ChildBeanDefinition.java @@ -132,12 +132,10 @@ public class ChildBeanDefinition extends AbstractBeanDefinition { } - @Override public void setParentName(String parentName) { this.parentName = parentName; } - @Override public String getParentName() { return this.parentName; } diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/ConstructorResolver.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/ConstructorResolver.java index 994c0d6e95..161eae7e99 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/ConstructorResolver.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/ConstructorResolver.java @@ -270,7 +270,6 @@ class ConstructorResolver { final Constructor ctorToUse = constructorToUse; final Object[] argumentsToUse = argsToUse; beanInstance = AccessController.doPrivileged(new PrivilegedAction() { - @Override public Object run() { return beanFactory.getInstantiationStrategy().instantiate( mbd, beanName, beanFactory, ctorToUse, argumentsToUse); @@ -403,7 +402,6 @@ class ConstructorResolver { final Class factoryClazz = factoryClass; if (System.getSecurityManager() != null) { rawCandidates = AccessController.doPrivileged(new PrivilegedAction() { - @Override public Method[] run() { return (mbd.isNonPublicAccessAllowed() ? ReflectionUtils.getAllDeclaredMethods(factoryClazz) : factoryClazz.getMethods()); @@ -562,7 +560,6 @@ class ConstructorResolver { final Method factoryMethod = factoryMethodToUse; final Object[] args = argsToUse; beanInstance = AccessController.doPrivileged(new PrivilegedAction() { - @Override public Object run() { return beanFactory.getInstantiationStrategy().instantiate( mbd, beanName, beanFactory, fb, factoryMethod, args); diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/DefaultBeanNameGenerator.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/DefaultBeanNameGenerator.java index ebd7a7022d..d2ed06dd66 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/DefaultBeanNameGenerator.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/DefaultBeanNameGenerator.java @@ -27,7 +27,6 @@ import org.springframework.beans.factory.config.BeanDefinition; */ public class DefaultBeanNameGenerator implements BeanNameGenerator { - @Override public String generateBeanName(BeanDefinition definition, BeanDefinitionRegistry registry) { return BeanDefinitionReaderUtils.generateBeanName(definition, registry); } diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/DefaultListableBeanFactory.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/DefaultListableBeanFactory.java index cb2e9fe4df..824caaaec5 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/DefaultListableBeanFactory.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/DefaultListableBeanFactory.java @@ -215,7 +215,6 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto if (System.getSecurityManager() != null) { final BeanFactory target = this; AccessController.doPrivileged(new PrivilegedAction() { - @Override public Object run() { ((BeanFactoryAware) autowireCandidateResolver).setBeanFactory(target); return null; @@ -254,7 +253,6 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto // Implementation of ListableBeanFactory interface //--------------------------------------------------------------------- - @Override public T getBean(Class requiredType) throws BeansException { Assert.notNull(requiredType, "Required type must not be null"); String[] beanNames = getBeanNamesForType(requiredType); @@ -287,12 +285,10 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto return this.beanDefinitionMap.containsKey(beanName); } - @Override public int getBeanDefinitionCount() { return this.beanDefinitionMap.size(); } - @Override public String[] getBeanDefinitionNames() { synchronized (this.beanDefinitionMap) { if (this.frozenBeanDefinitionNames != null) { @@ -304,12 +300,10 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto } } - @Override public String[] getBeanNamesForType(Class type) { return getBeanNamesForType(type, true, true); } - @Override public String[] getBeanNamesForType(Class type, boolean includeNonSingletons, boolean allowEagerInit) { if (!isConfigurationFrozen() || type == null || !allowEagerInit) { return doGetBeanNamesForType(type, includeNonSingletons, allowEagerInit); @@ -413,12 +407,10 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto return (factoryBeanName != null && isFactoryBean(factoryBeanName) && !containsSingleton(factoryBeanName)); } - @Override public Map getBeansOfType(Class type) throws BeansException { return getBeansOfType(type, true, true); } - @Override public Map getBeansOfType(Class type, boolean includeNonSingletons, boolean allowEagerInit) throws BeansException { @@ -449,7 +441,6 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto return result; } - @Override public Map getBeansWithAnnotation(Class annotationType) { Set beanNames = new LinkedHashSet(getBeanDefinitionCount()); beanNames.addAll(Arrays.asList(getBeanDefinitionNames())); @@ -469,7 +460,6 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto * found on the given class itself, as well as checking its raw bean class * if not found on the exposed bean reference (e.g. in case of a proxy). */ - @Override public A findAnnotationOnBean(String beanName, Class annotationType) { A ann = null; Class beanType = getType(beanName); @@ -493,7 +483,6 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto // Implementation of ConfigurableListableBeanFactory interface //--------------------------------------------------------------------- - @Override public void registerResolvableDependency(Class dependencyType, Object autowiredValue) { Assert.notNull(dependencyType, "Type must not be null"); if (autowiredValue != null) { @@ -503,7 +492,6 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto } } - @Override public boolean isAutowireCandidate(String beanName, DependencyDescriptor descriptor) throws NoSuchBeanDefinitionException { @@ -564,7 +552,6 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto return bd; } - @Override public void freezeConfiguration() { this.configurationFrozen = true; synchronized (this.beanDefinitionMap) { @@ -572,7 +559,6 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto } } - @Override public boolean isConfigurationFrozen() { return this.configurationFrozen; } @@ -587,7 +573,6 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto return (this.configurationFrozen || super.isBeanEligibleForMetadataCaching(beanName)); } - @Override public void preInstantiateSingletons() throws BeansException { if (this.logger.isInfoEnabled()) { this.logger.info("Pre-instantiating singletons in " + this); @@ -606,7 +591,6 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto boolean isEagerInit; if (System.getSecurityManager() != null && factory instanceof SmartFactoryBean) { isEagerInit = AccessController.doPrivileged(new PrivilegedAction() { - @Override public Boolean run() { return ((SmartFactoryBean) factory).isEagerInit(); } @@ -632,7 +616,6 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto // Implementation of BeanDefinitionRegistry interface //--------------------------------------------------------------------- - @Override public void registerBeanDefinition(String beanName, BeanDefinition beanDefinition) throws BeanDefinitionStoreException { @@ -674,7 +657,6 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto resetBeanDefinition(beanName); } - @Override public void removeBeanDefinition(String beanName) throws NoSuchBeanDefinitionException { Assert.hasText(beanName, "'beanName' must not be empty"); @@ -735,7 +717,6 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto // Dependency resolution functionality //--------------------------------------------------------------------- - @Override public Object resolveDependency(DependencyDescriptor descriptor, String beanName, Set autowiredBeanNames, TypeConverter typeConverter) throws BeansException { @@ -1051,7 +1032,6 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto this.beanName = beanName; } - @Override public Object getObject() throws BeansException { return doResolveDependency(this.descriptor, this.descriptor.getDependencyType(), this.beanName, null, null); } @@ -1067,7 +1047,6 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto super(descriptor, beanName); } - @Override public Object get() throws BeansException { return getObject(); } diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/DefaultSingletonBeanRegistry.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/DefaultSingletonBeanRegistry.java index a087466cb4..cbf7c872ff 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/DefaultSingletonBeanRegistry.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/DefaultSingletonBeanRegistry.java @@ -117,7 +117,6 @@ public class DefaultSingletonBeanRegistry extends SimpleAliasRegistry implements private final Map> dependenciesForBeanMap = new ConcurrentHashMap>(64); - @Override public void registerSingleton(String beanName, Object singletonObject) throws IllegalStateException { Assert.notNull(beanName, "'beanName' must not be null"); synchronized (this.singletonObjects) { @@ -164,7 +163,6 @@ public class DefaultSingletonBeanRegistry extends SimpleAliasRegistry implements } } - @Override public Object getSingleton(String beanName) { return getSingleton(beanName, true); } @@ -272,19 +270,16 @@ public class DefaultSingletonBeanRegistry extends SimpleAliasRegistry implements } } - @Override public boolean containsSingleton(String beanName) { return (this.singletonObjects.containsKey(beanName)); } - @Override public String[] getSingletonNames() { synchronized (this.singletonObjects) { return StringUtils.toStringArray(this.registeredSingletons); } } - @Override public int getSingletonCount() { synchronized (this.singletonObjects) { return this.registeredSingletons.size(); diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/DisposableBeanAdapter.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/DisposableBeanAdapter.java index e5186e4334..990438597f 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/DisposableBeanAdapter.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/DisposableBeanAdapter.java @@ -203,12 +203,10 @@ class DisposableBeanAdapter implements DisposableBean, Runnable, Serializable { } - @Override public void run() { destroy(); } - @Override public void destroy() { if (this.beanPostProcessors != null && !this.beanPostProcessors.isEmpty()) { for (DestructionAwareBeanPostProcessor processor : this.beanPostProcessors) { @@ -223,7 +221,6 @@ class DisposableBeanAdapter implements DisposableBean, Runnable, Serializable { try { if (System.getSecurityManager() != null) { AccessController.doPrivileged(new PrivilegedExceptionAction() { - @Override public Object run() throws Exception { ((DisposableBean) bean).destroy(); return null; @@ -261,7 +258,6 @@ class DisposableBeanAdapter implements DisposableBean, Runnable, Serializable { try { if (System.getSecurityManager() != null) { return AccessController.doPrivileged(new PrivilegedAction() { - @Override public Method run() { return findDestroyMethod(); } @@ -302,7 +298,6 @@ class DisposableBeanAdapter implements DisposableBean, Runnable, Serializable { try { if (System.getSecurityManager() != null) { AccessController.doPrivileged(new PrivilegedAction() { - @Override public Object run() { ReflectionUtils.makeAccessible(destroyMethod); return null; @@ -310,7 +305,6 @@ class DisposableBeanAdapter implements DisposableBean, Runnable, Serializable { }); try { AccessController.doPrivileged(new PrivilegedExceptionAction() { - @Override public Object run() throws Exception { destroyMethod.invoke(bean, args); return null; diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/FactoryBeanRegistrySupport.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/FactoryBeanRegistrySupport.java index 286765a80d..71a22243f7 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/FactoryBeanRegistrySupport.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/FactoryBeanRegistrySupport.java @@ -56,7 +56,6 @@ public abstract class FactoryBeanRegistrySupport extends DefaultSingletonBeanReg try { if (System.getSecurityManager() != null) { return AccessController.doPrivileged(new PrivilegedAction() { - @Override public Class run() { return factoryBean.getObjectType(); } @@ -130,7 +129,6 @@ public abstract class FactoryBeanRegistrySupport extends DefaultSingletonBeanReg AccessControlContext acc = getAccessControlContext(); try { object = AccessController.doPrivileged(new PrivilegedExceptionAction() { - @Override public Object run() throws Exception { return factory.getObject(); } diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/GenericBeanDefinition.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/GenericBeanDefinition.java index 5953236d6c..82fddd2106 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/GenericBeanDefinition.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/GenericBeanDefinition.java @@ -66,12 +66,10 @@ public class GenericBeanDefinition extends AbstractBeanDefinition { } - @Override public void setParentName(String parentName) { this.parentName = parentName; } - @Override public String getParentName() { return this.parentName; } diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/ManagedList.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/ManagedList.java index d01b649bca..5c9aa55011 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/ManagedList.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/ManagedList.java @@ -57,7 +57,6 @@ public class ManagedList extends ArrayList implements Mergeable, BeanMetad this.source = source; } - @Override public Object getSource() { return this.source; } @@ -84,12 +83,10 @@ public class ManagedList extends ArrayList implements Mergeable, BeanMetad this.mergeEnabled = mergeEnabled; } - @Override public boolean isMergeEnabled() { return this.mergeEnabled; } - @Override @SuppressWarnings("unchecked") public List merge(Object parent) { if (!this.mergeEnabled) { diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/ManagedMap.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/ManagedMap.java index 4646766596..4529b71441 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/ManagedMap.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/ManagedMap.java @@ -58,7 +58,6 @@ public class ManagedMap extends LinkedHashMap implements Mergeable, this.source = source; } - @Override public Object getSource() { return this.source; } @@ -99,12 +98,10 @@ public class ManagedMap extends LinkedHashMap implements Mergeable, this.mergeEnabled = mergeEnabled; } - @Override public boolean isMergeEnabled() { return this.mergeEnabled; } - @Override @SuppressWarnings("unchecked") public Object merge(Object parent) { if (!this.mergeEnabled) { diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/ManagedProperties.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/ManagedProperties.java index dadaac3e0c..95b444721b 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/ManagedProperties.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/ManagedProperties.java @@ -45,7 +45,6 @@ public class ManagedProperties extends Properties implements Mergeable, BeanMeta this.source = source; } - @Override public Object getSource() { return this.source; } @@ -58,13 +57,11 @@ public class ManagedProperties extends Properties implements Mergeable, BeanMeta this.mergeEnabled = mergeEnabled; } - @Override public boolean isMergeEnabled() { return this.mergeEnabled; } - @Override public Object merge(Object parent) { if (!this.mergeEnabled) { throw new IllegalStateException("Not allowed to merge when the 'mergeEnabled' property is set to 'false'"); diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/ManagedSet.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/ManagedSet.java index 570963c17a..654cadc9fc 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/ManagedSet.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/ManagedSet.java @@ -56,7 +56,6 @@ public class ManagedSet extends LinkedHashSet implements Mergeable, BeanMe this.source = source; } - @Override public Object getSource() { return this.source; } @@ -83,12 +82,10 @@ public class ManagedSet extends LinkedHashSet implements Mergeable, BeanMe this.mergeEnabled = mergeEnabled; } - @Override public boolean isMergeEnabled() { return this.mergeEnabled; } - @Override @SuppressWarnings("unchecked") public Set merge(Object parent) { if (!this.mergeEnabled) { diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/MethodOverride.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/MethodOverride.java index 96f41279f2..ecc984a7ce 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/MethodOverride.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/MethodOverride.java @@ -83,7 +83,6 @@ public abstract class MethodOverride implements BeanMetadataElement { this.source = source; } - @Override public Object getSource() { return this.source; } diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/PropertiesBeanDefinitionReader.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/PropertiesBeanDefinitionReader.java index 51e4209de4..7b7822f0df 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/PropertiesBeanDefinitionReader.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/PropertiesBeanDefinitionReader.java @@ -204,7 +204,6 @@ public class PropertiesBeanDefinitionReader extends AbstractBeanDefinitionReader * @throws BeanDefinitionStoreException in case of loading or parsing errors * @see #loadBeanDefinitions(org.springframework.core.io.Resource, String) */ - @Override public int loadBeanDefinitions(Resource resource) throws BeanDefinitionStoreException { return loadBeanDefinitions(new EncodedResource(resource), null); } diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/RootBeanDefinition.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/RootBeanDefinition.java index d400b01cac..7eaba17a54 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/RootBeanDefinition.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/RootBeanDefinition.java @@ -241,12 +241,10 @@ public class RootBeanDefinition extends AbstractBeanDefinition { } - @Override public String getParentName() { return null; } - @Override public void setParentName(String parentName) { if (parentName != null) { throw new IllegalArgumentException("Root bean cannot be changed into a child bean with parent reference"); diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/SimpleAutowireCandidateResolver.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/SimpleAutowireCandidateResolver.java index 3570305d9d..4a7a1604e1 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/SimpleAutowireCandidateResolver.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/SimpleAutowireCandidateResolver.java @@ -37,12 +37,10 @@ public class SimpleAutowireCandidateResolver implements AutowireCandidateResolve *

To be considered a candidate the bean's autowire-candidate * attribute must not have been set to 'false'. */ - @Override public boolean isAutowireCandidate(BeanDefinitionHolder bdHolder, DependencyDescriptor descriptor) { return bdHolder.getBeanDefinition().isAutowireCandidate(); } - @Override public Object getSuggestedValue(DependencyDescriptor descriptor) { return null; } diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/SimpleBeanDefinitionRegistry.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/SimpleBeanDefinitionRegistry.java index b792c6cda8..8a42fc233e 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/SimpleBeanDefinitionRegistry.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/SimpleBeanDefinitionRegistry.java @@ -40,7 +40,6 @@ public class SimpleBeanDefinitionRegistry extends SimpleAliasRegistry implements private final Map beanDefinitionMap = new ConcurrentHashMap(64); - @Override public void registerBeanDefinition(String beanName, BeanDefinition beanDefinition) throws BeanDefinitionStoreException { @@ -49,14 +48,12 @@ public class SimpleBeanDefinitionRegistry extends SimpleAliasRegistry implements this.beanDefinitionMap.put(beanName, beanDefinition); } - @Override public void removeBeanDefinition(String beanName) throws NoSuchBeanDefinitionException { if (this.beanDefinitionMap.remove(beanName) == null) { throw new NoSuchBeanDefinitionException(beanName); } } - @Override public BeanDefinition getBeanDefinition(String beanName) throws NoSuchBeanDefinitionException { BeanDefinition bd = this.beanDefinitionMap.get(beanName); if (bd == null) { @@ -65,22 +62,18 @@ public class SimpleBeanDefinitionRegistry extends SimpleAliasRegistry implements return bd; } - @Override public boolean containsBeanDefinition(String beanName) { return this.beanDefinitionMap.containsKey(beanName); } - @Override public String[] getBeanDefinitionNames() { return StringUtils.toStringArray(this.beanDefinitionMap.keySet()); } - @Override public int getBeanDefinitionCount() { return this.beanDefinitionMap.size(); } - @Override public boolean isBeanNameInUse(String beanName) { return isAlias(beanName) || containsBeanDefinition(beanName); } diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/SimpleInstantiationStrategy.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/SimpleInstantiationStrategy.java index 4dd5a1a1ca..b06904221f 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/SimpleInstantiationStrategy.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/SimpleInstantiationStrategy.java @@ -55,7 +55,6 @@ public class SimpleInstantiationStrategy implements InstantiationStrategy { } - @Override public Object instantiate(RootBeanDefinition beanDefinition, String beanName, BeanFactory owner) { // Don't override the class with CGLIB if no overrides. if (beanDefinition.getMethodOverrides().isEmpty()) { @@ -70,7 +69,6 @@ public class SimpleInstantiationStrategy implements InstantiationStrategy { try { if (System.getSecurityManager() != null) { constructorToUse = AccessController.doPrivileged(new PrivilegedExceptionAction() { - @Override public Constructor run() throws Exception { return clazz.getDeclaredConstructor((Class[]) null); } @@ -107,7 +105,6 @@ public class SimpleInstantiationStrategy implements InstantiationStrategy { "Method Injection not supported in SimpleInstantiationStrategy"); } - @Override public Object instantiate(RootBeanDefinition beanDefinition, String beanName, BeanFactory owner, final Constructor ctor, Object[] args) { @@ -115,7 +112,6 @@ public class SimpleInstantiationStrategy implements InstantiationStrategy { if (System.getSecurityManager() != null) { // use own privileged to change accessibility (when security is on) AccessController.doPrivileged(new PrivilegedAction() { - @Override public Object run() { ReflectionUtils.makeAccessible(ctor); return null; @@ -142,14 +138,12 @@ public class SimpleInstantiationStrategy implements InstantiationStrategy { "Method Injection not supported in SimpleInstantiationStrategy"); } - @Override public Object instantiate(RootBeanDefinition beanDefinition, String beanName, BeanFactory owner, Object factoryBean, final Method factoryMethod, Object[] args) { try { if (System.getSecurityManager() != null) { AccessController.doPrivileged(new PrivilegedAction() { - @Override public Object run() { ReflectionUtils.makeAccessible(factoryMethod); return null; diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/SimpleSecurityContextProvider.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/SimpleSecurityContextProvider.java index 15aed4c50d..edb954ae7f 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/SimpleSecurityContextProvider.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/SimpleSecurityContextProvider.java @@ -51,7 +51,6 @@ public class SimpleSecurityContextProvider implements SecurityContextProvider { } - @Override public AccessControlContext getAccessControlContext() { return (this.acc != null ? acc : AccessController.getContext()); } diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/StaticListableBeanFactory.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/StaticListableBeanFactory.java index dc84919149..80a6b34519 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/StaticListableBeanFactory.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/StaticListableBeanFactory.java @@ -75,7 +75,6 @@ public class StaticListableBeanFactory implements ListableBeanFactory { // Implementation of BeanFactory interface //--------------------------------------------------------------------- - @Override public Object getBean(String name) throws BeansException { String beanName = BeanFactoryUtils.transformedBeanName(name); Object bean = this.beans.get(beanName); @@ -104,7 +103,6 @@ public class StaticListableBeanFactory implements ListableBeanFactory { } } - @Override @SuppressWarnings("unchecked") public T getBean(String name, Class requiredType) throws BeansException { Object bean = getBean(name); @@ -114,7 +112,6 @@ public class StaticListableBeanFactory implements ListableBeanFactory { return (T) bean; } - @Override public T getBean(Class requiredType) throws BeansException { String[] beanNames = getBeanNamesForType(requiredType); if (beanNames.length == 1) { @@ -125,7 +122,6 @@ public class StaticListableBeanFactory implements ListableBeanFactory { } } - @Override public Object getBean(String name, Object... args) throws BeansException { if (args != null) { throw new UnsupportedOperationException( @@ -134,19 +130,16 @@ public class StaticListableBeanFactory implements ListableBeanFactory { return getBean(name); } - @Override public boolean containsBean(String name) { return this.beans.containsKey(name); } - @Override public boolean isSingleton(String name) throws NoSuchBeanDefinitionException { Object bean = getBean(name); // In case of FactoryBean, return singleton status of created object. return (bean instanceof FactoryBean && ((FactoryBean) bean).isSingleton()); } - @Override public boolean isPrototype(String name) throws NoSuchBeanDefinitionException { Object bean = getBean(name); // In case of FactoryBean, return prototype status of created object. @@ -154,13 +147,11 @@ public class StaticListableBeanFactory implements ListableBeanFactory { (bean instanceof FactoryBean && !((FactoryBean) bean).isSingleton())); } - @Override public boolean isTypeMatch(String name, Class targetType) throws NoSuchBeanDefinitionException { Class type = getType(name); return (targetType == null || (type != null && targetType.isAssignableFrom(type))); } - @Override public Class getType(String name) throws NoSuchBeanDefinitionException { String beanName = BeanFactoryUtils.transformedBeanName(name); @@ -177,7 +168,6 @@ public class StaticListableBeanFactory implements ListableBeanFactory { return bean.getClass(); } - @Override public String[] getAliases(String name) { return new String[0]; } @@ -187,27 +177,22 @@ public class StaticListableBeanFactory implements ListableBeanFactory { // Implementation of ListableBeanFactory interface //--------------------------------------------------------------------- - @Override public boolean containsBeanDefinition(String name) { return this.beans.containsKey(name); } - @Override public int getBeanDefinitionCount() { return this.beans.size(); } - @Override public String[] getBeanDefinitionNames() { return StringUtils.toStringArray(this.beans.keySet()); } - @Override public String[] getBeanNamesForType(Class type) { return getBeanNamesForType(type, true, true); } - @Override public String[] getBeanNamesForType(Class type, boolean includeNonSingletons, boolean includeFactoryBeans) { boolean isFactoryType = (type != null && FactoryBean.class.isAssignableFrom(type)); List matches = new ArrayList(); @@ -230,12 +215,10 @@ public class StaticListableBeanFactory implements ListableBeanFactory { return StringUtils.toStringArray(matches); } - @Override public Map getBeansOfType(Class type) throws BeansException { return getBeansOfType(type, true, true); } - @Override @SuppressWarnings("unchecked") public Map getBeansOfType(Class type, boolean includeNonSingletons, boolean includeFactoryBeans) throws BeansException { @@ -272,7 +255,6 @@ public class StaticListableBeanFactory implements ListableBeanFactory { return matches; } - @Override public Map getBeansWithAnnotation(Class annotationType) throws BeansException { @@ -285,7 +267,6 @@ public class StaticListableBeanFactory implements ListableBeanFactory { return results; } - @Override public A findAnnotationOnBean(String beanName, Class annotationType) { return AnnotationUtils.findAnnotation(getType(beanName), annotationType); } diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/wiring/BeanConfigurerSupport.java b/spring-beans/src/main/java/org/springframework/beans/factory/wiring/BeanConfigurerSupport.java index 3be2b8b2fb..e46145f296 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/wiring/BeanConfigurerSupport.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/wiring/BeanConfigurerSupport.java @@ -72,7 +72,6 @@ public class BeanConfigurerSupport implements BeanFactoryAware, InitializingBean /** * Set the {@link BeanFactory} in which this aspect must configure beans. */ - @Override public void setBeanFactory(BeanFactory beanFactory) { if (!(beanFactory instanceof ConfigurableListableBeanFactory)) { throw new IllegalArgumentException( @@ -97,7 +96,6 @@ public class BeanConfigurerSupport implements BeanFactoryAware, InitializingBean /** * Check that a {@link BeanFactory} has been set. */ - @Override public void afterPropertiesSet() { Assert.notNull(this.beanFactory, "BeanFactory must be set"); } @@ -106,7 +104,6 @@ public class BeanConfigurerSupport implements BeanFactoryAware, InitializingBean * Release references to the {@link BeanFactory} and * {@link BeanWiringInfoResolver} when the container is destroyed. */ - @Override public void destroy() { this.beanFactory = null; this.beanWiringInfoResolver = null; diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/wiring/ClassNameBeanWiringInfoResolver.java b/spring-beans/src/main/java/org/springframework/beans/factory/wiring/ClassNameBeanWiringInfoResolver.java index b458dfe84a..3ddfbe5a0c 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/wiring/ClassNameBeanWiringInfoResolver.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/wiring/ClassNameBeanWiringInfoResolver.java @@ -31,7 +31,6 @@ import org.springframework.util.ClassUtils; */ public class ClassNameBeanWiringInfoResolver implements BeanWiringInfoResolver { - @Override public BeanWiringInfo resolveWiringInfo(Object beanInstance) { Assert.notNull(beanInstance, "Bean instance must not be null"); return new BeanWiringInfo(ClassUtils.getUserClass(beanInstance).getName(), true); diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/xml/AbstractBeanDefinitionParser.java b/spring-beans/src/main/java/org/springframework/beans/factory/xml/AbstractBeanDefinitionParser.java index 38dba2c10e..91c94990cc 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/xml/AbstractBeanDefinitionParser.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/xml/AbstractBeanDefinitionParser.java @@ -55,7 +55,6 @@ public abstract class AbstractBeanDefinitionParser implements BeanDefinitionPars /** Constant for the name attribute */ public static final String NAME_ATTRIBUTE = "name"; - @Override public final BeanDefinition parse(Element element, ParserContext parserContext) { AbstractBeanDefinition definition = parseInternal(element, parserContext); if (definition != null && !parserContext.isNested()) { diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/xml/BeansDtdResolver.java b/spring-beans/src/main/java/org/springframework/beans/factory/xml/BeansDtdResolver.java index 6f3386cb86..d7fcfc9e4d 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/xml/BeansDtdResolver.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/xml/BeansDtdResolver.java @@ -50,7 +50,6 @@ public class BeansDtdResolver implements EntityResolver { private static final Log logger = LogFactory.getLog(BeansDtdResolver.class); - @Override public InputSource resolveEntity(String publicId, String systemId) throws IOException { if (logger.isTraceEnabled()) { logger.trace("Trying to resolve XML entity with public ID [" + publicId + diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/xml/DefaultBeanDefinitionDocumentReader.java b/spring-beans/src/main/java/org/springframework/beans/factory/xml/DefaultBeanDefinitionDocumentReader.java index 81497416aa..9900aa1651 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/xml/DefaultBeanDefinitionDocumentReader.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/xml/DefaultBeanDefinitionDocumentReader.java @@ -91,7 +91,6 @@ public class DefaultBeanDefinitionDocumentReader implements BeanDefinitionDocume * {@code } element with a {@code profile} attribute present. * @see #doRegisterBeanDefinitions */ - @Override public void setEnvironment(Environment environment) { this.environment = environment; } @@ -103,7 +102,6 @@ public class DefaultBeanDefinitionDocumentReader implements BeanDefinitionDocume *

Opens a DOM Document; then initializes the default settings * specified at the {@code } level; then parses the contained bean definitions. */ - @Override public void registerBeanDefinitions(Document doc, XmlReaderContext readerContext) { this.readerContext = readerContext; diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/xml/DefaultDocumentLoader.java b/spring-beans/src/main/java/org/springframework/beans/factory/xml/DefaultDocumentLoader.java index f86765cb62..f800eba8b1 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/xml/DefaultDocumentLoader.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/xml/DefaultDocumentLoader.java @@ -64,7 +64,6 @@ public class DefaultDocumentLoader implements DocumentLoader { * Load the {@link Document} at the supplied {@link InputSource} using the standard JAXP-configured * XML parser. */ - @Override public Document loadDocument(InputSource inputSource, EntityResolver entityResolver, ErrorHandler errorHandler, int validationMode, boolean namespaceAware) throws Exception { diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/xml/DefaultNamespaceHandlerResolver.java b/spring-beans/src/main/java/org/springframework/beans/factory/xml/DefaultNamespaceHandlerResolver.java index fd7d64cc8c..6699253594 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/xml/DefaultNamespaceHandlerResolver.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/xml/DefaultNamespaceHandlerResolver.java @@ -109,7 +109,6 @@ public class DefaultNamespaceHandlerResolver implements NamespaceHandlerResolver * @param namespaceUri the relevant namespace URI * @return the located {@link NamespaceHandler}, or {@code null} if none found */ - @Override public NamespaceHandler resolve(String namespaceUri) { Map handlerMappings = getHandlerMappings(); Object handlerOrClassName = handlerMappings.get(namespaceUri); diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/xml/DelegatingEntityResolver.java b/spring-beans/src/main/java/org/springframework/beans/factory/xml/DelegatingEntityResolver.java index c6f8daff90..07bfe7afa9 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/xml/DelegatingEntityResolver.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/xml/DelegatingEntityResolver.java @@ -76,7 +76,6 @@ public class DelegatingEntityResolver implements EntityResolver { } - @Override public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException { if (systemId != null) { if (systemId.endsWith(DTD_SUFFIX)) { diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/xml/DocumentDefaultsDefinition.java b/spring-beans/src/main/java/org/springframework/beans/factory/xml/DocumentDefaultsDefinition.java index ba31c92aaa..874eeaf034 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/xml/DocumentDefaultsDefinition.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/xml/DocumentDefaultsDefinition.java @@ -153,7 +153,6 @@ public class DocumentDefaultsDefinition implements DefaultsDefinition { this.source = source; } - @Override public Object getSource() { return this.source; } diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/xml/NamespaceHandlerSupport.java b/spring-beans/src/main/java/org/springframework/beans/factory/xml/NamespaceHandlerSupport.java index b9f89b2369..ae992c27b2 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/xml/NamespaceHandlerSupport.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/xml/NamespaceHandlerSupport.java @@ -69,7 +69,6 @@ public abstract class NamespaceHandlerSupport implements NamespaceHandler { * Parses the supplied {@link Element} by delegating to the {@link BeanDefinitionParser} that is * registered for that {@link Element}. */ - @Override public BeanDefinition parse(Element element, ParserContext parserContext) { return findParserForElement(element, parserContext).parse(element, parserContext); } @@ -92,7 +91,6 @@ public abstract class NamespaceHandlerSupport implements NamespaceHandler { * Decorates the supplied {@link Node} by delegating to the {@link BeanDefinitionDecorator} that * is registered to handle that {@link Node}. */ - @Override public BeanDefinitionHolder decorate( Node node, BeanDefinitionHolder definition, ParserContext parserContext) { diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/xml/PluggableSchemaResolver.java b/spring-beans/src/main/java/org/springframework/beans/factory/xml/PluggableSchemaResolver.java index 6cfefe7559..8c0d2e77a0 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/xml/PluggableSchemaResolver.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/xml/PluggableSchemaResolver.java @@ -100,7 +100,6 @@ public class PluggableSchemaResolver implements EntityResolver { this.schemaMappingsLocation = schemaMappingsLocation; } - @Override public InputSource resolveEntity(String publicId, String systemId) throws IOException { if (logger.isTraceEnabled()) { logger.trace("Trying to resolve XML entity with public id [" + publicId + diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/xml/SimpleConstructorNamespaceHandler.java b/spring-beans/src/main/java/org/springframework/beans/factory/xml/SimpleConstructorNamespaceHandler.java index 02aef0f045..a7ca4fbd54 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/xml/SimpleConstructorNamespaceHandler.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/xml/SimpleConstructorNamespaceHandler.java @@ -59,18 +59,15 @@ public class SimpleConstructorNamespaceHandler implements NamespaceHandler { private static final String REF_SUFFIX = "-ref"; private static final String DELIMITER_PREFIX = "_"; - @Override public void init() { } - @Override public BeanDefinition parse(Element element, ParserContext parserContext) { parserContext.getReaderContext().error( "Class [" + getClass().getName() + "] does not support custom elements.", element); return null; } - @Override public BeanDefinitionHolder decorate(Node node, BeanDefinitionHolder definition, ParserContext parserContext) { if (node instanceof Attr) { Attr attr = (Attr) node; diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/xml/SimplePropertyNamespaceHandler.java b/spring-beans/src/main/java/org/springframework/beans/factory/xml/SimplePropertyNamespaceHandler.java index e6716d2900..27d861bcb8 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/xml/SimplePropertyNamespaceHandler.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/xml/SimplePropertyNamespaceHandler.java @@ -52,18 +52,15 @@ public class SimplePropertyNamespaceHandler implements NamespaceHandler { private static final String REF_SUFFIX = "-ref"; - @Override public void init() { } - @Override public BeanDefinition parse(Element element, ParserContext parserContext) { parserContext.getReaderContext().error( "Class [" + getClass().getName() + "] does not support custom elements.", element); return null; } - @Override public BeanDefinitionHolder decorate(Node node, BeanDefinitionHolder definition, ParserContext parserContext) { if (node instanceof Attr) { Attr attr = (Attr) node; diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/xml/UtilNamespaceHandler.java b/spring-beans/src/main/java/org/springframework/beans/factory/xml/UtilNamespaceHandler.java index 4d33f236ce..39676dc24d 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/xml/UtilNamespaceHandler.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/xml/UtilNamespaceHandler.java @@ -45,7 +45,6 @@ public class UtilNamespaceHandler extends NamespaceHandlerSupport { private static final String SCOPE_ATTRIBUTE = "scope"; - @Override public void init() { registerBeanDefinitionParser("constant", new ConstantBeanDefinitionParser()); registerBeanDefinitionParser("property-path", new PropertyPathBeanDefinitionParser()); diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/xml/XmlBeanDefinitionReader.java b/spring-beans/src/main/java/org/springframework/beans/factory/xml/XmlBeanDefinitionReader.java index 0021ed45b0..16b58500bc 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/xml/XmlBeanDefinitionReader.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/xml/XmlBeanDefinitionReader.java @@ -298,7 +298,6 @@ public class XmlBeanDefinitionReader extends AbstractBeanDefinitionReader { * @return the number of bean definitions found * @throws BeanDefinitionStoreException in case of loading or parsing errors */ - @Override public int loadBeanDefinitions(Resource resource) throws BeanDefinitionStoreException { return loadBeanDefinitions(new EncodedResource(resource)); } diff --git a/spring-beans/src/main/java/org/springframework/beans/support/MutableSortDefinition.java b/spring-beans/src/main/java/org/springframework/beans/support/MutableSortDefinition.java index 4f59e4d30e..2c64bf5252 100644 --- a/spring-beans/src/main/java/org/springframework/beans/support/MutableSortDefinition.java +++ b/spring-beans/src/main/java/org/springframework/beans/support/MutableSortDefinition.java @@ -104,7 +104,6 @@ public class MutableSortDefinition implements SortDefinition, Serializable { } } - @Override public String getProperty() { return this.property; } @@ -116,7 +115,6 @@ public class MutableSortDefinition implements SortDefinition, Serializable { this.ignoreCase = ignoreCase; } - @Override public boolean isIgnoreCase() { return this.ignoreCase; } @@ -128,7 +126,6 @@ public class MutableSortDefinition implements SortDefinition, Serializable { this.ascending = ascending; } - @Override public boolean isAscending() { return this.ascending; } diff --git a/spring-beans/src/main/java/org/springframework/beans/support/PropertyComparator.java b/spring-beans/src/main/java/org/springframework/beans/support/PropertyComparator.java index bbea12861a..afe74eac66 100644 --- a/spring-beans/src/main/java/org/springframework/beans/support/PropertyComparator.java +++ b/spring-beans/src/main/java/org/springframework/beans/support/PropertyComparator.java @@ -72,7 +72,6 @@ public class PropertyComparator implements Comparator { } - @Override public int compare(Object o1, Object o2) { Object v1 = getPropertyValue(o1); Object v2 = getPropertyValue(o2); diff --git a/spring-beans/src/main/java/org/springframework/beans/support/ResourceEditorRegistrar.java b/spring-beans/src/main/java/org/springframework/beans/support/ResourceEditorRegistrar.java index 2db246e47d..3f4abc6568 100644 --- a/spring-beans/src/main/java/org/springframework/beans/support/ResourceEditorRegistrar.java +++ b/spring-beans/src/main/java/org/springframework/beans/support/ResourceEditorRegistrar.java @@ -106,7 +106,6 @@ public class ResourceEditorRegistrar implements PropertyEditorRegistrar { * @see org.springframework.beans.propertyeditors.ClassArrayEditor * @see org.springframework.core.io.support.ResourceArrayPropertyEditor */ - @Override public void registerCustomEditors(PropertyEditorRegistry registry) { ResourceEditor baseEditor = new ResourceEditor(this.resourceLoader, this.propertyResolver); doRegisterEditor(registry, Resource.class, baseEditor); diff --git a/spring-context-support/src/main/java/org/springframework/cache/ehcache/EhCacheCache.java b/spring-context-support/src/main/java/org/springframework/cache/ehcache/EhCacheCache.java index fa28b2913c..eb02a84e2a 100644 --- a/spring-context-support/src/main/java/org/springframework/cache/ehcache/EhCacheCache.java +++ b/spring-context-support/src/main/java/org/springframework/cache/ehcache/EhCacheCache.java @@ -49,33 +49,27 @@ public class EhCacheCache implements Cache { } - @Override public String getName() { return this.cache.getName(); } - @Override public Ehcache getNativeCache() { return this.cache; } - @Override public ValueWrapper get(Object key) { Element element = this.cache.get(key); return (element != null ? new SimpleValueWrapper(element.getObjectValue()) : null); } - @Override public void put(Object key, Object value) { this.cache.put(new Element(key, value)); } - @Override public void evict(Object key) { this.cache.remove(key); } - @Override public void clear() { this.cache.removeAll(); } diff --git a/spring-context-support/src/main/java/org/springframework/cache/ehcache/EhCacheFactoryBean.java b/spring-context-support/src/main/java/org/springframework/cache/ehcache/EhCacheFactoryBean.java index 4088855bd3..fc2ad00022 100644 --- a/spring-context-support/src/main/java/org/springframework/cache/ehcache/EhCacheFactoryBean.java +++ b/spring-context-support/src/main/java/org/springframework/cache/ehcache/EhCacheFactoryBean.java @@ -296,13 +296,11 @@ public class EhCacheFactoryBean implements FactoryBean, BeanNameAware, this.disabled = disabled; } - @Override public void setBeanName(String name) { this.beanName = name; } - @Override public void afterPropertiesSet() throws CacheException, IOException { // If no CacheManager given, fetch the default. if (this.cacheManager == null) { @@ -395,7 +393,6 @@ public class EhCacheFactoryBean implements FactoryBean, BeanNameAware, } - @Override public Ehcache getObject() { return this.cache; } @@ -405,7 +402,6 @@ public class EhCacheFactoryBean implements FactoryBean, BeanNameAware, * {@link #getObject()} based on logic in {@link #createCache()} and * {@link #decorateCache(Ehcache)} as orchestrated by {@link #afterPropertiesSet()}. */ - @Override public Class getObjectType() { if (this.cache != null) { return this.cache.getClass(); @@ -424,7 +420,6 @@ public class EhCacheFactoryBean implements FactoryBean, BeanNameAware, return Cache.class; } - @Override public boolean isSingleton() { return true; } diff --git a/spring-context-support/src/main/java/org/springframework/cache/ehcache/EhCacheManagerFactoryBean.java b/spring-context-support/src/main/java/org/springframework/cache/ehcache/EhCacheManagerFactoryBean.java index b055160dc3..1fc70da905 100644 --- a/spring-context-support/src/main/java/org/springframework/cache/ehcache/EhCacheManagerFactoryBean.java +++ b/spring-context-support/src/main/java/org/springframework/cache/ehcache/EhCacheManagerFactoryBean.java @@ -96,7 +96,6 @@ public class EhCacheManagerFactoryBean implements FactoryBean, Ini } - @Override public void afterPropertiesSet() throws IOException, CacheException { logger.info("Initializing EHCache CacheManager"); if (this.configLocation != null) { @@ -117,23 +116,19 @@ public class EhCacheManagerFactoryBean implements FactoryBean, Ini } - @Override public CacheManager getObject() { return this.cacheManager; } - @Override public Class getObjectType() { return (this.cacheManager != null ? this.cacheManager.getClass() : CacheManager.class); } - @Override public boolean isSingleton() { return true; } - @Override public void destroy() { logger.info("Shutting down EHCache CacheManager"); this.cacheManager.shutdown(); diff --git a/spring-context-support/src/main/java/org/springframework/cache/jcache/JCacheCache.java b/spring-context-support/src/main/java/org/springframework/cache/jcache/JCacheCache.java index 8b0a731c4e..d47e3dcb92 100644 --- a/spring-context-support/src/main/java/org/springframework/cache/jcache/JCacheCache.java +++ b/spring-context-support/src/main/java/org/springframework/cache/jcache/JCacheCache.java @@ -64,12 +64,10 @@ public class JCacheCache implements Cache { } - @Override public String getName() { return this.cache.getName(); } - @Override public javax.cache.Cache getNativeCache() { return this.cache; } @@ -78,26 +76,22 @@ public class JCacheCache implements Cache { return this.allowNullValues; } - @Override @SuppressWarnings("unchecked") public ValueWrapper get(Object key) { Object value = this.cache.get(key); return (value != null ? new SimpleValueWrapper(fromStoreValue(value)) : null); } - @Override @SuppressWarnings("unchecked") public void put(Object key, Object value) { this.cache.put(key, toStoreValue(value)); } - @Override @SuppressWarnings("unchecked") public void evict(Object key) { this.cache.remove(key); } - @Override public void clear() { this.cache.removeAll(); } diff --git a/spring-context-support/src/main/java/org/springframework/cache/jcache/JCacheManagerFactoryBean.java b/spring-context-support/src/main/java/org/springframework/cache/jcache/JCacheManagerFactoryBean.java index 0bf1c5cb6c..b43c1d75b8 100644 --- a/spring-context-support/src/main/java/org/springframework/cache/jcache/JCacheManagerFactoryBean.java +++ b/spring-context-support/src/main/java/org/springframework/cache/jcache/JCacheManagerFactoryBean.java @@ -53,12 +53,10 @@ public class JCacheManagerFactoryBean this.cacheManagerName = cacheManagerName; } - @Override public void setBeanClassLoader(ClassLoader classLoader) { this.beanClassLoader = classLoader; } - @Override public void afterPropertiesSet() { this.cacheManager = (this.beanClassLoader != null ? Caching.getCacheManager(this.beanClassLoader, this.cacheManagerName) : @@ -66,23 +64,19 @@ public class JCacheManagerFactoryBean } - @Override public CacheManager getObject() { return this.cacheManager; } - @Override public Class getObjectType() { return (this.cacheManager != null ? this.cacheManager.getClass() : CacheManager.class); } - @Override public boolean isSingleton() { return true; } - @Override public void destroy() { this.cacheManager.shutdown(); } diff --git a/spring-context-support/src/main/java/org/springframework/cache/transaction/TransactionAwareCacheDecorator.java b/spring-context-support/src/main/java/org/springframework/cache/transaction/TransactionAwareCacheDecorator.java index abda2b7caf..7b7ac52f97 100644 --- a/spring-context-support/src/main/java/org/springframework/cache/transaction/TransactionAwareCacheDecorator.java +++ b/spring-context-support/src/main/java/org/springframework/cache/transaction/TransactionAwareCacheDecorator.java @@ -47,22 +47,18 @@ public class TransactionAwareCacheDecorator implements Cache { } - @Override public String getName() { return this.targetCache.getName(); } - @Override public Object getNativeCache() { return this.targetCache.getNativeCache(); } - @Override public ValueWrapper get(Object key) { return this.targetCache.get(key); } - @Override public void put(final Object key, final Object value) { if (TransactionSynchronizationManager.isSynchronizationActive()) { TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronizationAdapter() { @@ -77,7 +73,6 @@ public class TransactionAwareCacheDecorator implements Cache { } } - @Override public void evict(final Object key) { if (TransactionSynchronizationManager.isSynchronizationActive()) { TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronizationAdapter() { @@ -92,7 +87,6 @@ public class TransactionAwareCacheDecorator implements Cache { } } - @Override public void clear() { this.targetCache.clear(); } diff --git a/spring-context-support/src/main/java/org/springframework/cache/transaction/TransactionAwareCacheManagerProxy.java b/spring-context-support/src/main/java/org/springframework/cache/transaction/TransactionAwareCacheManagerProxy.java index 2813c0d334..efcfd8f54c 100644 --- a/spring-context-support/src/main/java/org/springframework/cache/transaction/TransactionAwareCacheManagerProxy.java +++ b/spring-context-support/src/main/java/org/springframework/cache/transaction/TransactionAwareCacheManagerProxy.java @@ -65,7 +65,6 @@ public class TransactionAwareCacheManagerProxy implements CacheManager, Initiali this.targetCacheManager = targetCacheManager; } - @Override public void afterPropertiesSet() { if (this.targetCacheManager == null) { throw new IllegalStateException("'targetCacheManager' is required"); @@ -73,12 +72,10 @@ public class TransactionAwareCacheManagerProxy implements CacheManager, Initiali } - @Override public Cache getCache(String name) { return new TransactionAwareCacheDecorator(this.targetCacheManager.getCache(name)); } - @Override public Collection getCacheNames() { return this.targetCacheManager.getCacheNames(); } diff --git a/spring-context-support/src/main/java/org/springframework/mail/SimpleMailMessage.java b/spring-context-support/src/main/java/org/springframework/mail/SimpleMailMessage.java index 65dc4d08ee..7cc61122bb 100644 --- a/spring-context-support/src/main/java/org/springframework/mail/SimpleMailMessage.java +++ b/spring-context-support/src/main/java/org/springframework/mail/SimpleMailMessage.java @@ -89,7 +89,6 @@ public class SimpleMailMessage implements MailMessage, Serializable { } - @Override public void setFrom(String from) { this.from = from; } @@ -98,7 +97,6 @@ public class SimpleMailMessage implements MailMessage, Serializable { return this.from; } - @Override public void setReplyTo(String replyTo) { this.replyTo = replyTo; } @@ -107,12 +105,10 @@ public class SimpleMailMessage implements MailMessage, Serializable { return replyTo; } - @Override public void setTo(String to) { this.to = new String[] {to}; } - @Override public void setTo(String[] to) { this.to = to; } @@ -121,12 +117,10 @@ public class SimpleMailMessage implements MailMessage, Serializable { return this.to; } - @Override public void setCc(String cc) { this.cc = new String[] {cc}; } - @Override public void setCc(String[] cc) { this.cc = cc; } @@ -135,12 +129,10 @@ public class SimpleMailMessage implements MailMessage, Serializable { return cc; } - @Override public void setBcc(String bcc) { this.bcc = new String[] {bcc}; } - @Override public void setBcc(String[] bcc) { this.bcc = bcc; } @@ -149,7 +141,6 @@ public class SimpleMailMessage implements MailMessage, Serializable { return bcc; } - @Override public void setSentDate(Date sentDate) { this.sentDate = sentDate; } @@ -158,7 +149,6 @@ public class SimpleMailMessage implements MailMessage, Serializable { return sentDate; } - @Override public void setSubject(String subject) { this.subject = subject; } @@ -167,7 +157,6 @@ public class SimpleMailMessage implements MailMessage, Serializable { return this.subject; } - @Override public void setText(String text) { this.text = text; } diff --git a/spring-context-support/src/main/java/org/springframework/mail/javamail/ConfigurableMimeFileTypeMap.java b/spring-context-support/src/main/java/org/springframework/mail/javamail/ConfigurableMimeFileTypeMap.java index 803e1f5be1..ac683c5243 100644 --- a/spring-context-support/src/main/java/org/springframework/mail/javamail/ConfigurableMimeFileTypeMap.java +++ b/spring-context-support/src/main/java/org/springframework/mail/javamail/ConfigurableMimeFileTypeMap.java @@ -101,7 +101,6 @@ public class ConfigurableMimeFileTypeMap extends FileTypeMap implements Initiali /** * Creates the final merged mapping set. */ - @Override public void afterPropertiesSet() { getFileTypeMap(); } diff --git a/spring-context-support/src/main/java/org/springframework/mail/javamail/JavaMailSenderImpl.java b/spring-context-support/src/main/java/org/springframework/mail/javamail/JavaMailSenderImpl.java index 3993d28ee0..257b15b78e 100644 --- a/spring-context-support/src/main/java/org/springframework/mail/javamail/JavaMailSenderImpl.java +++ b/spring-context-support/src/main/java/org/springframework/mail/javamail/JavaMailSenderImpl.java @@ -292,12 +292,10 @@ public class JavaMailSenderImpl implements JavaMailSender { // Implementation of MailSender //--------------------------------------------------------------------- - @Override public void send(SimpleMailMessage simpleMessage) throws MailException { send(new SimpleMailMessage[] { simpleMessage }); } - @Override public void send(SimpleMailMessage[] simpleMessages) throws MailException { List mimeMessages = new ArrayList(simpleMessages.length); for (SimpleMailMessage simpleMessage : simpleMessages) { @@ -321,12 +319,10 @@ public class JavaMailSenderImpl implements JavaMailSender { * @see #setDefaultEncoding * @see #setDefaultFileTypeMap */ - @Override public MimeMessage createMimeMessage() { return new SmartMimeMessage(getSession(), getDefaultEncoding(), getDefaultFileTypeMap()); } - @Override public MimeMessage createMimeMessage(InputStream contentStream) throws MailException { try { return new MimeMessage(getSession(), contentStream); @@ -336,22 +332,18 @@ public class JavaMailSenderImpl implements JavaMailSender { } } - @Override public void send(MimeMessage mimeMessage) throws MailException { send(new MimeMessage[] {mimeMessage}); } - @Override public void send(MimeMessage[] mimeMessages) throws MailException { doSend(mimeMessages, null); } - @Override public void send(MimeMessagePreparator mimeMessagePreparator) throws MailException { send(new MimeMessagePreparator[] { mimeMessagePreparator }); } - @Override public void send(MimeMessagePreparator[] mimeMessagePreparators) throws MailException { try { List mimeMessages = new ArrayList(mimeMessagePreparators.length); diff --git a/spring-context-support/src/main/java/org/springframework/mail/javamail/MimeMailMessage.java b/spring-context-support/src/main/java/org/springframework/mail/javamail/MimeMailMessage.java index 6a483168eb..01c6df2dc7 100644 --- a/spring-context-support/src/main/java/org/springframework/mail/javamail/MimeMailMessage.java +++ b/spring-context-support/src/main/java/org/springframework/mail/javamail/MimeMailMessage.java @@ -73,7 +73,6 @@ public class MimeMailMessage implements MailMessage { } - @Override public void setFrom(String from) throws MailParseException { try { this.helper.setFrom(from); @@ -83,7 +82,6 @@ public class MimeMailMessage implements MailMessage { } } - @Override public void setReplyTo(String replyTo) throws MailParseException { try { this.helper.setReplyTo(replyTo); @@ -93,7 +91,6 @@ public class MimeMailMessage implements MailMessage { } } - @Override public void setTo(String to) throws MailParseException { try { this.helper.setTo(to); @@ -103,7 +100,6 @@ public class MimeMailMessage implements MailMessage { } } - @Override public void setTo(String[] to) throws MailParseException { try { this.helper.setTo(to); @@ -113,7 +109,6 @@ public class MimeMailMessage implements MailMessage { } } - @Override public void setCc(String cc) throws MailParseException { try { this.helper.setCc(cc); @@ -123,7 +118,6 @@ public class MimeMailMessage implements MailMessage { } } - @Override public void setCc(String[] cc) throws MailParseException { try { this.helper.setCc(cc); @@ -133,7 +127,6 @@ public class MimeMailMessage implements MailMessage { } } - @Override public void setBcc(String bcc) throws MailParseException { try { this.helper.setBcc(bcc); @@ -143,7 +136,6 @@ public class MimeMailMessage implements MailMessage { } } - @Override public void setBcc(String[] bcc) throws MailParseException { try { this.helper.setBcc(bcc); @@ -153,7 +145,6 @@ public class MimeMailMessage implements MailMessage { } } - @Override public void setSentDate(Date sentDate) throws MailParseException { try { this.helper.setSentDate(sentDate); @@ -163,7 +154,6 @@ public class MimeMailMessage implements MailMessage { } } - @Override public void setSubject(String subject) throws MailParseException { try { this.helper.setSubject(subject); @@ -173,7 +163,6 @@ public class MimeMailMessage implements MailMessage { } } - @Override public void setText(String text) throws MailParseException { try { this.helper.setText(text); diff --git a/spring-context-support/src/main/java/org/springframework/mail/javamail/MimeMessageHelper.java b/spring-context-support/src/main/java/org/springframework/mail/javamail/MimeMessageHelper.java index 245fb23c78..47a115e980 100644 --- a/spring-context-support/src/main/java/org/springframework/mail/javamail/MimeMessageHelper.java +++ b/spring-context-support/src/main/java/org/springframework/mail/javamail/MimeMessageHelper.java @@ -1082,19 +1082,15 @@ public class MimeMessageHelper { final InputStreamSource inputStreamSource, final String contentType, final String name) { return new DataSource() { - @Override public InputStream getInputStream() throws IOException { return inputStreamSource.getInputStream(); } - @Override public OutputStream getOutputStream() { throw new UnsupportedOperationException("Read-only javax.activation.DataSource"); } - @Override public String getContentType() { return contentType; } - @Override public String getName() { return name; } diff --git a/spring-context-support/src/main/java/org/springframework/scheduling/commonj/DelegatingTimerListener.java b/spring-context-support/src/main/java/org/springframework/scheduling/commonj/DelegatingTimerListener.java index 5d0e444715..54f3534e40 100644 --- a/spring-context-support/src/main/java/org/springframework/scheduling/commonj/DelegatingTimerListener.java +++ b/spring-context-support/src/main/java/org/springframework/scheduling/commonj/DelegatingTimerListener.java @@ -47,7 +47,6 @@ public class DelegatingTimerListener implements TimerListener { /** * Delegates execution to the underlying Runnable. */ - @Override public void timerExpired(Timer timer) { this.runnable.run(); } diff --git a/spring-context-support/src/main/java/org/springframework/scheduling/commonj/DelegatingWork.java b/spring-context-support/src/main/java/org/springframework/scheduling/commonj/DelegatingWork.java index d748203698..80a0b556ea 100644 --- a/spring-context-support/src/main/java/org/springframework/scheduling/commonj/DelegatingWork.java +++ b/spring-context-support/src/main/java/org/springframework/scheduling/commonj/DelegatingWork.java @@ -57,7 +57,6 @@ public class DelegatingWork implements Work { /** * Delegates execution to the underlying Runnable. */ - @Override public void run() { this.delegate.run(); } @@ -67,7 +66,6 @@ public class DelegatingWork implements Work { * {@link org.springframework.scheduling.SchedulingAwareRunnable#isLongLived()}, * if available. */ - @Override public boolean isDaemon() { return (this.delegate instanceof SchedulingAwareRunnable && ((SchedulingAwareRunnable) this.delegate).isLongLived()); @@ -77,7 +75,6 @@ public class DelegatingWork implements Work { * This implementation is empty, since we expect the Runnable * to terminate based on some specific shutdown signal. */ - @Override public void release() { } diff --git a/spring-context-support/src/main/java/org/springframework/scheduling/commonj/TimerManagerAccessor.java b/spring-context-support/src/main/java/org/springframework/scheduling/commonj/TimerManagerAccessor.java index 728350db8e..8167f6a709 100644 --- a/spring-context-support/src/main/java/org/springframework/scheduling/commonj/TimerManagerAccessor.java +++ b/spring-context-support/src/main/java/org/springframework/scheduling/commonj/TimerManagerAccessor.java @@ -95,7 +95,6 @@ public abstract class TimerManagerAccessor extends JndiLocatorSupport } - @Override public void afterPropertiesSet() throws NamingException { if (this.timerManager == null) { if (this.timerManagerName == null) { @@ -118,7 +117,6 @@ public abstract class TimerManagerAccessor extends JndiLocatorSupport * Resumes the underlying TimerManager (if not shared). * @see commonj.timers.TimerManager#resume() */ - @Override public void start() { if (!this.shared) { this.timerManager.resume(); @@ -129,7 +127,6 @@ public abstract class TimerManagerAccessor extends JndiLocatorSupport * Suspends the underlying TimerManager (if not shared). * @see commonj.timers.TimerManager#suspend() */ - @Override public void stop() { if (!this.shared) { this.timerManager.suspend(); @@ -142,7 +139,6 @@ public abstract class TimerManagerAccessor extends JndiLocatorSupport * @see commonj.timers.TimerManager#isSuspending() * @see commonj.timers.TimerManager#isStopping() */ - @Override public boolean isRunning() { return (!this.timerManager.isSuspending() && !this.timerManager.isStopping()); } @@ -156,7 +152,6 @@ public abstract class TimerManagerAccessor extends JndiLocatorSupport * Stops the underlying TimerManager (if not shared). * @see commonj.timers.TimerManager#stop() */ - @Override public void destroy() { // Stop the entire TimerManager, if necessary. if (!this.shared) { diff --git a/spring-context-support/src/main/java/org/springframework/scheduling/commonj/TimerManagerFactoryBean.java b/spring-context-support/src/main/java/org/springframework/scheduling/commonj/TimerManagerFactoryBean.java index 3b67a93f95..99a848366d 100644 --- a/spring-context-support/src/main/java/org/springframework/scheduling/commonj/TimerManagerFactoryBean.java +++ b/spring-context-support/src/main/java/org/springframework/scheduling/commonj/TimerManagerFactoryBean.java @@ -76,7 +76,6 @@ public class TimerManagerFactoryBean extends TimerManagerAccessor // Implementation of InitializingBean interface //--------------------------------------------------------------------- - @Override public void afterPropertiesSet() throws NamingException { super.afterPropertiesSet(); if (this.scheduledTimerListeners != null) { @@ -106,18 +105,15 @@ public class TimerManagerFactoryBean extends TimerManagerAccessor // Implementation of FactoryBean interface //--------------------------------------------------------------------- - @Override public TimerManager getObject() { return getTimerManager(); } - @Override public Class getObjectType() { TimerManager timerManager = getTimerManager(); return (timerManager != null ? timerManager.getClass() : TimerManager.class); } - @Override public boolean isSingleton() { return true; } diff --git a/spring-context-support/src/main/java/org/springframework/scheduling/commonj/TimerManagerTaskScheduler.java b/spring-context-support/src/main/java/org/springframework/scheduling/commonj/TimerManagerTaskScheduler.java index 3801e703c0..76714ce5f2 100644 --- a/spring-context-support/src/main/java/org/springframework/scheduling/commonj/TimerManagerTaskScheduler.java +++ b/spring-context-support/src/main/java/org/springframework/scheduling/commonj/TimerManagerTaskScheduler.java @@ -52,12 +52,10 @@ public class TimerManagerTaskScheduler extends TimerManagerAccessor implements T } - @Override public ScheduledFuture schedule(Runnable task, Trigger trigger) { return new ReschedulingTimerListener(errorHandlingTask(task, true), trigger).schedule(); } - @Override public ScheduledFuture schedule(Runnable task, Date startTime) { TimerScheduledFuture futureTask = new TimerScheduledFuture(errorHandlingTask(task, false)); Timer timer = getTimerManager().schedule(futureTask, startTime); @@ -65,7 +63,6 @@ public class TimerManagerTaskScheduler extends TimerManagerAccessor implements T return futureTask; } - @Override public ScheduledFuture scheduleAtFixedRate(Runnable task, Date startTime, long period) { TimerScheduledFuture futureTask = new TimerScheduledFuture(errorHandlingTask(task, true)); Timer timer = getTimerManager().scheduleAtFixedRate(futureTask, startTime, period); @@ -73,7 +70,6 @@ public class TimerManagerTaskScheduler extends TimerManagerAccessor implements T return futureTask; } - @Override public ScheduledFuture scheduleAtFixedRate(Runnable task, long period) { TimerScheduledFuture futureTask = new TimerScheduledFuture(errorHandlingTask(task, true)); Timer timer = getTimerManager().scheduleAtFixedRate(futureTask, 0, period); @@ -81,7 +77,6 @@ public class TimerManagerTaskScheduler extends TimerManagerAccessor implements T return futureTask; } - @Override public ScheduledFuture scheduleWithFixedDelay(Runnable task, Date startTime, long delay) { TimerScheduledFuture futureTask = new TimerScheduledFuture(errorHandlingTask(task, true)); Timer timer = getTimerManager().schedule(futureTask, startTime, delay); @@ -89,7 +84,6 @@ public class TimerManagerTaskScheduler extends TimerManagerAccessor implements T return futureTask; } - @Override public ScheduledFuture scheduleWithFixedDelay(Runnable task, long delay) { TimerScheduledFuture futureTask = new TimerScheduledFuture(errorHandlingTask(task, true)); Timer timer = getTimerManager().schedule(futureTask, 0, delay); @@ -119,7 +113,6 @@ public class TimerManagerTaskScheduler extends TimerManagerAccessor implements T this.timer = timer; } - @Override public void timerExpired(Timer timer) { runAndReset(); } @@ -132,12 +125,10 @@ public class TimerManagerTaskScheduler extends TimerManagerAccessor implements T return result; } - @Override public long getDelay(TimeUnit unit) { return unit.convert(System.currentTimeMillis() - this.timer.getScheduledExecutionTime(), TimeUnit.MILLISECONDS); } - @Override public int compareTo(Delayed other) { if (this == other) { return 0; diff --git a/spring-context-support/src/main/java/org/springframework/scheduling/commonj/WorkManagerTaskExecutor.java b/spring-context-support/src/main/java/org/springframework/scheduling/commonj/WorkManagerTaskExecutor.java index 2c9ce17a49..4d1518dfa9 100644 --- a/spring-context-support/src/main/java/org/springframework/scheduling/commonj/WorkManagerTaskExecutor.java +++ b/spring-context-support/src/main/java/org/springframework/scheduling/commonj/WorkManagerTaskExecutor.java @@ -109,7 +109,6 @@ public class WorkManagerTaskExecutor extends JndiLocatorSupport this.workListener = workListener; } - @Override public void afterPropertiesSet() throws NamingException { if (this.workManager == null) { if (this.workManagerName == null) { @@ -124,7 +123,6 @@ public class WorkManagerTaskExecutor extends JndiLocatorSupport // Implementation of the Spring SchedulingTaskExecutor interface //------------------------------------------------------------------------- - @Override public void execute(Runnable task) { Assert.state(this.workManager != null, "No WorkManager specified"); Work work = new DelegatingWork(task); @@ -144,19 +142,16 @@ public class WorkManagerTaskExecutor extends JndiLocatorSupport } } - @Override public void execute(Runnable task, long startTimeout) { execute(task); } - @Override public Future submit(Runnable task) { FutureTask future = new FutureTask(task, null); execute(future); return future; } - @Override public Future submit(Callable task) { FutureTask future = new FutureTask(task); execute(future); @@ -166,7 +161,6 @@ public class WorkManagerTaskExecutor extends JndiLocatorSupport /** * This task executor prefers short-lived work units. */ - @Override public boolean prefersShortLivedTasks() { return true; } @@ -176,28 +170,24 @@ public class WorkManagerTaskExecutor extends JndiLocatorSupport // Implementation of the CommonJ WorkManager interface //------------------------------------------------------------------------- - @Override public WorkItem schedule(Work work) throws WorkException, IllegalArgumentException { return this.workManager.schedule(work); } - @Override public WorkItem schedule(Work work, WorkListener workListener) throws WorkException, IllegalArgumentException { return this.workManager.schedule(work, workListener); } - @Override public boolean waitForAll(Collection workItems, long timeout) throws InterruptedException, IllegalArgumentException { return this.workManager.waitForAll(workItems, timeout); } - @Override public Collection waitForAny(Collection workItems, long timeout) throws InterruptedException, IllegalArgumentException { diff --git a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/AdaptableJobFactory.java b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/AdaptableJobFactory.java index ba8a6d0c7a..0a2d63c48b 100644 --- a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/AdaptableJobFactory.java +++ b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/AdaptableJobFactory.java @@ -50,7 +50,6 @@ public class AdaptableJobFactory implements JobFactory { /** * Quartz 1.x version of newJob: contains actual implementation code. */ - @Override public Job newJob(TriggerFiredBundle bundle) throws SchedulerException { try { Object jobObject = createJobInstance(bundle); diff --git a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/CronTriggerBean.java b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/CronTriggerBean.java index 00988a7749..c5e1c070b8 100644 --- a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/CronTriggerBean.java +++ b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/CronTriggerBean.java @@ -139,18 +139,15 @@ public class CronTriggerBean extends CronTrigger this.jobDetail = jobDetail; } - @Override public JobDetail getJobDetail() { return this.jobDetail; } - @Override public void setBeanName(String beanName) { this.beanName = beanName; } - @Override public void afterPropertiesSet() throws Exception { if (this.startDelay > 0) { setStartTime(new Date(System.currentTimeMillis() + this.startDelay)); diff --git a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/CronTriggerFactoryBean.java b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/CronTriggerFactoryBean.java index 66741456fd..101c3fdf04 100644 --- a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/CronTriggerFactoryBean.java +++ b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/CronTriggerFactoryBean.java @@ -191,13 +191,11 @@ public class CronTriggerFactoryBean implements FactoryBean, BeanNam this.misfireInstruction = constants.asNumber(constantName).intValue(); } - @Override public void setBeanName(String beanName) { this.beanName = beanName; } - @Override public void afterPropertiesSet() { if (this.name == null) { this.name = this.beanName; @@ -267,17 +265,14 @@ public class CronTriggerFactoryBean implements FactoryBean, BeanNam } - @Override public CronTrigger getObject() { return this.cronTrigger; } - @Override public Class getObjectType() { return CronTrigger.class; } - @Override public boolean isSingleton() { return true; } diff --git a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/DelegatingJob.java b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/DelegatingJob.java index 7536e0aa3a..f75e95951e 100644 --- a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/DelegatingJob.java +++ b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/DelegatingJob.java @@ -60,7 +60,6 @@ public class DelegatingJob implements Job { /** * Delegates execution to the underlying Runnable. */ - @Override public void execute(JobExecutionContext context) throws JobExecutionException { this.delegate.run(); } diff --git a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/JobDetailBean.java b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/JobDetailBean.java index 43998ffcdb..0a53406577 100644 --- a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/JobDetailBean.java +++ b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/JobDetailBean.java @@ -115,12 +115,10 @@ public class JobDetailBean extends JobDetail } } - @Override public void setBeanName(String beanName) { this.beanName = beanName; } - @Override public void setApplicationContext(ApplicationContext applicationContext) { this.applicationContext = applicationContext; } @@ -146,7 +144,6 @@ public class JobDetailBean extends JobDetail } - @Override public void afterPropertiesSet() { if (getName() == null) { setName(this.beanName); diff --git a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/JobDetailFactoryBean.java b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/JobDetailFactoryBean.java index 8f177da433..81d370646a 100644 --- a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/JobDetailFactoryBean.java +++ b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/JobDetailFactoryBean.java @@ -139,12 +139,10 @@ public class JobDetailFactoryBean this.description = description; } - @Override public void setBeanName(String beanName) { this.beanName = beanName; } - @Override public void setApplicationContext(ApplicationContext applicationContext) { this.applicationContext = applicationContext; } @@ -170,7 +168,6 @@ public class JobDetailFactoryBean } - @Override public void afterPropertiesSet() { if (this.name == null) { this.name = this.beanName; @@ -218,17 +215,14 @@ public class JobDetailFactoryBean } - @Override public JobDetail getObject() { return this.jobDetail; } - @Override public Class getObjectType() { return JobDetail.class; } - @Override public boolean isSingleton() { return true; } diff --git a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/LocalDataSourceJobStore.java b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/LocalDataSourceJobStore.java index 1c0939a006..c9664b28f8 100644 --- a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/LocalDataSourceJobStore.java +++ b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/LocalDataSourceJobStore.java @@ -101,12 +101,10 @@ public class LocalDataSourceJobStore extends JobStoreCMT { DBConnectionManager.getInstance().addConnectionProvider( TX_DATA_SOURCE_PREFIX + getInstanceName(), new ConnectionProvider() { - @Override public Connection getConnection() throws SQLException { // Return a transactional Connection, if any. return DataSourceUtils.doGetConnection(dataSource); } - @Override public void shutdown() { // Do nothing - a Spring-managed DataSource has its own lifecycle. } @@ -126,12 +124,10 @@ public class LocalDataSourceJobStore extends JobStoreCMT { DBConnectionManager.getInstance().addConnectionProvider( NON_TX_DATA_SOURCE_PREFIX + getInstanceName(), new ConnectionProvider() { - @Override public Connection getConnection() throws SQLException { // Always return a non-transactional Connection. return nonTxDataSourceToUse.getConnection(); } - @Override public void shutdown() { // Do nothing - a Spring-managed DataSource has its own lifecycle. } diff --git a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/LocalTaskExecutorThreadPool.java b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/LocalTaskExecutorThreadPool.java index 9614f1d1a4..6e5189e3b0 100644 --- a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/LocalTaskExecutorThreadPool.java +++ b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/LocalTaskExecutorThreadPool.java @@ -47,7 +47,6 @@ public class LocalTaskExecutorThreadPool implements ThreadPool { } - @Override public void initialize() throws SchedulerConfigException { // Absolutely needs thread-bound TaskExecutor to initialize. this.taskExecutor = SchedulerFactoryBean.getConfigTimeTaskExecutor(); @@ -58,17 +57,14 @@ public class LocalTaskExecutorThreadPool implements ThreadPool { } } - @Override public void shutdown(boolean waitForJobsToComplete) { } - @Override public int getPoolSize() { return -1; } - @Override public boolean runInThread(Runnable runnable) { if (runnable == null) { return false; @@ -83,7 +79,6 @@ public class LocalTaskExecutorThreadPool implements ThreadPool { } } - @Override public int blockForAvailableThreads() { // The present implementation always returns 1, making Quartz (1.6) // always schedule any tasks that it feels like scheduling. diff --git a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/MethodInvokingJobDetailFactoryBean.java b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/MethodInvokingJobDetailFactoryBean.java index 5d6a8a867d..80ce225457 100644 --- a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/MethodInvokingJobDetailFactoryBean.java +++ b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/MethodInvokingJobDetailFactoryBean.java @@ -176,17 +176,14 @@ public class MethodInvokingJobDetailFactoryBean extends ArgumentConvertingMethod this.jobListenerNames = names; } - @Override public void setBeanName(String beanName) { this.beanName = beanName; } - @Override public void setBeanClassLoader(ClassLoader classLoader) { this.beanClassLoader = classLoader; } - @Override public void setBeanFactory(BeanFactory beanFactory) { this.beanFactory = beanFactory; } @@ -197,7 +194,6 @@ public class MethodInvokingJobDetailFactoryBean extends ArgumentConvertingMethod } - @Override public void afterPropertiesSet() throws ClassNotFoundException, NoSuchMethodException { prepare(); @@ -276,17 +272,14 @@ public class MethodInvokingJobDetailFactoryBean extends ArgumentConvertingMethod } - @Override public JobDetail getObject() { return this.jobDetail; } - @Override public Class getObjectType() { return (this.jobDetail != null ? this.jobDetail.getClass() : JobDetail.class); } - @Override public boolean isSingleton() { return true; } diff --git a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/QuartzJobBean.java b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/QuartzJobBean.java index bdeb1e749a..b2d61536da 100644 --- a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/QuartzJobBean.java +++ b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/QuartzJobBean.java @@ -95,7 +95,6 @@ public abstract class QuartzJobBean implements Job { * values, and delegates to {@code executeInternal} afterwards. * @see #executeInternal */ - @Override public final void execute(JobExecutionContext context) throws JobExecutionException { try { // Reflectively adapting to differences between Quartz 1.x and Quartz 2.0... diff --git a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/ResourceLoaderClassLoadHelper.java b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/ResourceLoaderClassLoadHelper.java index 54dd55760b..5eba86a105 100644 --- a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/ResourceLoaderClassLoadHelper.java +++ b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/ResourceLoaderClassLoadHelper.java @@ -62,7 +62,6 @@ public class ResourceLoaderClassLoadHelper implements ClassLoadHelper { } - @Override public void initialize() { if (this.resourceLoader == null) { this.resourceLoader = SchedulerFactoryBean.getConfigTimeResourceLoader(); @@ -72,7 +71,6 @@ public class ResourceLoaderClassLoadHelper implements ClassLoadHelper { } } - @Override public Class loadClass(String name) throws ClassNotFoundException { return this.resourceLoader.getClassLoader().loadClass(name); } @@ -82,7 +80,6 @@ public class ResourceLoaderClassLoadHelper implements ClassLoadHelper { return loadClass(name); } - @Override public URL getResource(String name) { Resource resource = this.resourceLoader.getResource(name); try { @@ -97,7 +94,6 @@ public class ResourceLoaderClassLoadHelper implements ClassLoadHelper { } } - @Override public InputStream getResourceAsStream(String name) { Resource resource = this.resourceLoader.getResource(name); try { @@ -112,7 +108,6 @@ public class ResourceLoaderClassLoadHelper implements ClassLoadHelper { } } - @Override public ClassLoader getClassLoader() { return this.resourceLoader.getClassLoader(); } diff --git a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SchedulerAccessor.java b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SchedulerAccessor.java index 020c3f141c..9c65590231 100644 --- a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SchedulerAccessor.java +++ b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SchedulerAccessor.java @@ -238,7 +238,6 @@ public abstract class SchedulerAccessor implements ResourceLoaderAware { this.transactionManager = transactionManager; } - @Override public void setResourceLoader(ResourceLoader resourceLoader) { this.resourceLoader = resourceLoader; } diff --git a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SchedulerAccessorBean.java b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SchedulerAccessorBean.java index edf2941060..9c69a47c00 100644 --- a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SchedulerAccessorBean.java +++ b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SchedulerAccessorBean.java @@ -73,13 +73,11 @@ public class SchedulerAccessorBean extends SchedulerAccessor implements BeanFact return this.scheduler; } - @Override public void setBeanFactory(BeanFactory beanFactory) { this.beanFactory = beanFactory; } - @Override public void afterPropertiesSet() throws SchedulerException { if (this.scheduler == null) { if (this.schedulerName != null) { diff --git a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SchedulerFactoryBean.java b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SchedulerFactoryBean.java index cb266ad6a3..84db22173a 100644 --- a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SchedulerFactoryBean.java +++ b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SchedulerFactoryBean.java @@ -369,7 +369,6 @@ public class SchedulerFactoryBean extends SchedulerAccessor implements FactoryBe * the scheduler will start after the context is refreshed and after the * start delay, if any. */ - @Override public boolean isAutoStartup() { return this.autoStartup; } @@ -388,7 +387,6 @@ public class SchedulerFactoryBean extends SchedulerAccessor implements FactoryBe /** * Return the phase in which this scheduler will be started and stopped. */ - @Override public int getPhase() { return this.phase; } @@ -428,14 +426,12 @@ public class SchedulerFactoryBean extends SchedulerAccessor implements FactoryBe } - @Override public void setBeanName(String name) { if (this.schedulerName == null) { this.schedulerName = name; } } - @Override public void setApplicationContext(ApplicationContext applicationContext) { this.applicationContext = applicationContext; } @@ -445,7 +441,6 @@ public class SchedulerFactoryBean extends SchedulerAccessor implements FactoryBe // Implementation of InitializingBean interface //--------------------------------------------------------------------- - @Override public void afterPropertiesSet() throws Exception { if (this.dataSource == null && this.nonTransactionalDataSource != null) { this.dataSource = this.nonTransactionalDataSource; @@ -694,17 +689,14 @@ public class SchedulerFactoryBean extends SchedulerAccessor implements FactoryBe return this.scheduler; } - @Override public Scheduler getObject() { return this.scheduler; } - @Override public Class getObjectType() { return (this.scheduler != null) ? this.scheduler.getClass() : Scheduler.class; } - @Override public boolean isSingleton() { return true; } @@ -714,7 +706,6 @@ public class SchedulerFactoryBean extends SchedulerAccessor implements FactoryBe // Implementation of Lifecycle interface //--------------------------------------------------------------------- - @Override public void start() throws SchedulingException { if (this.scheduler != null) { try { @@ -726,7 +717,6 @@ public class SchedulerFactoryBean extends SchedulerAccessor implements FactoryBe } } - @Override public void stop() throws SchedulingException { if (this.scheduler != null) { try { @@ -738,13 +728,11 @@ public class SchedulerFactoryBean extends SchedulerAccessor implements FactoryBe } } - @Override public void stop(Runnable callback) throws SchedulingException { stop(); callback.run(); } - @Override public boolean isRunning() throws SchedulingException { if (this.scheduler != null) { try { @@ -766,7 +754,6 @@ public class SchedulerFactoryBean extends SchedulerAccessor implements FactoryBe * Shut down the Quartz scheduler on bean factory shutdown, * stopping all scheduled jobs. */ - @Override public void destroy() throws SchedulerException { logger.info("Shutting down Quartz Scheduler"); this.scheduler.shutdown(this.waitForJobsToCompleteOnShutdown); diff --git a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SimpleThreadPoolTaskExecutor.java b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SimpleThreadPoolTaskExecutor.java index 6f5374ab21..b8d5f0bfa9 100644 --- a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SimpleThreadPoolTaskExecutor.java +++ b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SimpleThreadPoolTaskExecutor.java @@ -59,13 +59,11 @@ public class SimpleThreadPoolTaskExecutor extends SimpleThreadPool this.waitForJobsToCompleteOnShutdown = waitForJobsToCompleteOnShutdown; } - @Override public void afterPropertiesSet() throws SchedulerConfigException { initialize(); } - @Override public void execute(Runnable task) { Assert.notNull(task, "Runnable must not be null"); if (!runInThread(task)) { @@ -73,19 +71,16 @@ public class SimpleThreadPoolTaskExecutor extends SimpleThreadPool } } - @Override public void execute(Runnable task, long startTimeout) { execute(task); } - @Override public Future submit(Runnable task) { FutureTask future = new FutureTask(task, null); execute(future); return future; } - @Override public Future submit(Callable task) { FutureTask future = new FutureTask(task); execute(future); @@ -95,13 +90,11 @@ public class SimpleThreadPoolTaskExecutor extends SimpleThreadPool /** * This task executor prefers short-lived work units. */ - @Override public boolean prefersShortLivedTasks() { return true; } - @Override public void destroy() { shutdown(this.waitForJobsToCompleteOnShutdown); } diff --git a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SimpleTriggerBean.java b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SimpleTriggerBean.java index 37f480e3e4..b35bb59ad9 100644 --- a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SimpleTriggerBean.java +++ b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SimpleTriggerBean.java @@ -144,18 +144,15 @@ public class SimpleTriggerBean extends SimpleTrigger this.jobDetail = jobDetail; } - @Override public JobDetail getJobDetail() { return this.jobDetail; } - @Override public void setBeanName(String beanName) { this.beanName = beanName; } - @Override public void afterPropertiesSet() throws ParseException { if (getName() == null) { setName(this.beanName); diff --git a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SimpleTriggerFactoryBean.java b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SimpleTriggerFactoryBean.java index 31896c7ff4..15d1e901ab 100644 --- a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SimpleTriggerFactoryBean.java +++ b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SimpleTriggerFactoryBean.java @@ -195,13 +195,11 @@ public class SimpleTriggerFactoryBean implements FactoryBean, Bea this.misfireInstruction = constants.asNumber(constantName).intValue(); } - @Override public void setBeanName(String beanName) { this.beanName = beanName; } - @Override public void afterPropertiesSet() throws ParseException { if (this.name == null) { this.name = this.beanName; @@ -268,17 +266,14 @@ public class SimpleTriggerFactoryBean implements FactoryBean, Bea } - @Override public SimpleTrigger getObject() { return this.simpleTrigger; } - @Override public Class getObjectType() { return SimpleTrigger.class; } - @Override public boolean isSingleton() { return true; } diff --git a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SpringBeanJobFactory.java b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SpringBeanJobFactory.java index 6ffed1af47..a9d837e7da 100644 --- a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SpringBeanJobFactory.java +++ b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SpringBeanJobFactory.java @@ -63,7 +63,6 @@ public class SpringBeanJobFactory extends AdaptableJobFactory implements Schedul this.ignoredUnknownProperties = ignoredUnknownProperties; } - @Override public void setSchedulerContext(SchedulerContext schedulerContext) { this.schedulerContext = schedulerContext; } diff --git a/spring-context-support/src/main/java/org/springframework/ui/freemarker/FreeMarkerConfigurationFactoryBean.java b/spring-context-support/src/main/java/org/springframework/ui/freemarker/FreeMarkerConfigurationFactoryBean.java index 4e295bbb53..32895bee90 100644 --- a/spring-context-support/src/main/java/org/springframework/ui/freemarker/FreeMarkerConfigurationFactoryBean.java +++ b/spring-context-support/src/main/java/org/springframework/ui/freemarker/FreeMarkerConfigurationFactoryBean.java @@ -56,23 +56,19 @@ public class FreeMarkerConfigurationFactoryBean extends FreeMarkerConfigurationF private Configuration configuration; - @Override public void afterPropertiesSet() throws IOException, TemplateException { this.configuration = createConfiguration(); } - @Override public Configuration getObject() { return this.configuration; } - @Override public Class getObjectType() { return Configuration.class; } - @Override public boolean isSingleton() { return true; } diff --git a/spring-context-support/src/main/java/org/springframework/ui/freemarker/SpringTemplateLoader.java b/spring-context-support/src/main/java/org/springframework/ui/freemarker/SpringTemplateLoader.java index 6f1c22a62d..b3d1a3e276 100644 --- a/spring-context-support/src/main/java/org/springframework/ui/freemarker/SpringTemplateLoader.java +++ b/spring-context-support/src/main/java/org/springframework/ui/freemarker/SpringTemplateLoader.java @@ -63,7 +63,6 @@ public class SpringTemplateLoader implements TemplateLoader { } } - @Override public Object findTemplateSource(String name) throws IOException { if (logger.isDebugEnabled()) { logger.debug("Looking for FreeMarker template with name [" + name + "]"); @@ -72,7 +71,6 @@ public class SpringTemplateLoader implements TemplateLoader { return (resource.exists() ? resource : null); } - @Override public Reader getReader(Object templateSource, String encoding) throws IOException { Resource resource = (Resource) templateSource; try { @@ -87,7 +85,6 @@ public class SpringTemplateLoader implements TemplateLoader { } - @Override public long getLastModified(Object templateSource) { Resource resource = (Resource) templateSource; try { @@ -102,7 +99,6 @@ public class SpringTemplateLoader implements TemplateLoader { } } - @Override public void closeTemplateSource(Object templateSource) throws IOException { } diff --git a/spring-context-support/src/main/java/org/springframework/ui/velocity/CommonsLoggingLogSystem.java b/spring-context-support/src/main/java/org/springframework/ui/velocity/CommonsLoggingLogSystem.java index 454ef1adbb..160516db63 100644 --- a/spring-context-support/src/main/java/org/springframework/ui/velocity/CommonsLoggingLogSystem.java +++ b/spring-context-support/src/main/java/org/springframework/ui/velocity/CommonsLoggingLogSystem.java @@ -40,11 +40,9 @@ public class CommonsLoggingLogSystem implements LogSystem { private static final Log logger = LogFactory.getLog(VelocityEngine.class); - @Override public void init(RuntimeServices runtimeServices) { } - @Override public void logVelocityMessage(int type, String msg) { switch (type) { case ERROR_ID: diff --git a/spring-context-support/src/main/java/org/springframework/ui/velocity/VelocityEngineFactoryBean.java b/spring-context-support/src/main/java/org/springframework/ui/velocity/VelocityEngineFactoryBean.java index 7c45782625..a66f75bf34 100644 --- a/spring-context-support/src/main/java/org/springframework/ui/velocity/VelocityEngineFactoryBean.java +++ b/spring-context-support/src/main/java/org/springframework/ui/velocity/VelocityEngineFactoryBean.java @@ -53,23 +53,19 @@ public class VelocityEngineFactoryBean extends VelocityEngineFactory private VelocityEngine velocityEngine; - @Override public void afterPropertiesSet() throws IOException, VelocityException { this.velocityEngine = createVelocityEngine(); } - @Override public VelocityEngine getObject() { return this.velocityEngine; } - @Override public Class getObjectType() { return VelocityEngine.class; } - @Override public boolean isSingleton() { return true; } diff --git a/spring-context/src/main/java/org/springframework/cache/annotation/AbstractCachingConfiguration.java b/spring-context/src/main/java/org/springframework/cache/annotation/AbstractCachingConfiguration.java index 222d3308f4..4937eeb5e3 100644 --- a/spring-context/src/main/java/org/springframework/cache/annotation/AbstractCachingConfiguration.java +++ b/spring-context/src/main/java/org/springframework/cache/annotation/AbstractCachingConfiguration.java @@ -50,7 +50,6 @@ public abstract class AbstractCachingConfiguration implements ImportAware { @Autowired(required=false) private Collection cachingConfigurers; - @Override public void setImportMetadata(AnnotationMetadata importMetadata) { this.enableCaching = AnnotationAttributes.fromMap( importMetadata.getAnnotationAttributes(EnableCaching.class.getName(), false)); diff --git a/spring-context/src/main/java/org/springframework/cache/annotation/CachingConfigurationSelector.java b/spring-context/src/main/java/org/springframework/cache/annotation/CachingConfigurationSelector.java index b4fb7e5c83..33c4a120a7 100644 --- a/spring-context/src/main/java/org/springframework/cache/annotation/CachingConfigurationSelector.java +++ b/spring-context/src/main/java/org/springframework/cache/annotation/CachingConfigurationSelector.java @@ -39,7 +39,6 @@ public class CachingConfigurationSelector extends AdviceModeImportSelector parseCacheAnnotations(AnnotatedElement ae) { Collection ops = null; diff --git a/spring-context/src/main/java/org/springframework/cache/concurrent/ConcurrentMapCache.java b/spring-context/src/main/java/org/springframework/cache/concurrent/ConcurrentMapCache.java index 7780357153..54b9b6ef14 100644 --- a/spring-context/src/main/java/org/springframework/cache/concurrent/ConcurrentMapCache.java +++ b/spring-context/src/main/java/org/springframework/cache/concurrent/ConcurrentMapCache.java @@ -83,12 +83,10 @@ public class ConcurrentMapCache implements Cache { } - @Override public String getName() { return this.name; } - @Override public ConcurrentMap getNativeCache() { return this.store; } @@ -97,23 +95,19 @@ public class ConcurrentMapCache implements Cache { return this.allowNullValues; } - @Override public ValueWrapper get(Object key) { Object value = this.store.get(key); return (value != null ? new SimpleValueWrapper(fromStoreValue(value)) : null); } - @Override public void put(Object key, Object value) { this.store.put(key, toStoreValue(value)); } - @Override public void evict(Object key) { this.store.remove(key); } - @Override public void clear() { this.store.clear(); } diff --git a/spring-context/src/main/java/org/springframework/cache/concurrent/ConcurrentMapCacheFactoryBean.java b/spring-context/src/main/java/org/springframework/cache/concurrent/ConcurrentMapCacheFactoryBean.java index 0e0b5a8adf..25c9f354b2 100644 --- a/spring-context/src/main/java/org/springframework/cache/concurrent/ConcurrentMapCacheFactoryBean.java +++ b/spring-context/src/main/java/org/springframework/cache/concurrent/ConcurrentMapCacheFactoryBean.java @@ -74,31 +74,26 @@ public class ConcurrentMapCacheFactoryBean this.allowNullValues = allowNullValues; } - @Override public void setBeanName(String beanName) { if (!StringUtils.hasLength(this.name)) { setName(beanName); } } - @Override public void afterPropertiesSet() { this.cache = (this.store != null ? new ConcurrentMapCache(this.name, this.store, this.allowNullValues) : new ConcurrentMapCache(this.name, this.allowNullValues)); } - @Override public ConcurrentMapCache getObject() { return this.cache; } - @Override public Class getObjectType() { return ConcurrentMapCache.class; } - @Override public boolean isSingleton() { return true; } diff --git a/spring-context/src/main/java/org/springframework/cache/concurrent/ConcurrentMapCacheManager.java b/spring-context/src/main/java/org/springframework/cache/concurrent/ConcurrentMapCacheManager.java index 35371d92d4..7a0067a329 100644 --- a/spring-context/src/main/java/org/springframework/cache/concurrent/ConcurrentMapCacheManager.java +++ b/spring-context/src/main/java/org/springframework/cache/concurrent/ConcurrentMapCacheManager.java @@ -71,12 +71,10 @@ public class ConcurrentMapCacheManager implements CacheManager { } } - @Override public Collection getCacheNames() { return Collections.unmodifiableSet(this.cacheMap.keySet()); } - @Override public Cache getCache(String name) { Cache cache = this.cacheMap.get(name); if (cache == null && this.dynamic) { diff --git a/spring-context/src/main/java/org/springframework/cache/config/AnnotationDrivenCacheBeanDefinitionParser.java b/spring-context/src/main/java/org/springframework/cache/config/AnnotationDrivenCacheBeanDefinitionParser.java index 1488d62bd8..8c0fb757be 100644 --- a/spring-context/src/main/java/org/springframework/cache/config/AnnotationDrivenCacheBeanDefinitionParser.java +++ b/spring-context/src/main/java/org/springframework/cache/config/AnnotationDrivenCacheBeanDefinitionParser.java @@ -53,7 +53,6 @@ class AnnotationDrivenCacheBeanDefinitionParser implements BeanDefinitionParser * {@link AopNamespaceUtils#registerAutoProxyCreatorIfNecessary * register an AutoProxyCreator} with the container as necessary. */ - @Override public BeanDefinition parse(Element element, ParserContext parserContext) { String mode = element.getAttribute("mode"); if ("aspectj".equals(mode)) { diff --git a/spring-context/src/main/java/org/springframework/cache/config/CacheNamespaceHandler.java b/spring-context/src/main/java/org/springframework/cache/config/CacheNamespaceHandler.java index 238a3d2805..ad51ad0dce 100644 --- a/spring-context/src/main/java/org/springframework/cache/config/CacheNamespaceHandler.java +++ b/spring-context/src/main/java/org/springframework/cache/config/CacheNamespaceHandler.java @@ -51,7 +51,6 @@ public class CacheNamespaceHandler extends NamespaceHandlerSupport { return def; } - @Override public void init() { registerBeanDefinitionParser("annotation-driven", new AnnotationDrivenCacheBeanDefinitionParser()); registerBeanDefinitionParser("advice", new CacheAdviceParser()); diff --git a/spring-context/src/main/java/org/springframework/cache/interceptor/AbstractFallbackCacheOperationSource.java b/spring-context/src/main/java/org/springframework/cache/interceptor/AbstractFallbackCacheOperationSource.java index 11dc537f03..978dbd8c36 100644 --- a/spring-context/src/main/java/org/springframework/cache/interceptor/AbstractFallbackCacheOperationSource.java +++ b/spring-context/src/main/java/org/springframework/cache/interceptor/AbstractFallbackCacheOperationSource.java @@ -84,7 +84,6 @@ public abstract class AbstractFallbackCacheOperationSource implements CacheOpera * @return {@link CacheOperation} for this method, or {@code null} if the method * is not cacheable */ - @Override public Collection getCacheOperations(Method method, Class targetClass) { // First, see if we have a cached value. Object cacheKey = getCacheKey(method, targetClass); diff --git a/spring-context/src/main/java/org/springframework/cache/interceptor/BeanFactoryCacheOperationSourceAdvisor.java b/spring-context/src/main/java/org/springframework/cache/interceptor/BeanFactoryCacheOperationSourceAdvisor.java index 55a746f44f..a8d4a51e7b 100644 --- a/spring-context/src/main/java/org/springframework/cache/interceptor/BeanFactoryCacheOperationSourceAdvisor.java +++ b/spring-context/src/main/java/org/springframework/cache/interceptor/BeanFactoryCacheOperationSourceAdvisor.java @@ -57,7 +57,6 @@ public class BeanFactoryCacheOperationSourceAdvisor extends AbstractBeanFactoryP this.pointcut.setClassFilter(classFilter); } - @Override public Pointcut getPointcut() { return this.pointcut; } diff --git a/spring-context/src/main/java/org/springframework/cache/interceptor/CacheAspectSupport.java b/spring-context/src/main/java/org/springframework/cache/interceptor/CacheAspectSupport.java index 3ebe8e0606..7c62a21af7 100644 --- a/spring-context/src/main/java/org/springframework/cache/interceptor/CacheAspectSupport.java +++ b/spring-context/src/main/java/org/springframework/cache/interceptor/CacheAspectSupport.java @@ -128,7 +128,6 @@ public abstract class CacheAspectSupport implements InitializingBean { return this.keyGenerator; } - @Override public void afterPropertiesSet() { if (this.cacheManager == null) { throw new IllegalStateException("'cacheManager' is required"); diff --git a/spring-context/src/main/java/org/springframework/cache/interceptor/CacheInterceptor.java b/spring-context/src/main/java/org/springframework/cache/interceptor/CacheInterceptor.java index ad4ab9721b..1673165c3c 100644 --- a/spring-context/src/main/java/org/springframework/cache/interceptor/CacheInterceptor.java +++ b/spring-context/src/main/java/org/springframework/cache/interceptor/CacheInterceptor.java @@ -49,12 +49,10 @@ public class CacheInterceptor extends CacheAspectSupport implements MethodInterc } } - @Override public Object invoke(final MethodInvocation invocation) throws Throwable { Method method = invocation.getMethod(); Invoker aopAllianceInvoker = new Invoker() { - @Override public Object invoke() { try { return invocation.proceed(); diff --git a/spring-context/src/main/java/org/springframework/cache/interceptor/CacheOperationSourcePointcut.java b/spring-context/src/main/java/org/springframework/cache/interceptor/CacheOperationSourcePointcut.java index 58548bb799..8210297a23 100644 --- a/spring-context/src/main/java/org/springframework/cache/interceptor/CacheOperationSourcePointcut.java +++ b/spring-context/src/main/java/org/springframework/cache/interceptor/CacheOperationSourcePointcut.java @@ -33,7 +33,6 @@ import org.springframework.util.ObjectUtils; @SuppressWarnings("serial") abstract class CacheOperationSourcePointcut extends StaticMethodMatcherPointcut implements Serializable { - @Override public boolean matches(Method method, Class targetClass) { CacheOperationSource cas = getCacheOperationSource(); return (cas != null && !CollectionUtils.isEmpty(cas.getCacheOperations(method, targetClass))); diff --git a/spring-context/src/main/java/org/springframework/cache/interceptor/CompositeCacheOperationSource.java b/spring-context/src/main/java/org/springframework/cache/interceptor/CompositeCacheOperationSource.java index 8c01c66417..e8b215285a 100644 --- a/spring-context/src/main/java/org/springframework/cache/interceptor/CompositeCacheOperationSource.java +++ b/spring-context/src/main/java/org/springframework/cache/interceptor/CompositeCacheOperationSource.java @@ -52,7 +52,6 @@ public class CompositeCacheOperationSource implements CacheOperationSource, Seri return this.cacheOperationSources; } - @Override public Collection getCacheOperations(Method method, Class targetClass) { Collection ops = null; diff --git a/spring-context/src/main/java/org/springframework/cache/interceptor/DefaultKeyGenerator.java b/spring-context/src/main/java/org/springframework/cache/interceptor/DefaultKeyGenerator.java index a37218804a..619bd51ca7 100644 --- a/spring-context/src/main/java/org/springframework/cache/interceptor/DefaultKeyGenerator.java +++ b/spring-context/src/main/java/org/springframework/cache/interceptor/DefaultKeyGenerator.java @@ -36,7 +36,6 @@ public class DefaultKeyGenerator implements KeyGenerator { public static final int NO_PARAM_KEY = 0; public static final int NULL_PARAM_KEY = 53; - @Override public Object generate(Object target, Method method, Object... params) { if (params.length == 1) { return (params[0] == null ? NULL_PARAM_KEY : params[0]); diff --git a/spring-context/src/main/java/org/springframework/cache/interceptor/NameMatchCacheOperationSource.java b/spring-context/src/main/java/org/springframework/cache/interceptor/NameMatchCacheOperationSource.java index c1cbdc0e9b..986f8d05cd 100644 --- a/spring-context/src/main/java/org/springframework/cache/interceptor/NameMatchCacheOperationSource.java +++ b/spring-context/src/main/java/org/springframework/cache/interceptor/NameMatchCacheOperationSource.java @@ -71,7 +71,6 @@ public class NameMatchCacheOperationSource implements CacheOperationSource, Seri this.nameMap.put(methodName, ops); } - @Override public Collection getCacheOperations(Method method, Class targetClass) { // look for direct name match String methodName = method.getName(); diff --git a/spring-context/src/main/java/org/springframework/cache/support/AbstractCacheManager.java b/spring-context/src/main/java/org/springframework/cache/support/AbstractCacheManager.java index 8d0f00bbf1..5d301d85f4 100644 --- a/spring-context/src/main/java/org/springframework/cache/support/AbstractCacheManager.java +++ b/spring-context/src/main/java/org/springframework/cache/support/AbstractCacheManager.java @@ -43,7 +43,6 @@ public abstract class AbstractCacheManager implements CacheManager, Initializing private Set cacheNames = new LinkedHashSet(16); - @Override public void afterPropertiesSet() { Collection caches = loadCaches(); Assert.notEmpty(caches, "loadCaches must not return an empty Collection"); @@ -72,12 +71,10 @@ public abstract class AbstractCacheManager implements CacheManager, Initializing } - @Override public Cache getCache(String name) { return this.cacheMap.get(name); } - @Override public Collection getCacheNames() { return Collections.unmodifiableSet(this.cacheNames); } diff --git a/spring-context/src/main/java/org/springframework/cache/support/CompositeCacheManager.java b/spring-context/src/main/java/org/springframework/cache/support/CompositeCacheManager.java index 3d64b770e0..b9d81ae15f 100644 --- a/spring-context/src/main/java/org/springframework/cache/support/CompositeCacheManager.java +++ b/spring-context/src/main/java/org/springframework/cache/support/CompositeCacheManager.java @@ -59,7 +59,6 @@ public class CompositeCacheManager implements InitializingBean, CacheManager { this.fallbackToNoOpCache = fallbackToNoOpCache; } - @Override public void afterPropertiesSet() { if (this.fallbackToNoOpCache) { this.cacheManagers.add(new NoOpCacheManager()); @@ -67,7 +66,6 @@ public class CompositeCacheManager implements InitializingBean, CacheManager { } - @Override public Cache getCache(String name) { for (CacheManager cacheManager : this.cacheManagers) { Cache cache = cacheManager.getCache(name); @@ -78,7 +76,6 @@ public class CompositeCacheManager implements InitializingBean, CacheManager { return null; } - @Override public Collection getCacheNames() { List names = new ArrayList(); for (CacheManager manager : this.cacheManagers) { diff --git a/spring-context/src/main/java/org/springframework/cache/support/NoOpCacheManager.java b/spring-context/src/main/java/org/springframework/cache/support/NoOpCacheManager.java index f8ffe0e729..dc3203e6cf 100644 --- a/spring-context/src/main/java/org/springframework/cache/support/NoOpCacheManager.java +++ b/spring-context/src/main/java/org/springframework/cache/support/NoOpCacheManager.java @@ -48,7 +48,6 @@ public class NoOpCacheManager implements CacheManager { * This implementation always returns a {@link Cache} implementation that will not store items. * Additionally, the request cache will be remembered by the manager for consistency. */ - @Override public Cache getCache(String name) { Cache cache = this.caches.get(name); if (cache == null) { @@ -64,7 +63,6 @@ public class NoOpCacheManager implements CacheManager { /** * This implementation returns the name of the caches previously requested. */ - @Override public Collection getCacheNames() { synchronized (this.cacheNames) { return Collections.unmodifiableSet(this.cacheNames); @@ -80,30 +78,24 @@ public class NoOpCacheManager implements CacheManager { this.name = name; } - @Override public void clear() { } - @Override public void evict(Object key) { } - @Override public ValueWrapper get(Object key) { return null; } - @Override public String getName() { return this.name; } - @Override public Object getNativeCache() { return null; } - @Override public void put(Object key, Object value) { } } diff --git a/spring-context/src/main/java/org/springframework/cache/support/SimpleValueWrapper.java b/spring-context/src/main/java/org/springframework/cache/support/SimpleValueWrapper.java index b248902038..3b687a86de 100644 --- a/spring-context/src/main/java/org/springframework/cache/support/SimpleValueWrapper.java +++ b/spring-context/src/main/java/org/springframework/cache/support/SimpleValueWrapper.java @@ -42,7 +42,6 @@ public class SimpleValueWrapper implements ValueWrapper { /** * Simply returns the value as given at construction time. */ - @Override public Object get() { return this.value; } diff --git a/spring-context/src/main/java/org/springframework/context/ConfigurableApplicationContext.java b/spring-context/src/main/java/org/springframework/context/ConfigurableApplicationContext.java index 09048cbe1f..9d0bdc4b7c 100644 --- a/spring-context/src/main/java/org/springframework/context/ConfigurableApplicationContext.java +++ b/spring-context/src/main/java/org/springframework/context/ConfigurableApplicationContext.java @@ -100,7 +100,6 @@ public interface ConfigurableApplicationContext extends ApplicationContext, Life /** * Return the Environment for this application context in configurable form. */ - @Override ConfigurableEnvironment getEnvironment(); /** @@ -159,7 +158,6 @@ public interface ConfigurableApplicationContext extends ApplicationContext, Life *

This method can be called multiple times without side effects: Subsequent * {@code close} calls on an already closed context will be ignored. */ - @Override void close(); /** diff --git a/spring-context/src/main/java/org/springframework/context/access/ContextBeanFactoryReference.java b/spring-context/src/main/java/org/springframework/context/access/ContextBeanFactoryReference.java index f978a3db42..b39ae88590 100644 --- a/spring-context/src/main/java/org/springframework/context/access/ContextBeanFactoryReference.java +++ b/spring-context/src/main/java/org/springframework/context/access/ContextBeanFactoryReference.java @@ -48,7 +48,6 @@ public class ContextBeanFactoryReference implements BeanFactoryReference { } - @Override public BeanFactory getFactory() { if (this.applicationContext == null) { throw new IllegalStateException( @@ -57,7 +56,6 @@ public class ContextBeanFactoryReference implements BeanFactoryReference { return this.applicationContext; } - @Override public void release() { if (this.applicationContext != null) { ApplicationContext savedCtx; diff --git a/spring-context/src/main/java/org/springframework/context/access/ContextJndiBeanFactoryLocator.java b/spring-context/src/main/java/org/springframework/context/access/ContextJndiBeanFactoryLocator.java index fe9493824b..54b66347ad 100644 --- a/spring-context/src/main/java/org/springframework/context/access/ContextJndiBeanFactoryLocator.java +++ b/spring-context/src/main/java/org/springframework/context/access/ContextJndiBeanFactoryLocator.java @@ -57,7 +57,6 @@ public class ContextJndiBeanFactoryLocator extends JndiLocatorSupport implements * will be created from the combined resources. * @see #createBeanFactory */ - @Override public BeanFactoryReference useBeanFactory(String factoryKey) throws BeansException { try { String beanFactoryPath = lookup(factoryKey, String.class); diff --git a/spring-context/src/main/java/org/springframework/context/annotation/AdviceModeImportSelector.java b/spring-context/src/main/java/org/springframework/context/annotation/AdviceModeImportSelector.java index 826214448b..eae51ec251 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/AdviceModeImportSelector.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/AdviceModeImportSelector.java @@ -65,7 +65,6 @@ public abstract class AdviceModeImportSelector implements * on the importing {@code @Configuration} class or if {@link #selectImports(AdviceMode)} * returns {@code null} */ - @Override public final String[] selectImports(AnnotationMetadata importingClassMetadata) { Class annoType = GenericTypeResolver.resolveTypeArgument(this.getClass(), AdviceModeImportSelector.class); diff --git a/spring-context/src/main/java/org/springframework/context/annotation/AnnotationBeanNameGenerator.java b/spring-context/src/main/java/org/springframework/context/annotation/AnnotationBeanNameGenerator.java index 00d2f9810d..c09600998c 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/AnnotationBeanNameGenerator.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/AnnotationBeanNameGenerator.java @@ -64,7 +64,6 @@ public class AnnotationBeanNameGenerator implements BeanNameGenerator { private static final String COMPONENT_ANNOTATION_CLASSNAME = "org.springframework.stereotype.Component"; - @Override public String generateBeanName(BeanDefinition definition, BeanDefinitionRegistry registry) { if (definition instanceof AnnotatedBeanDefinition) { String beanName = determineBeanNameFromAnnotation((AnnotatedBeanDefinition) definition); diff --git a/spring-context/src/main/java/org/springframework/context/annotation/AnnotationConfigBeanDefinitionParser.java b/spring-context/src/main/java/org/springframework/context/annotation/AnnotationConfigBeanDefinitionParser.java index de52f2e6d3..7d8feebd6f 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/AnnotationConfigBeanDefinitionParser.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/AnnotationConfigBeanDefinitionParser.java @@ -38,7 +38,6 @@ import org.springframework.beans.factory.xml.ParserContext; */ public class AnnotationConfigBeanDefinitionParser implements BeanDefinitionParser { - @Override public BeanDefinition parse(Element element, ParserContext parserContext) { Object source = parserContext.extractSource(element); diff --git a/spring-context/src/main/java/org/springframework/context/annotation/AnnotationScopeMetadataResolver.java b/spring-context/src/main/java/org/springframework/context/annotation/AnnotationScopeMetadataResolver.java index 79556e6aff..f678425ea8 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/AnnotationScopeMetadataResolver.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/AnnotationScopeMetadataResolver.java @@ -73,7 +73,6 @@ public class AnnotationScopeMetadataResolver implements ScopeMetadataResolver { } - @Override public ScopeMetadata resolveScopeMetadata(BeanDefinition definition) { ScopeMetadata metadata = new ScopeMetadata(); if (definition instanceof AnnotatedBeanDefinition) { diff --git a/spring-context/src/main/java/org/springframework/context/annotation/AspectJAutoProxyRegistrar.java b/spring-context/src/main/java/org/springframework/context/annotation/AspectJAutoProxyRegistrar.java index 5b3c522d8f..aedbbbe28e 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/AspectJAutoProxyRegistrar.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/AspectJAutoProxyRegistrar.java @@ -39,7 +39,6 @@ class AspectJAutoProxyRegistrar implements ImportBeanDefinitionRegistrar { * of the @{@link EnableAspectJAutoProxy#proxyTargetClass()} attribute on the importing * {@code @Configuration} class. */ - @Override public void registerBeanDefinitions( AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry) { diff --git a/spring-context/src/main/java/org/springframework/context/annotation/AutoProxyRegistrar.java b/spring-context/src/main/java/org/springframework/context/annotation/AutoProxyRegistrar.java index e0fde7df8f..5fcd8a572d 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/AutoProxyRegistrar.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/AutoProxyRegistrar.java @@ -56,7 +56,6 @@ public class AutoProxyRegistrar implements ImportBeanDefinitionRegistrar { * {@code proxyTargetClass} attributes, the APC can be registered and configured all * the same. */ - @Override public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry) { boolean candidateFound = false; Set annoTypes = importingClassMetadata.getAnnotationTypes(); diff --git a/spring-context/src/main/java/org/springframework/context/annotation/ClassPathScanningCandidateComponentProvider.java b/spring-context/src/main/java/org/springframework/context/annotation/ClassPathScanningCandidateComponentProvider.java index 5e1dd4b18a..6dacb49d60 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/ClassPathScanningCandidateComponentProvider.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/ClassPathScanningCandidateComponentProvider.java @@ -117,7 +117,6 @@ public class ClassPathScanningCandidateComponentProvider implements EnvironmentC * @see org.springframework.core.io.support.ResourcePatternResolver * @see org.springframework.core.io.support.PathMatchingResourcePatternResolver */ - @Override public void setResourceLoader(ResourceLoader resourceLoader) { this.resourcePatternResolver = ResourcePatternUtils.getResourcePatternResolver(resourceLoader); this.metadataReaderFactory = new CachingMetadataReaderFactory(resourceLoader); @@ -158,7 +157,6 @@ public class ClassPathScanningCandidateComponentProvider implements EnvironmentC this.environment = environment; } - @Override public final Environment getEnvironment() { return this.environment; } diff --git a/spring-context/src/main/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessor.java b/spring-context/src/main/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessor.java index e381c9ce71..a105e147f7 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessor.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessor.java @@ -269,7 +269,6 @@ public class CommonAnnotationBeanPostProcessor extends InitDestroyAnnotationBean this.resourceFactory = resourceFactory; } - @Override public void setBeanFactory(BeanFactory beanFactory) throws BeansException { Assert.notNull(beanFactory, "BeanFactory must not be null"); this.beanFactory = beanFactory; @@ -288,17 +287,14 @@ public class CommonAnnotationBeanPostProcessor extends InitDestroyAnnotationBean } } - @Override public Object postProcessBeforeInstantiation(Class beanClass, String beanName) throws BeansException { return null; } - @Override public boolean postProcessAfterInstantiation(Object bean, String beanName) throws BeansException { return true; } - @Override public PropertyValues postProcessPropertyValues( PropertyValues pvs, PropertyDescriptor[] pds, Object bean, String beanName) throws BeansException { diff --git a/spring-context/src/main/java/org/springframework/context/annotation/ComponentScanBeanDefinitionParser.java b/spring-context/src/main/java/org/springframework/context/annotation/ComponentScanBeanDefinitionParser.java index 2ef0ad17af..a35bd818b5 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/ComponentScanBeanDefinitionParser.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/ComponentScanBeanDefinitionParser.java @@ -75,7 +75,6 @@ public class ComponentScanBeanDefinitionParser implements BeanDefinitionParser { private static final String FILTER_EXPRESSION_ATTRIBUTE = "expression"; - @Override public BeanDefinition parse(Element element, ParserContext parserContext) { String[] basePackages = StringUtils.tokenizeToStringArray(element.getAttribute(BASE_PACKAGE_ATTRIBUTE), ConfigurableApplicationContext.CONFIG_LOCATION_DELIMITERS); diff --git a/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassBeanDefinitionReader.java b/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassBeanDefinitionReader.java index b30a04694e..e41aca1728 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassBeanDefinitionReader.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassBeanDefinitionReader.java @@ -318,7 +318,6 @@ class ConfigurationClassBeanDefinitionReader { this.annotationMetadata = original.annotationMetadata; } - @Override public AnnotationMetadata getMetadata() { return this.annotationMetadata; } diff --git a/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassEnhancer.java b/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassEnhancer.java index f75157fc16..99678159d3 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassEnhancer.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassEnhancer.java @@ -56,7 +56,6 @@ class ConfigurationClassEnhancer { DisposableBeanMethodInterceptor.class, NoOp.class }; private static final CallbackFilter CALLBACK_FILTER = new CallbackFilter() { - @Override public int accept(Method candidateMethod) { // Set up the callback filter to return the index of the BeanMethodInterceptor when // handling a @Bean-annotated method; otherwise, return index of the NoOp callback. @@ -169,7 +168,6 @@ class ConfigurationClassEnhancer { this.beanName = beanName; } - @Override public Object intercept(Object obj, Method method, Object[] args, MethodProxy proxy) throws Throwable { return beanFactory.getBean(beanName); } @@ -185,7 +183,6 @@ class ConfigurationClassEnhancer { */ private static class DisposableBeanMethodInterceptor implements MethodInterceptor { - @Override public Object intercept(Object obj, Method method, Object[] args, MethodProxy proxy) throws Throwable { Enhancer.registerStaticCallbacks(obj.getClass(), null); // does the actual (non-CGLIB) superclass actually implement DisposableBean? @@ -216,7 +213,6 @@ class ConfigurationClassEnhancer { GetObjectMethodInterceptor.class, NoOp.class }; private static final CallbackFilter CALLBACK_FITLER = new CallbackFilter() { - @Override public int accept(Method method) { return method.getName().equals("getObject") ? 0 : 1; } @@ -238,7 +234,6 @@ class ConfigurationClassEnhancer { * invoking the super implementation of the proxied method i.e., the actual * {@code @Bean} method. */ - @Override public Object intercept(Object enhancedConfigInstance, Method beanMethod, Object[] beanMethodArgs, MethodProxy cglibMethodProxy) throws Throwable { diff --git a/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassParser.java b/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassParser.java index 7bb0e7f1f3..2901e5cea0 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassParser.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassParser.java @@ -413,7 +413,6 @@ class ConfigurationClassParser { this.imports.put(importedClass, importingClass); } - @Override public String getImportingClassFor(String importedClass) { return this.imports.get(importedClass); } @@ -427,7 +426,6 @@ class ConfigurationClassParser { public boolean contains(Object elem) { ConfigurationClass configClass = (ConfigurationClass) elem; Comparator comparator = new Comparator() { - @Override public int compare(ConfigurationClass first, ConfigurationClass second) { return first.getMetadata().getClassName().equals(second.getMetadata().getClassName()) ? 0 : 1; } diff --git a/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassPostProcessor.java b/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassPostProcessor.java index ab10dfda19..7afbc02733 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassPostProcessor.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassPostProcessor.java @@ -183,19 +183,16 @@ public class ConfigurationClassPostProcessor implements BeanDefinitionRegistryPo this.importBeanNameGenerator = beanNameGenerator; } - @Override public void setEnvironment(Environment environment) { Assert.notNull(environment, "Environment must not be null"); this.environment = environment; } - @Override public void setResourceLoader(ResourceLoader resourceLoader) { Assert.notNull(resourceLoader, "ResourceLoader must not be null"); this.resourceLoader = resourceLoader; } - @Override public void setBeanClassLoader(ClassLoader beanClassLoader) { this.beanClassLoader = beanClassLoader; if (!this.setMetadataReaderFactoryCalled) { @@ -207,7 +204,6 @@ public class ConfigurationClassPostProcessor implements BeanDefinitionRegistryPo /** * Derive further bean definitions from the configuration classes in the registry. */ - @Override public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) { RootBeanDefinition iabpp = new RootBeanDefinition(ImportAwareBeanPostProcessor.class); iabpp.setRole(BeanDefinition.ROLE_INFRASTRUCTURE); @@ -231,7 +227,6 @@ public class ConfigurationClassPostProcessor implements BeanDefinitionRegistryPo * Prepare the Configuration classes for servicing bean requests at runtime * by replacing them with CGLIB-enhanced subclasses. */ - @Override public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) { int factoryId = System.identityHashCode(beanFactory); if (this.factoriesPostProcessed.contains(factoryId)) { @@ -378,12 +373,10 @@ public class ConfigurationClassPostProcessor implements BeanDefinitionRegistryPo private BeanFactory beanFactory; - @Override public void setBeanFactory(BeanFactory beanFactory) throws BeansException { this.beanFactory = beanFactory; } - @Override public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { if (bean instanceof ImportAware) { ImportRegistry importRegistry = this.beanFactory.getBean(IMPORT_REGISTRY_BEAN_NAME, ImportRegistry.class); @@ -406,12 +399,10 @@ public class ConfigurationClassPostProcessor implements BeanDefinitionRegistryPo return bean; } - @Override public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { return bean; } - @Override public int getOrder() { return Ordered.HIGHEST_PRECEDENCE; } diff --git a/spring-context/src/main/java/org/springframework/context/annotation/Jsr330ScopeMetadataResolver.java b/spring-context/src/main/java/org/springframework/context/annotation/Jsr330ScopeMetadataResolver.java index 47b6395fbd..649f1acc42 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/Jsr330ScopeMetadataResolver.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/Jsr330ScopeMetadataResolver.java @@ -81,7 +81,6 @@ public class Jsr330ScopeMetadataResolver implements ScopeMetadataResolver { } - @Override public ScopeMetadata resolveScopeMetadata(BeanDefinition definition) { ScopeMetadata metadata = new ScopeMetadata(); metadata.setScopeName(BeanDefinition.SCOPE_PROTOTYPE); diff --git a/spring-context/src/main/java/org/springframework/context/annotation/LoadTimeWeavingConfiguration.java b/spring-context/src/main/java/org/springframework/context/annotation/LoadTimeWeavingConfiguration.java index efc2a0e30e..b590da4c18 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/LoadTimeWeavingConfiguration.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/LoadTimeWeavingConfiguration.java @@ -52,7 +52,6 @@ public class LoadTimeWeavingConfiguration implements ImportAware, BeanClassLoade private ClassLoader beanClassLoader; - @Override public void setImportMetadata(AnnotationMetadata importMetadata) { this.enableLTW = MetadataUtils.attributesFor(importMetadata, EnableLoadTimeWeaving.class); Assert.notNull(this.enableLTW, @@ -60,7 +59,6 @@ public class LoadTimeWeavingConfiguration implements ImportAware, BeanClassLoade importMetadata.getClassName()); } - @Override public void setBeanClassLoader(ClassLoader beanClassLoader) { this.beanClassLoader = beanClassLoader; } diff --git a/spring-context/src/main/java/org/springframework/context/annotation/MBeanExportConfiguration.java b/spring-context/src/main/java/org/springframework/context/annotation/MBeanExportConfiguration.java index d2f0bb2b5b..f9d38ecefd 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/MBeanExportConfiguration.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/MBeanExportConfiguration.java @@ -56,7 +56,6 @@ public class MBeanExportConfiguration implements ImportAware, BeanFactoryAware { private BeanFactory beanFactory; - @Override public void setImportMetadata(AnnotationMetadata importMetadata) { Map map = importMetadata.getAnnotationAttributes(EnableMBeanExport.class.getName()); this.attributes = AnnotationAttributes.fromMap(map); @@ -64,7 +63,6 @@ public class MBeanExportConfiguration implements ImportAware, BeanFactoryAware { "importing class " + importMetadata.getClassName()); } - @Override public void setBeanFactory(BeanFactory beanFactory) throws BeansException { this.beanFactory = beanFactory; } diff --git a/spring-context/src/main/java/org/springframework/context/annotation/ScannedGenericBeanDefinition.java b/spring-context/src/main/java/org/springframework/context/annotation/ScannedGenericBeanDefinition.java index 7ed9bed6fe..b5afe9f6de 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/ScannedGenericBeanDefinition.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/ScannedGenericBeanDefinition.java @@ -61,7 +61,6 @@ public class ScannedGenericBeanDefinition extends GenericBeanDefinition implemen } - @Override public final AnnotationMetadata getMetadata() { return this.metadata; } diff --git a/spring-context/src/main/java/org/springframework/context/config/ContextNamespaceHandler.java b/spring-context/src/main/java/org/springframework/context/config/ContextNamespaceHandler.java index f85d09d0ab..1a758b60a9 100644 --- a/spring-context/src/main/java/org/springframework/context/config/ContextNamespaceHandler.java +++ b/spring-context/src/main/java/org/springframework/context/config/ContextNamespaceHandler.java @@ -30,7 +30,6 @@ import org.springframework.context.annotation.ComponentScanBeanDefinitionParser; */ public class ContextNamespaceHandler extends NamespaceHandlerSupport { - @Override public void init() { registerBeanDefinitionParser("property-placeholder", new PropertyPlaceholderBeanDefinitionParser()); registerBeanDefinitionParser("property-override", new PropertyOverrideBeanDefinitionParser()); diff --git a/spring-context/src/main/java/org/springframework/context/config/SpringConfiguredBeanDefinitionParser.java b/spring-context/src/main/java/org/springframework/context/config/SpringConfiguredBeanDefinitionParser.java index 3d61447fc3..c7198a2837 100644 --- a/spring-context/src/main/java/org/springframework/context/config/SpringConfiguredBeanDefinitionParser.java +++ b/spring-context/src/main/java/org/springframework/context/config/SpringConfiguredBeanDefinitionParser.java @@ -43,7 +43,6 @@ class SpringConfiguredBeanDefinitionParser implements BeanDefinitionParser { "org.springframework.beans.factory.aspectj.AnnotationBeanConfigurerAspect"; - @Override public BeanDefinition parse(Element element, ParserContext parserContext) { if (!parserContext.getRegistry().containsBeanDefinition(BEAN_CONFIGURER_ASPECT_BEAN_NAME)) { RootBeanDefinition def = new RootBeanDefinition(); diff --git a/spring-context/src/main/java/org/springframework/context/event/AbstractApplicationEventMulticaster.java b/spring-context/src/main/java/org/springframework/context/event/AbstractApplicationEventMulticaster.java index 35a3ed3288..055b5e59db 100644 --- a/spring-context/src/main/java/org/springframework/context/event/AbstractApplicationEventMulticaster.java +++ b/spring-context/src/main/java/org/springframework/context/event/AbstractApplicationEventMulticaster.java @@ -58,7 +58,6 @@ public abstract class AbstractApplicationEventMulticaster implements Application private BeanFactory beanFactory; - @Override public void addApplicationListener(ApplicationListener listener) { synchronized (this.defaultRetriever) { this.defaultRetriever.applicationListeners.add(listener); @@ -66,7 +65,6 @@ public abstract class AbstractApplicationEventMulticaster implements Application } } - @Override public void addApplicationListenerBean(String listenerBeanName) { synchronized (this.defaultRetriever) { this.defaultRetriever.applicationListenerBeans.add(listenerBeanName); @@ -74,7 +72,6 @@ public abstract class AbstractApplicationEventMulticaster implements Application } } - @Override public void removeApplicationListener(ApplicationListener listener) { synchronized (this.defaultRetriever) { this.defaultRetriever.applicationListeners.remove(listener); @@ -82,7 +79,6 @@ public abstract class AbstractApplicationEventMulticaster implements Application } } - @Override public void removeApplicationListenerBean(String listenerBeanName) { synchronized (this.defaultRetriever) { this.defaultRetriever.applicationListenerBeans.remove(listenerBeanName); @@ -90,7 +86,6 @@ public abstract class AbstractApplicationEventMulticaster implements Application } } - @Override public void removeAllListeners() { synchronized (this.defaultRetriever) { this.defaultRetriever.applicationListeners.clear(); @@ -99,7 +94,6 @@ public abstract class AbstractApplicationEventMulticaster implements Application } } - @Override public final void setBeanFactory(BeanFactory beanFactory) { this.beanFactory = beanFactory; } diff --git a/spring-context/src/main/java/org/springframework/context/event/EventPublicationInterceptor.java b/spring-context/src/main/java/org/springframework/context/event/EventPublicationInterceptor.java index 0ff440e34c..ef32c7b6f7 100644 --- a/spring-context/src/main/java/org/springframework/context/event/EventPublicationInterceptor.java +++ b/spring-context/src/main/java/org/springframework/context/event/EventPublicationInterceptor.java @@ -77,12 +77,10 @@ public class EventPublicationInterceptor } } - @Override public void setApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher) { this.applicationEventPublisher = applicationEventPublisher; } - @Override public void afterPropertiesSet() throws Exception { if (this.applicationEventClassConstructor == null) { throw new IllegalArgumentException("applicationEventClass is required"); @@ -90,7 +88,6 @@ public class EventPublicationInterceptor } - @Override public Object invoke(MethodInvocation invocation) throws Throwable { Object retVal = invocation.proceed(); diff --git a/spring-context/src/main/java/org/springframework/context/event/GenericApplicationListenerAdapter.java b/spring-context/src/main/java/org/springframework/context/event/GenericApplicationListenerAdapter.java index 8c7f6e6d57..fa31558fca 100644 --- a/spring-context/src/main/java/org/springframework/context/event/GenericApplicationListenerAdapter.java +++ b/spring-context/src/main/java/org/springframework/context/event/GenericApplicationListenerAdapter.java @@ -46,13 +46,11 @@ public class GenericApplicationListenerAdapter implements SmartApplicationListen } - @Override @SuppressWarnings("unchecked") public void onApplicationEvent(ApplicationEvent event) { this.delegate.onApplicationEvent(event); } - @Override public boolean supportsEventType(Class eventType) { Class typeArg = GenericTypeResolver.resolveTypeArgument(this.delegate.getClass(), ApplicationListener.class); if (typeArg == null || typeArg.equals(ApplicationEvent.class)) { @@ -64,12 +62,10 @@ public class GenericApplicationListenerAdapter implements SmartApplicationListen return (typeArg == null || typeArg.isAssignableFrom(eventType)); } - @Override public boolean supportsSourceType(Class sourceType) { return true; } - @Override public int getOrder() { return (this.delegate instanceof Ordered ? ((Ordered) this.delegate).getOrder() : Ordered.LOWEST_PRECEDENCE); } diff --git a/spring-context/src/main/java/org/springframework/context/event/SimpleApplicationEventMulticaster.java b/spring-context/src/main/java/org/springframework/context/event/SimpleApplicationEventMulticaster.java index ebbdae71dc..2e13855d4a 100644 --- a/spring-context/src/main/java/org/springframework/context/event/SimpleApplicationEventMulticaster.java +++ b/spring-context/src/main/java/org/springframework/context/event/SimpleApplicationEventMulticaster.java @@ -81,14 +81,12 @@ public class SimpleApplicationEventMulticaster extends AbstractApplicationEventM } - @Override @SuppressWarnings("unchecked") public void multicastEvent(final ApplicationEvent event) { for (final ApplicationListener listener : getApplicationListeners(event)) { Executor executor = getTaskExecutor(); if (executor != null) { executor.execute(new Runnable() { - @Override @SuppressWarnings("unchecked") public void run() { listener.onApplicationEvent(event); diff --git a/spring-context/src/main/java/org/springframework/context/event/SourceFilteringListener.java b/spring-context/src/main/java/org/springframework/context/event/SourceFilteringListener.java index ff1f4bb2d1..a9326c5b16 100644 --- a/spring-context/src/main/java/org/springframework/context/event/SourceFilteringListener.java +++ b/spring-context/src/main/java/org/springframework/context/event/SourceFilteringListener.java @@ -63,24 +63,20 @@ public class SourceFilteringListener implements SmartApplicationListener { } - @Override public void onApplicationEvent(ApplicationEvent event) { if (event.getSource() == this.source) { onApplicationEventInternal(event); } } - @Override public boolean supportsEventType(Class eventType) { return (this.delegate == null || this.delegate.supportsEventType(eventType)); } - @Override public boolean supportsSourceType(Class sourceType) { return sourceType.isInstance(this.source); } - @Override public int getOrder() { return (this.delegate != null ? this.delegate.getOrder() : Ordered.LOWEST_PRECEDENCE); } diff --git a/spring-context/src/main/java/org/springframework/context/expression/BeanExpressionContextAccessor.java b/spring-context/src/main/java/org/springframework/context/expression/BeanExpressionContextAccessor.java index 0f1a161948..ff577e3a22 100644 --- a/spring-context/src/main/java/org/springframework/context/expression/BeanExpressionContextAccessor.java +++ b/spring-context/src/main/java/org/springframework/context/expression/BeanExpressionContextAccessor.java @@ -32,27 +32,22 @@ import org.springframework.expression.TypedValue; */ public class BeanExpressionContextAccessor implements PropertyAccessor { - @Override public boolean canRead(EvaluationContext context, Object target, String name) throws AccessException { return ((BeanExpressionContext) target).containsObject(name); } - @Override public TypedValue read(EvaluationContext context, Object target, String name) throws AccessException { return new TypedValue(((BeanExpressionContext) target).getObject(name)); } - @Override public boolean canWrite(EvaluationContext context, Object target, String name) throws AccessException { return false; } - @Override public void write(EvaluationContext context, Object target, String name, Object newValue) throws AccessException { throw new AccessException("Beans in a BeanFactory are read-only"); } - @Override public Class[] getSpecificTargetClasses() { return new Class[] {BeanExpressionContext.class}; } diff --git a/spring-context/src/main/java/org/springframework/context/expression/BeanFactoryAccessor.java b/spring-context/src/main/java/org/springframework/context/expression/BeanFactoryAccessor.java index 15d3d7a622..764af2bfce 100644 --- a/spring-context/src/main/java/org/springframework/context/expression/BeanFactoryAccessor.java +++ b/spring-context/src/main/java/org/springframework/context/expression/BeanFactoryAccessor.java @@ -32,27 +32,22 @@ import org.springframework.expression.TypedValue; */ public class BeanFactoryAccessor implements PropertyAccessor { - @Override public boolean canRead(EvaluationContext context, Object target, String name) throws AccessException { return (((BeanFactory) target).containsBean(name)); } - @Override public TypedValue read(EvaluationContext context, Object target, String name) throws AccessException { return new TypedValue(((BeanFactory) target).getBean(name)); } - @Override public boolean canWrite(EvaluationContext context, Object target, String name) throws AccessException { return false; } - @Override public void write(EvaluationContext context, Object target, String name, Object newValue) throws AccessException { throw new AccessException("Beans in a BeanFactory are read-only"); } - @Override public Class[] getSpecificTargetClasses() { return new Class[] {BeanFactory.class}; } diff --git a/spring-context/src/main/java/org/springframework/context/expression/BeanFactoryResolver.java b/spring-context/src/main/java/org/springframework/context/expression/BeanFactoryResolver.java index 94ecbe74a0..7cec68cfc4 100644 --- a/spring-context/src/main/java/org/springframework/context/expression/BeanFactoryResolver.java +++ b/spring-context/src/main/java/org/springframework/context/expression/BeanFactoryResolver.java @@ -39,7 +39,6 @@ public class BeanFactoryResolver implements BeanResolver { this.beanFactory = beanFactory; } - @Override public Object resolve(EvaluationContext context, String beanName) throws AccessException { try { return this.beanFactory.getBean(beanName); diff --git a/spring-context/src/main/java/org/springframework/context/expression/EnvironmentAccessor.java b/spring-context/src/main/java/org/springframework/context/expression/EnvironmentAccessor.java index 86893f3daa..f7b1d0d303 100644 --- a/spring-context/src/main/java/org/springframework/context/expression/EnvironmentAccessor.java +++ b/spring-context/src/main/java/org/springframework/context/expression/EnvironmentAccessor.java @@ -31,7 +31,6 @@ import org.springframework.expression.TypedValue; */ public class EnvironmentAccessor implements PropertyAccessor { - @Override public Class[] getSpecificTargetClasses() { return new Class[] { Environment.class }; } @@ -40,7 +39,6 @@ public class EnvironmentAccessor implements PropertyAccessor { * Can read any {@link Environment}, thus always returns true. * @return true */ - @Override public boolean canRead(EvaluationContext context, Object target, String name) throws AccessException { return true; } @@ -49,7 +47,6 @@ public class EnvironmentAccessor implements PropertyAccessor { * Access the given target object by resolving the given property name against the given target * environment. */ - @Override public TypedValue read(EvaluationContext context, Object target, String name) throws AccessException { return new TypedValue(((Environment)target).getProperty(name)); } @@ -58,7 +55,6 @@ public class EnvironmentAccessor implements PropertyAccessor { * Read only. * @return false */ - @Override public boolean canWrite(EvaluationContext context, Object target, String name) throws AccessException { return false; } @@ -66,7 +62,6 @@ public class EnvironmentAccessor implements PropertyAccessor { /** * Read only. No-op. */ - @Override public void write(EvaluationContext context, Object target, String name, Object newValue) throws AccessException { } diff --git a/spring-context/src/main/java/org/springframework/context/expression/MapAccessor.java b/spring-context/src/main/java/org/springframework/context/expression/MapAccessor.java index 7f4de09daf..155fefbbc1 100644 --- a/spring-context/src/main/java/org/springframework/context/expression/MapAccessor.java +++ b/spring-context/src/main/java/org/springframework/context/expression/MapAccessor.java @@ -33,13 +33,11 @@ import org.springframework.expression.TypedValue; */ public class MapAccessor implements PropertyAccessor { - @Override public boolean canRead(EvaluationContext context, Object target, String name) throws AccessException { Map map = (Map) target; return map.containsKey(name); } - @Override public TypedValue read(EvaluationContext context, Object target, String name) throws AccessException { Map map = (Map) target; Object value = map.get(name); @@ -49,19 +47,16 @@ public class MapAccessor implements PropertyAccessor { return new TypedValue(value); } - @Override public boolean canWrite(EvaluationContext context, Object target, String name) throws AccessException { return true; } - @Override @SuppressWarnings("unchecked") public void write(EvaluationContext context, Object target, String name, Object newValue) throws AccessException { Map map = (Map) target; map.put(name, newValue); } - @Override public Class[] getSpecificTargetClasses() { return new Class[] {Map.class}; } diff --git a/spring-context/src/main/java/org/springframework/context/expression/StandardBeanExpressionResolver.java b/spring-context/src/main/java/org/springframework/context/expression/StandardBeanExpressionResolver.java index b2cecd883e..fff09d2da4 100644 --- a/spring-context/src/main/java/org/springframework/context/expression/StandardBeanExpressionResolver.java +++ b/spring-context/src/main/java/org/springframework/context/expression/StandardBeanExpressionResolver.java @@ -66,15 +66,12 @@ public class StandardBeanExpressionResolver implements BeanExpressionResolver { new ConcurrentHashMap(8); private final ParserContext beanExpressionParserContext = new ParserContext() { - @Override public boolean isTemplate() { return true; } - @Override public String getExpressionPrefix() { return expressionPrefix; } - @Override public String getExpressionSuffix() { return expressionSuffix; } @@ -112,7 +109,6 @@ public class StandardBeanExpressionResolver implements BeanExpressionResolver { } - @Override public Object evaluate(String value, BeanExpressionContext evalContext) throws BeansException { if (!StringUtils.hasLength(value)) { return value; diff --git a/spring-context/src/main/java/org/springframework/context/i18n/SimpleLocaleContext.java b/spring-context/src/main/java/org/springframework/context/i18n/SimpleLocaleContext.java index de1246bf0b..d3848ebe0a 100644 --- a/spring-context/src/main/java/org/springframework/context/i18n/SimpleLocaleContext.java +++ b/spring-context/src/main/java/org/springframework/context/i18n/SimpleLocaleContext.java @@ -42,7 +42,6 @@ public class SimpleLocaleContext implements LocaleContext { this.locale = locale; } - @Override public Locale getLocale() { return this.locale; } diff --git a/spring-context/src/main/java/org/springframework/context/support/AbstractApplicationContext.java b/spring-context/src/main/java/org/springframework/context/support/AbstractApplicationContext.java index 8a9001cb00..6bfc380aa5 100644 --- a/spring-context/src/main/java/org/springframework/context/support/AbstractApplicationContext.java +++ b/spring-context/src/main/java/org/springframework/context/support/AbstractApplicationContext.java @@ -240,17 +240,14 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader * of the context bean if the context is itself defined as a bean. * @param id the unique id of the context */ - @Override public void setId(String id) { this.id = id; } - @Override public String getId() { return this.id; } - @Override public String getApplicationName() { return ""; } @@ -269,7 +266,6 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader * Return a friendly name for this context. * @return a display name for this context (never {@code null}) */ - @Override public String getDisplayName() { return this.displayName; } @@ -278,7 +274,6 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader * Return the parent context, or {@code null} if there is no parent * (that is, this context is the root of the context hierarchy). */ - @Override public ApplicationContext getParent() { return this.parent; } @@ -288,7 +283,6 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader *

If {@code null}, a new environment will be initialized via * {@link #createEnvironment()}. */ - @Override public ConfigurableEnvironment getEnvironment() { if (this.environment == null) { this.environment = createEnvironment(); @@ -304,7 +298,6 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader * should be performed before {@link #refresh()}. * @see org.springframework.context.support.AbstractApplicationContext#createEnvironment */ - @Override public void setEnvironment(ConfigurableEnvironment environment) { this.environment = environment; } @@ -314,7 +307,6 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader * if already available. * @see #getBeanFactory() */ - @Override public AutowireCapableBeanFactory getAutowireCapableBeanFactory() throws IllegalStateException { return getBeanFactory(); } @@ -322,7 +314,6 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader /** * Return the timestamp (ms) when this context was first loaded. */ - @Override public long getStartupDate() { return this.startupDate; } @@ -335,7 +326,6 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader * @param event the event to publish (may be application-specific or a * standard framework event) */ - @Override public void publishEvent(ApplicationEvent event) { Assert.notNull(event, "Event must not be null"); if (logger.isTraceEnabled()) { @@ -404,7 +394,6 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader * its environment is an instance of {@link ConfigurableEnvironment}. * @see ConfigurableEnvironment#merge(ConfigurableEnvironment) */ - @Override public void setParent(ApplicationContext parent) { this.parent = parent; if (parent != null) { @@ -415,7 +404,6 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader } } - @Override public void addBeanFactoryPostProcessor(BeanFactoryPostProcessor beanFactoryPostProcessor) { this.beanFactoryPostProcessors.add(beanFactoryPostProcessor); } @@ -429,7 +417,6 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader return this.beanFactoryPostProcessors; } - @Override public void addApplicationListener(ApplicationListener listener) { if (this.applicationEventMulticaster != null) { this.applicationEventMulticaster.addApplicationListener(listener); @@ -455,7 +442,6 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader return new StandardEnvironment(); } - @Override public void refresh() throws BeansException, IllegalStateException { synchronized (this.startupShutdownMonitor) { // Prepare this context for refreshing. @@ -985,7 +971,6 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader * @see #close() * @see #doClose() */ - @Override public void registerShutdownHook() { if (this.shutdownHook == null) { // No shutdown hook registered yet. @@ -1009,7 +994,6 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader * @see #close() * @see org.springframework.beans.factory.access.SingletonBeanFactoryLocator */ - @Override public void destroy() { close(); } @@ -1021,7 +1005,6 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader * @see #doClose() * @see #registerShutdownHook() */ - @Override public void close() { synchronized (this.startupShutdownMonitor) { doClose(); @@ -1119,7 +1102,6 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader // For subclasses: do nothing by default. } - @Override public boolean isActive() { synchronized (this.activeMonitor) { return this.active; @@ -1131,52 +1113,42 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader // Implementation of BeanFactory interface //--------------------------------------------------------------------- - @Override public Object getBean(String name) throws BeansException { return getBeanFactory().getBean(name); } - @Override public T getBean(String name, Class requiredType) throws BeansException { return getBeanFactory().getBean(name, requiredType); } - @Override public T getBean(Class requiredType) throws BeansException { return getBeanFactory().getBean(requiredType); } - @Override public Object getBean(String name, Object... args) throws BeansException { return getBeanFactory().getBean(name, args); } - @Override public boolean containsBean(String name) { return getBeanFactory().containsBean(name); } - @Override public boolean isSingleton(String name) throws NoSuchBeanDefinitionException { return getBeanFactory().isSingleton(name); } - @Override public boolean isPrototype(String name) throws NoSuchBeanDefinitionException { return getBeanFactory().isPrototype(name); } - @Override public boolean isTypeMatch(String name, Class targetType) throws NoSuchBeanDefinitionException { return getBeanFactory().isTypeMatch(name, targetType); } - @Override public Class getType(String name) throws NoSuchBeanDefinitionException { return getBeanFactory().getType(name); } - @Override public String[] getAliases(String name) { return getBeanFactory().getAliases(name); } @@ -1186,51 +1158,42 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader // Implementation of ListableBeanFactory interface //--------------------------------------------------------------------- - @Override public boolean containsBeanDefinition(String beanName) { return getBeanFactory().containsBeanDefinition(beanName); } - @Override public int getBeanDefinitionCount() { return getBeanFactory().getBeanDefinitionCount(); } - @Override public String[] getBeanDefinitionNames() { return getBeanFactory().getBeanDefinitionNames(); } - @Override public String[] getBeanNamesForType(Class type) { return getBeanFactory().getBeanNamesForType(type); } - @Override public String[] getBeanNamesForType(Class type, boolean includeNonSingletons, boolean allowEagerInit) { return getBeanFactory().getBeanNamesForType(type, includeNonSingletons, allowEagerInit); } - @Override public Map getBeansOfType(Class type) throws BeansException { return getBeanFactory().getBeansOfType(type); } - @Override public Map getBeansOfType(Class type, boolean includeNonSingletons, boolean allowEagerInit) throws BeansException { return getBeanFactory().getBeansOfType(type, includeNonSingletons, allowEagerInit); } - @Override public Map getBeansWithAnnotation(Class annotationType) throws BeansException { return getBeanFactory().getBeansWithAnnotation(annotationType); } - @Override public A findAnnotationOnBean(String beanName, Class annotationType) { return getBeanFactory().findAnnotationOnBean(beanName, annotationType); } @@ -1240,12 +1203,10 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader // Implementation of HierarchicalBeanFactory interface //--------------------------------------------------------------------- - @Override public BeanFactory getParentBeanFactory() { return getParent(); } - @Override public boolean containsLocalBean(String name) { return getBeanFactory().containsLocalBean(name); } @@ -1265,17 +1226,14 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader // Implementation of MessageSource interface //--------------------------------------------------------------------- - @Override public String getMessage(String code, Object args[], String defaultMessage, Locale locale) { return getMessageSource().getMessage(code, args, defaultMessage, locale); } - @Override public String getMessage(String code, Object args[], Locale locale) throws NoSuchMessageException { return getMessageSource().getMessage(code, args, locale); } - @Override public String getMessage(MessageSourceResolvable resolvable, Locale locale) throws NoSuchMessageException { return getMessageSource().getMessage(resolvable, locale); } @@ -1307,7 +1265,6 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader // Implementation of ResourcePatternResolver interface //--------------------------------------------------------------------- - @Override public Resource[] getResources(String locationPattern) throws IOException { return this.resourcePatternResolver.getResources(locationPattern); } @@ -1317,19 +1274,16 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader // Implementation of Lifecycle interface //--------------------------------------------------------------------- - @Override public void start() { getLifecycleProcessor().start(); publishEvent(new ContextStartedEvent(this)); } - @Override public void stop() { getLifecycleProcessor().stop(); publishEvent(new ContextStoppedEvent(this)); } - @Override public boolean isRunning() { return getLifecycleProcessor().isRunning(); } @@ -1371,7 +1325,6 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader * @see #refreshBeanFactory() * @see #closeBeanFactory() */ - @Override public abstract ConfigurableListableBeanFactory getBeanFactory() throws IllegalStateException; @@ -1410,12 +1363,10 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader this.beanPostProcessorTargetCount = beanPostProcessorTargetCount; } - @Override public Object postProcessBeforeInitialization(Object bean, String beanName) { return bean; } - @Override public Object postProcessAfterInitialization(Object bean, String beanName) { if (bean != null && !(bean instanceof BeanPostProcessor) && this.beanFactory.getBeanPostProcessorCount() < this.beanPostProcessorTargetCount) { @@ -1438,19 +1389,16 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader private final Map singletonNames = new ConcurrentHashMap(64); - @Override public void postProcessMergedBeanDefinition(RootBeanDefinition beanDefinition, Class beanType, String beanName) { if (beanDefinition.isSingleton()) { this.singletonNames.put(beanName, Boolean.TRUE); } } - @Override public Object postProcessBeforeInitialization(Object bean, String beanName) { return bean; } - @Override public Object postProcessAfterInitialization(Object bean, String beanName) { if (bean instanceof ApplicationListener) { // potentially not detected as a listener by getBeanNamesForType retrieval diff --git a/spring-context/src/main/java/org/springframework/context/support/AbstractMessageSource.java b/spring-context/src/main/java/org/springframework/context/support/AbstractMessageSource.java index 87209ec95a..768c963d3b 100644 --- a/spring-context/src/main/java/org/springframework/context/support/AbstractMessageSource.java +++ b/spring-context/src/main/java/org/springframework/context/support/AbstractMessageSource.java @@ -67,12 +67,10 @@ public abstract class AbstractMessageSource extends MessageSourceSupport impleme private boolean useCodeAsDefaultMessage = false; - @Override public void setParentMessageSource(MessageSource parent) { this.parentMessageSource = parent; } - @Override public MessageSource getParentMessageSource() { return this.parentMessageSource; } @@ -111,7 +109,6 @@ public abstract class AbstractMessageSource extends MessageSourceSupport impleme } - @Override public final String getMessage(String code, Object[] args, String defaultMessage, Locale locale) { String msg = getMessageInternal(code, args, locale); if (msg != null) { @@ -126,7 +123,6 @@ public abstract class AbstractMessageSource extends MessageSourceSupport impleme return renderDefaultMessage(defaultMessage, args, locale); } - @Override public final String getMessage(String code, Object[] args, Locale locale) throws NoSuchMessageException { String msg = getMessageInternal(code, args, locale); if (msg != null) { @@ -139,7 +135,6 @@ public abstract class AbstractMessageSource extends MessageSourceSupport impleme throw new NoSuchMessageException(code, locale); } - @Override public final String getMessage(MessageSourceResolvable resolvable, Locale locale) throws NoSuchMessageException { diff --git a/spring-context/src/main/java/org/springframework/context/support/AbstractRefreshableConfigApplicationContext.java b/spring-context/src/main/java/org/springframework/context/support/AbstractRefreshableConfigApplicationContext.java index 3004d68c22..138f45526c 100644 --- a/spring-context/src/main/java/org/springframework/context/support/AbstractRefreshableConfigApplicationContext.java +++ b/spring-context/src/main/java/org/springframework/context/support/AbstractRefreshableConfigApplicationContext.java @@ -133,7 +133,6 @@ public abstract class AbstractRefreshableConfigApplicationContext extends Abstra * Sets the id of this context to the bean name by default, * for cases where the context instance is itself defined as a bean. */ - @Override public void setBeanName(String name) { if (!this.setIdCalled) { super.setId(name); @@ -145,7 +144,6 @@ public abstract class AbstractRefreshableConfigApplicationContext extends Abstra * Triggers {@link #refresh()} if not refreshed in the concrete context's * constructor already. */ - @Override public void afterPropertiesSet() { if (!isActive()) { refresh(); diff --git a/spring-context/src/main/java/org/springframework/context/support/ApplicationContextAwareProcessor.java b/spring-context/src/main/java/org/springframework/context/support/ApplicationContextAwareProcessor.java index 2a521b3b64..e88b26799c 100644 --- a/spring-context/src/main/java/org/springframework/context/support/ApplicationContextAwareProcessor.java +++ b/spring-context/src/main/java/org/springframework/context/support/ApplicationContextAwareProcessor.java @@ -70,7 +70,6 @@ class ApplicationContextAwareProcessor implements BeanPostProcessor { } - @Override public Object postProcessBeforeInitialization(final Object bean, String beanName) throws BeansException { AccessControlContext acc = null; @@ -83,7 +82,6 @@ class ApplicationContextAwareProcessor implements BeanPostProcessor { if (acc != null) { AccessController.doPrivileged(new PrivilegedAction() { - @Override public Object run() { invokeAwareInterfaces(bean); return null; @@ -121,7 +119,6 @@ class ApplicationContextAwareProcessor implements BeanPostProcessor { } } - @Override public Object postProcessAfterInitialization(Object bean, String beanName) { return bean; } @@ -135,7 +132,6 @@ class ApplicationContextAwareProcessor implements BeanPostProcessor { this.beanFactory = beanFactory; } - @Override public String resolveStringValue(String strVal) { return this.beanFactory.resolveEmbeddedValue(strVal); } diff --git a/spring-context/src/main/java/org/springframework/context/support/ApplicationObjectSupport.java b/spring-context/src/main/java/org/springframework/context/support/ApplicationObjectSupport.java index e3bb18e49c..ebee90cc03 100644 --- a/spring-context/src/main/java/org/springframework/context/support/ApplicationObjectSupport.java +++ b/spring-context/src/main/java/org/springframework/context/support/ApplicationObjectSupport.java @@ -56,7 +56,6 @@ public abstract class ApplicationObjectSupport implements ApplicationContextAwar private MessageSourceAccessor messageSourceAccessor; - @Override public final void setApplicationContext(ApplicationContext context) throws BeansException { if (context == null && !isContextRequired()) { // Reset internal context state. diff --git a/spring-context/src/main/java/org/springframework/context/support/ContextTypeMatchClassLoader.java b/spring-context/src/main/java/org/springframework/context/support/ContextTypeMatchClassLoader.java index 9cdff9d621..f81020673d 100644 --- a/spring-context/src/main/java/org/springframework/context/support/ContextTypeMatchClassLoader.java +++ b/spring-context/src/main/java/org/springframework/context/support/ContextTypeMatchClassLoader.java @@ -63,7 +63,6 @@ class ContextTypeMatchClassLoader extends DecoratingClassLoader implements Smart return new ContextOverridingClassLoader(getParent()).loadClass(name); } - @Override public boolean isClassReloadable(Class clazz) { return (clazz.getClassLoader() instanceof ContextOverridingClassLoader); } diff --git a/spring-context/src/main/java/org/springframework/context/support/ConversionServiceFactoryBean.java b/spring-context/src/main/java/org/springframework/context/support/ConversionServiceFactoryBean.java index 5cf2e81746..95b40263ed 100644 --- a/spring-context/src/main/java/org/springframework/context/support/ConversionServiceFactoryBean.java +++ b/spring-context/src/main/java/org/springframework/context/support/ConversionServiceFactoryBean.java @@ -64,7 +64,6 @@ public class ConversionServiceFactoryBean implements FactoryBean getObjectType() { return GenericConversionService.class; } - @Override public boolean isSingleton() { return true; } diff --git a/spring-context/src/main/java/org/springframework/context/support/DefaultLifecycleProcessor.java b/spring-context/src/main/java/org/springframework/context/support/DefaultLifecycleProcessor.java index 6290f869fd..5d50a0e1c9 100644 --- a/spring-context/src/main/java/org/springframework/context/support/DefaultLifecycleProcessor.java +++ b/spring-context/src/main/java/org/springframework/context/support/DefaultLifecycleProcessor.java @@ -68,7 +68,6 @@ public class DefaultLifecycleProcessor implements LifecycleProcessor, BeanFactor this.timeoutPerShutdownPhase = timeoutPerShutdownPhase; } - @Override public void setBeanFactory(BeanFactory beanFactory) { Assert.isInstanceOf(ConfigurableListableBeanFactory.class, beanFactory); this.beanFactory = (ConfigurableListableBeanFactory) beanFactory; @@ -86,7 +85,6 @@ public class DefaultLifecycleProcessor implements LifecycleProcessor, BeanFactor * declared as a dependency of another bean will be started before * the dependent bean regardless of the declared phase. */ - @Override public void start() { startBeans(false); this.running = true; @@ -101,25 +99,21 @@ public class DefaultLifecycleProcessor implements LifecycleProcessor, BeanFactor * declared as dependent on another bean will be stopped before * the dependency bean regardless of the declared phase. */ - @Override public void stop() { stopBeans(); this.running = false; } - @Override public void onRefresh() { startBeans(true); this.running = true; } - @Override public void onClose() { stopBeans(); this.running = false; } - @Override public boolean isRunning() { return this.running; } @@ -227,7 +221,6 @@ public class DefaultLifecycleProcessor implements LifecycleProcessor, BeanFactor } countDownBeanNames.add(beanName); ((SmartLifecycle) bean).stop(new Runnable() { - @Override public void run() { latch.countDown(); countDownBeanNames.remove(beanName); @@ -396,7 +389,6 @@ public class DefaultLifecycleProcessor implements LifecycleProcessor, BeanFactor this.bean = bean; } - @Override public int compareTo(LifecycleGroupMember other) { int thisOrder = getPhase(this.bean); int otherOrder = getPhase(other.bean); diff --git a/spring-context/src/main/java/org/springframework/context/support/DefaultMessageSourceResolvable.java b/spring-context/src/main/java/org/springframework/context/support/DefaultMessageSourceResolvable.java index e688b5009d..e668c4e736 100644 --- a/spring-context/src/main/java/org/springframework/context/support/DefaultMessageSourceResolvable.java +++ b/spring-context/src/main/java/org/springframework/context/support/DefaultMessageSourceResolvable.java @@ -96,7 +96,6 @@ public class DefaultMessageSourceResolvable implements MessageSourceResolvable, } - @Override public String[] getCodes() { return this.codes; } @@ -109,12 +108,10 @@ public class DefaultMessageSourceResolvable implements MessageSourceResolvable, return (this.codes != null && this.codes.length > 0) ? this.codes[this.codes.length - 1] : null; } - @Override public Object[] getArguments() { return this.arguments; } - @Override public String getDefaultMessage() { return this.defaultMessage; } diff --git a/spring-context/src/main/java/org/springframework/context/support/DelegatingMessageSource.java b/spring-context/src/main/java/org/springframework/context/support/DelegatingMessageSource.java index 6526cc957a..620225d000 100644 --- a/spring-context/src/main/java/org/springframework/context/support/DelegatingMessageSource.java +++ b/spring-context/src/main/java/org/springframework/context/support/DelegatingMessageSource.java @@ -39,18 +39,15 @@ public class DelegatingMessageSource extends MessageSourceSupport implements Hie private MessageSource parentMessageSource; - @Override public void setParentMessageSource(MessageSource parent) { this.parentMessageSource = parent; } - @Override public MessageSource getParentMessageSource() { return this.parentMessageSource; } - @Override public String getMessage(String code, Object[] args, String defaultMessage, Locale locale) { if (this.parentMessageSource != null) { return this.parentMessageSource.getMessage(code, args, defaultMessage, locale); @@ -60,7 +57,6 @@ public class DelegatingMessageSource extends MessageSourceSupport implements Hie } } - @Override public String getMessage(String code, Object[] args, Locale locale) throws NoSuchMessageException { if (this.parentMessageSource != null) { return this.parentMessageSource.getMessage(code, args, locale); @@ -70,7 +66,6 @@ public class DelegatingMessageSource extends MessageSourceSupport implements Hie } } - @Override public String getMessage(MessageSourceResolvable resolvable, Locale locale) throws NoSuchMessageException { if (this.parentMessageSource != null) { return this.parentMessageSource.getMessage(resolvable, locale); diff --git a/spring-context/src/main/java/org/springframework/context/support/GenericApplicationContext.java b/spring-context/src/main/java/org/springframework/context/support/GenericApplicationContext.java index 01f175abe3..7c3d8bcc11 100644 --- a/spring-context/src/main/java/org/springframework/context/support/GenericApplicationContext.java +++ b/spring-context/src/main/java/org/springframework/context/support/GenericApplicationContext.java @@ -286,39 +286,32 @@ public class GenericApplicationContext extends AbstractApplicationContext implem // Implementation of BeanDefinitionRegistry //--------------------------------------------------------------------- - @Override public void registerBeanDefinition(String beanName, BeanDefinition beanDefinition) throws BeanDefinitionStoreException { this.beanFactory.registerBeanDefinition(beanName, beanDefinition); } - @Override public void removeBeanDefinition(String beanName) throws NoSuchBeanDefinitionException { this.beanFactory.removeBeanDefinition(beanName); } - @Override public BeanDefinition getBeanDefinition(String beanName) throws NoSuchBeanDefinitionException { return this.beanFactory.getBeanDefinition(beanName); } - @Override public boolean isBeanNameInUse(String beanName) { return this.beanFactory.isBeanNameInUse(beanName); } - @Override public void registerAlias(String beanName, String alias) { this.beanFactory.registerAlias(beanName, alias); } - @Override public void removeAlias(String alias) { this.beanFactory.removeAlias(alias); } - @Override public boolean isAlias(String beanName) { return this.beanFactory.isAlias(beanName); } diff --git a/spring-context/src/main/java/org/springframework/context/support/LiveBeansView.java b/spring-context/src/main/java/org/springframework/context/support/LiveBeansView.java index bf20ae1017..7cdfb8d492 100644 --- a/spring-context/src/main/java/org/springframework/context/support/LiveBeansView.java +++ b/spring-context/src/main/java/org/springframework/context/support/LiveBeansView.java @@ -93,7 +93,6 @@ public class LiveBeansView implements LiveBeansViewMBean, ApplicationContextAwar private ConfigurableApplicationContext applicationContext; - @Override public void setApplicationContext(ApplicationContext applicationContext) { Assert.isTrue(applicationContext instanceof ConfigurableApplicationContext, "ApplicationContext does not implement ConfigurableApplicationContext"); @@ -106,7 +105,6 @@ public class LiveBeansView implements LiveBeansViewMBean, ApplicationContextAwar * finding all active ApplicationContexts through {@link #findApplicationContexts()}, * then delegating to {@link #generateJson(java.util.Set)}. */ - @Override public String getSnapshotAsJson() { Set contexts; if (this.applicationContext != null) { diff --git a/spring-context/src/main/java/org/springframework/context/support/PropertySourcesPlaceholderConfigurer.java b/spring-context/src/main/java/org/springframework/context/support/PropertySourcesPlaceholderConfigurer.java index d39c7d3d5b..c831bbb855 100644 --- a/spring-context/src/main/java/org/springframework/context/support/PropertySourcesPlaceholderConfigurer.java +++ b/spring-context/src/main/java/org/springframework/context/support/PropertySourcesPlaceholderConfigurer.java @@ -98,7 +98,6 @@ public class PropertySourcesPlaceholderConfigurer extends PlaceholderConfigurerS * @see #setPropertySources * @see #postProcessBeanFactory */ - @Override public void setEnvironment(Environment environment) { this.environment = environment; } @@ -164,7 +163,6 @@ public class PropertySourcesPlaceholderConfigurer extends PlaceholderConfigurerS propertyResolver.setValueSeparator(this.valueSeparator); StringValueResolver valueResolver = new StringValueResolver() { - @Override public String resolveStringValue(String strVal) { String resolved = ignoreUnresolvablePlaceholders ? propertyResolver.resolvePlaceholders(strVal) : diff --git a/spring-context/src/main/java/org/springframework/context/support/ReloadableResourceBundleMessageSource.java b/spring-context/src/main/java/org/springframework/context/support/ReloadableResourceBundleMessageSource.java index 14b831c098..e428c760b9 100644 --- a/spring-context/src/main/java/org/springframework/context/support/ReloadableResourceBundleMessageSource.java +++ b/spring-context/src/main/java/org/springframework/context/support/ReloadableResourceBundleMessageSource.java @@ -250,7 +250,6 @@ public class ReloadableResourceBundleMessageSource extends AbstractMessageSource * @see org.springframework.core.io.DefaultResourceLoader * @see org.springframework.context.ResourceLoaderAware */ - @Override public void setResourceLoader(ResourceLoader resourceLoader) { this.resourceLoader = (resourceLoader != null ? resourceLoader : new DefaultResourceLoader()); } diff --git a/spring-context/src/main/java/org/springframework/context/support/ResourceBundleMessageSource.java b/spring-context/src/main/java/org/springframework/context/support/ResourceBundleMessageSource.java index b11f8b2649..eeca86a108 100644 --- a/spring-context/src/main/java/org/springframework/context/support/ResourceBundleMessageSource.java +++ b/spring-context/src/main/java/org/springframework/context/support/ResourceBundleMessageSource.java @@ -223,7 +223,6 @@ public class ResourceBundleMessageSource extends AbstractMessageSource implement return (this.bundleClassLoader != null ? this.bundleClassLoader : this.beanClassLoader); } - @Override public void setBeanClassLoader(ClassLoader classLoader) { this.beanClassLoader = (classLoader != null ? classLoader : ClassUtils.getDefaultClassLoader()); } @@ -432,7 +431,6 @@ public class ResourceBundleMessageSource extends AbstractMessageSource implement try { stream = AccessController.doPrivileged( new PrivilegedExceptionAction() { - @Override public InputStream run() throws IOException { InputStream is = null; if (reloadFlag) { diff --git a/spring-context/src/main/java/org/springframework/context/support/SimpleThreadScope.java b/spring-context/src/main/java/org/springframework/context/support/SimpleThreadScope.java index 0feb05443e..30aad8a078 100644 --- a/spring-context/src/main/java/org/springframework/context/support/SimpleThreadScope.java +++ b/spring-context/src/main/java/org/springframework/context/support/SimpleThreadScope.java @@ -55,7 +55,6 @@ public class SimpleThreadScope implements Scope { } }; - @Override public Object get(String name, ObjectFactory objectFactory) { Map scope = threadScope.get(); Object object = scope.get(name); @@ -66,24 +65,20 @@ public class SimpleThreadScope implements Scope { return object; } - @Override public Object remove(String name) { Map scope = threadScope.get(); return scope.remove(name); } - @Override public void registerDestructionCallback(String name, Runnable callback) { logger.warn("SimpleThreadScope does not support descruction callbacks. " + "Consider using a RequestScope in a Web environment."); } - @Override public Object resolveContextualObject(String key) { return null; } - @Override public String getConversationId() { return Thread.currentThread().getName(); } diff --git a/spring-context/src/main/java/org/springframework/context/weaving/AspectJWeavingEnabler.java b/spring-context/src/main/java/org/springframework/context/weaving/AspectJWeavingEnabler.java index ca86be3110..9037014488 100644 --- a/spring-context/src/main/java/org/springframework/context/weaving/AspectJWeavingEnabler.java +++ b/spring-context/src/main/java/org/springframework/context/weaving/AspectJWeavingEnabler.java @@ -50,22 +50,18 @@ public class AspectJWeavingEnabler public static final String ASPECTJ_AOP_XML_RESOURCE = "META-INF/aop.xml"; - @Override public void setBeanClassLoader(ClassLoader classLoader) { this.beanClassLoader = classLoader; } - @Override public void setLoadTimeWeaver(LoadTimeWeaver loadTimeWeaver) { this.loadTimeWeaver = loadTimeWeaver; } - @Override public int getOrder() { return HIGHEST_PRECEDENCE; } - @Override public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { enableAspectJWeaving(this.loadTimeWeaver, this.beanClassLoader); } @@ -99,7 +95,6 @@ public class AspectJWeavingEnabler this.delegate = delegate; } - @Override public byte[] transform(ClassLoader loader, String className, Class classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws IllegalClassFormatException { diff --git a/spring-context/src/main/java/org/springframework/context/weaving/DefaultContextLoadTimeWeaver.java b/spring-context/src/main/java/org/springframework/context/weaving/DefaultContextLoadTimeWeaver.java index 93f82eefae..b93c8b2df5 100644 --- a/spring-context/src/main/java/org/springframework/context/weaving/DefaultContextLoadTimeWeaver.java +++ b/spring-context/src/main/java/org/springframework/context/weaving/DefaultContextLoadTimeWeaver.java @@ -70,7 +70,6 @@ public class DefaultContextLoadTimeWeaver implements LoadTimeWeaver, BeanClassLo setBeanClassLoader(beanClassLoader); } - @Override public void setBeanClassLoader(ClassLoader classLoader) { LoadTimeWeaver serverSpecificLoadTimeWeaver = createServerSpecificLoadTimeWeaver(classLoader); if (serverSpecificLoadTimeWeaver != null) { @@ -131,7 +130,6 @@ public class DefaultContextLoadTimeWeaver implements LoadTimeWeaver, BeanClassLo return null; } - @Override public void destroy() { if (this.loadTimeWeaver instanceof InstrumentationLoadTimeWeaver) { logger.info("Removing all registered transformers for class loader: " + @@ -141,17 +139,14 @@ public class DefaultContextLoadTimeWeaver implements LoadTimeWeaver, BeanClassLo } - @Override public void addTransformer(ClassFileTransformer transformer) { this.loadTimeWeaver.addTransformer(transformer); } - @Override public ClassLoader getInstrumentableClassLoader() { return this.loadTimeWeaver.getInstrumentableClassLoader(); } - @Override public ClassLoader getThrowawayClassLoader() { return this.loadTimeWeaver.getThrowawayClassLoader(); } diff --git a/spring-context/src/main/java/org/springframework/context/weaving/LoadTimeWeaverAwareProcessor.java b/spring-context/src/main/java/org/springframework/context/weaving/LoadTimeWeaverAwareProcessor.java index 7509b8beff..d2c704f1a5 100644 --- a/spring-context/src/main/java/org/springframework/context/weaving/LoadTimeWeaverAwareProcessor.java +++ b/spring-context/src/main/java/org/springframework/context/weaving/LoadTimeWeaverAwareProcessor.java @@ -81,13 +81,11 @@ public class LoadTimeWeaverAwareProcessor implements BeanPostProcessor, BeanFact } - @Override public void setBeanFactory(BeanFactory beanFactory) { this.beanFactory = beanFactory; } - @Override public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { if (bean instanceof LoadTimeWeaverAware) { LoadTimeWeaver ltw = this.loadTimeWeaver; @@ -102,7 +100,6 @@ public class LoadTimeWeaverAwareProcessor implements BeanPostProcessor, BeanFact return bean; } - @Override public Object postProcessAfterInitialization(Object bean, String name) { return bean; } diff --git a/spring-context/src/main/java/org/springframework/ejb/access/AbstractSlsbInvokerInterceptor.java b/spring-context/src/main/java/org/springframework/ejb/access/AbstractSlsbInvokerInterceptor.java index 77e88a8c42..8a12977c8a 100644 --- a/spring-context/src/main/java/org/springframework/ejb/access/AbstractSlsbInvokerInterceptor.java +++ b/spring-context/src/main/java/org/springframework/ejb/access/AbstractSlsbInvokerInterceptor.java @@ -183,7 +183,6 @@ public abstract class AbstractSlsbInvokerInterceptor extends JndiObjectLocator * Prepares the thread context if necessar, and delegates to * {@link #invokeInContext}. */ - @Override public Object invoke(MethodInvocation invocation) throws Throwable { Context ctx = (this.exposeAccessContext ? getJndiTemplate().getContext() : null); try { diff --git a/spring-context/src/main/java/org/springframework/ejb/access/LocalStatelessSessionProxyFactoryBean.java b/spring-context/src/main/java/org/springframework/ejb/access/LocalStatelessSessionProxyFactoryBean.java index ca4d245ff4..c824d4c917 100644 --- a/spring-context/src/main/java/org/springframework/ejb/access/LocalStatelessSessionProxyFactoryBean.java +++ b/spring-context/src/main/java/org/springframework/ejb/access/LocalStatelessSessionProxyFactoryBean.java @@ -77,7 +77,6 @@ public class LocalStatelessSessionProxyFactoryBean extends LocalSlsbInvokerInter return this.businessInterface; } - @Override public void setBeanClassLoader(ClassLoader classLoader) { this.beanClassLoader = classLoader; } @@ -92,17 +91,14 @@ public class LocalStatelessSessionProxyFactoryBean extends LocalSlsbInvokerInter } - @Override public Object getObject() { return this.proxy; } - @Override public Class getObjectType() { return this.businessInterface; } - @Override public boolean isSingleton() { return true; } diff --git a/spring-context/src/main/java/org/springframework/ejb/access/SimpleRemoteSlsbInvokerInterceptor.java b/spring-context/src/main/java/org/springframework/ejb/access/SimpleRemoteSlsbInvokerInterceptor.java index 89bc055415..ce39ce9a6c 100644 --- a/spring-context/src/main/java/org/springframework/ejb/access/SimpleRemoteSlsbInvokerInterceptor.java +++ b/spring-context/src/main/java/org/springframework/ejb/access/SimpleRemoteSlsbInvokerInterceptor.java @@ -171,7 +171,6 @@ public class SimpleRemoteSlsbInvokerInterceptor extends AbstractRemoteSlsbInvoke /** * Remove the cached session bean instance, if necessary. */ - @Override public void destroy() { if (this.cacheSessionBean) { synchronized (this.beanInstanceMonitor) { diff --git a/spring-context/src/main/java/org/springframework/ejb/access/SimpleRemoteStatelessSessionProxyFactoryBean.java b/spring-context/src/main/java/org/springframework/ejb/access/SimpleRemoteStatelessSessionProxyFactoryBean.java index ff40f71ba4..de6a45b1fe 100644 --- a/spring-context/src/main/java/org/springframework/ejb/access/SimpleRemoteStatelessSessionProxyFactoryBean.java +++ b/spring-context/src/main/java/org/springframework/ejb/access/SimpleRemoteStatelessSessionProxyFactoryBean.java @@ -91,7 +91,6 @@ public class SimpleRemoteStatelessSessionProxyFactoryBean extends SimpleRemoteSl return this.businessInterface; } - @Override public void setBeanClassLoader(ClassLoader classLoader) { this.beanClassLoader = classLoader; } @@ -106,17 +105,14 @@ public class SimpleRemoteStatelessSessionProxyFactoryBean extends SimpleRemoteSl } - @Override public Object getObject() { return this.proxy; } - @Override public Class getObjectType() { return this.businessInterface; } - @Override public boolean isSingleton() { return true; } diff --git a/spring-context/src/main/java/org/springframework/ejb/config/JeeNamespaceHandler.java b/spring-context/src/main/java/org/springframework/ejb/config/JeeNamespaceHandler.java index 0cbdc2ff8d..2e106d8ed0 100644 --- a/spring-context/src/main/java/org/springframework/ejb/config/JeeNamespaceHandler.java +++ b/spring-context/src/main/java/org/springframework/ejb/config/JeeNamespaceHandler.java @@ -27,7 +27,6 @@ import org.springframework.beans.factory.xml.NamespaceHandlerSupport; */ public class JeeNamespaceHandler extends NamespaceHandlerSupport { - @Override public void init() { registerBeanDefinitionParser("jndi-lookup", new JndiLookupBeanDefinitionParser()); registerBeanDefinitionParser("local-slsb", new LocalStatelessSessionBeanDefinitionParser()); diff --git a/spring-context/src/main/java/org/springframework/ejb/support/AbstractEnterpriseBean.java b/spring-context/src/main/java/org/springframework/ejb/support/AbstractEnterpriseBean.java index 729a0a991e..aaa6f7adff 100644 --- a/spring-context/src/main/java/org/springframework/ejb/support/AbstractEnterpriseBean.java +++ b/spring-context/src/main/java/org/springframework/ejb/support/AbstractEnterpriseBean.java @@ -187,7 +187,6 @@ public abstract class AbstractEnterpriseBean implements EnterpriseBean { this.beanFactoryReference = beanFactoryReference; } - @Override public void released() { this.beanFactoryReference.release(); } diff --git a/spring-context/src/main/java/org/springframework/ejb/support/AbstractMessageDrivenBean.java b/spring-context/src/main/java/org/springframework/ejb/support/AbstractMessageDrivenBean.java index 897bec18f8..bbfc158cbb 100644 --- a/spring-context/src/main/java/org/springframework/ejb/support/AbstractMessageDrivenBean.java +++ b/spring-context/src/main/java/org/springframework/ejb/support/AbstractMessageDrivenBean.java @@ -57,7 +57,6 @@ public abstract class AbstractMessageDrivenBean extends AbstractEnterpriseBean * Required lifecycle method. Sets the MessageDriven context. * @param messageDrivenContext MessageDrivenContext */ - @Override public void setMessageDrivenContext(MessageDrivenContext messageDrivenContext) { this.messageDrivenContext = messageDrivenContext; } diff --git a/spring-context/src/main/java/org/springframework/ejb/support/AbstractSessionBean.java b/spring-context/src/main/java/org/springframework/ejb/support/AbstractSessionBean.java index 1a4a065746..5f4e2770b7 100644 --- a/spring-context/src/main/java/org/springframework/ejb/support/AbstractSessionBean.java +++ b/spring-context/src/main/java/org/springframework/ejb/support/AbstractSessionBean.java @@ -42,7 +42,6 @@ public abstract class AbstractSessionBean extends AbstractEnterpriseBean impleme * Set the session context for this EJB. *

When overriding this method, be sure to invoke this form of it first. */ - @Override public void setSessionContext(SessionContext sessionContext) { this.sessionContext = sessionContext; } @@ -51,7 +50,6 @@ public abstract class AbstractSessionBean extends AbstractEnterpriseBean impleme * Convenience method for subclasses, returning the EJB session context * saved on initialization ({@link #setSessionContext}). */ - @Override public final SessionContext getSessionContext() { return this.sessionContext; } diff --git a/spring-context/src/main/java/org/springframework/ejb/support/AbstractStatelessSessionBean.java b/spring-context/src/main/java/org/springframework/ejb/support/AbstractStatelessSessionBean.java index 554b5b6405..ee013df6cb 100644 --- a/spring-context/src/main/java/org/springframework/ejb/support/AbstractStatelessSessionBean.java +++ b/spring-context/src/main/java/org/springframework/ejb/support/AbstractStatelessSessionBean.java @@ -85,7 +85,6 @@ public abstract class AbstractStatelessSessionBean extends AbstractSessionBean { * This method always throws an exception, as it should not be invoked by the EJB container. * @see javax.ejb.SessionBean#ejbActivate() */ - @Override public void ejbActivate() throws EJBException { throw new IllegalStateException("ejbActivate must not be invoked on a stateless session bean"); } @@ -94,7 +93,6 @@ public abstract class AbstractStatelessSessionBean extends AbstractSessionBean { * This method always throws an exception, as it should not be invoked by the EJB container. * @see javax.ejb.SessionBean#ejbPassivate() */ - @Override public void ejbPassivate() throws EJBException { throw new IllegalStateException("ejbPassivate must not be invoked on a stateless session bean"); } diff --git a/spring-context/src/main/java/org/springframework/format/datetime/DateFormatter.java b/spring-context/src/main/java/org/springframework/format/datetime/DateFormatter.java index 15b913b3ad..365800aba8 100644 --- a/spring-context/src/main/java/org/springframework/format/datetime/DateFormatter.java +++ b/spring-context/src/main/java/org/springframework/format/datetime/DateFormatter.java @@ -145,12 +145,10 @@ public class DateFormatter implements Formatter { } - @Override public String print(Date date, Locale locale) { return getDateFormat(locale).format(date); } - @Override public Date parse(String text, Locale locale) throws ParseException { return getDateFormat(locale).parse(text); } diff --git a/spring-context/src/main/java/org/springframework/format/datetime/DateFormatterRegistrar.java b/spring-context/src/main/java/org/springframework/format/datetime/DateFormatterRegistrar.java index e9591ac152..eb413a6ea7 100644 --- a/spring-context/src/main/java/org/springframework/format/datetime/DateFormatterRegistrar.java +++ b/spring-context/src/main/java/org/springframework/format/datetime/DateFormatterRegistrar.java @@ -43,7 +43,6 @@ public class DateFormatterRegistrar implements FormatterRegistrar { private DateFormatter dateFormatter = new DateFormatter(); - @Override public void registerFormatters(FormatterRegistry registry) { addDateConverters(registry); registry.addFormatter(dateFormatter); @@ -77,7 +76,6 @@ public class DateFormatterRegistrar implements FormatterRegistrar { private static class DateToLongConverter implements Converter { - @Override public Long convert(Date source) { return source.getTime(); } @@ -85,7 +83,6 @@ public class DateFormatterRegistrar implements FormatterRegistrar { private static class DateToCalendarConverter implements Converter { - @Override public Calendar convert(Date source) { Calendar calendar = Calendar.getInstance(); calendar.setTime(source); @@ -95,7 +92,6 @@ public class DateFormatterRegistrar implements FormatterRegistrar { private static class CalendarToDateConverter implements Converter { - @Override public Date convert(Calendar source) { return source.getTime(); } @@ -103,7 +99,6 @@ public class DateFormatterRegistrar implements FormatterRegistrar { private static class CalendarToLongConverter implements Converter { - @Override public Long convert(Calendar source) { return source.getTime().getTime(); } @@ -111,7 +106,6 @@ public class DateFormatterRegistrar implements FormatterRegistrar { private static class LongToDateConverter implements Converter { - @Override public Date convert(Long source) { return new Date(source); } @@ -122,7 +116,6 @@ public class DateFormatterRegistrar implements FormatterRegistrar { private DateToCalendarConverter dateToCalendarConverter = new DateToCalendarConverter(); - @Override public Calendar convert(Long source) { return dateToCalendarConverter.convert(new Date(source)); } diff --git a/spring-context/src/main/java/org/springframework/format/datetime/DateTimeFormatAnnotationFormatterFactory.java b/spring-context/src/main/java/org/springframework/format/datetime/DateTimeFormatAnnotationFormatterFactory.java index bd7928ba55..93efaf43a8 100644 --- a/spring-context/src/main/java/org/springframework/format/datetime/DateTimeFormatAnnotationFormatterFactory.java +++ b/spring-context/src/main/java/org/springframework/format/datetime/DateTimeFormatAnnotationFormatterFactory.java @@ -55,22 +55,18 @@ public class DateTimeFormatAnnotationFormatterFactory implements private StringValueResolver embeddedValueResolver; - @Override public void setEmbeddedValueResolver(StringValueResolver resolver) { this.embeddedValueResolver = resolver; } - @Override public Set> getFieldTypes() { return FIELD_TYPES; } - @Override public Printer getPrinter(DateTimeFormat annotation, Class fieldType) { return getFormatter(annotation, fieldType); } - @Override public Parser getParser(DateTimeFormat annotation, Class fieldType) { return getFormatter(annotation, fieldType); } diff --git a/spring-context/src/main/java/org/springframework/format/datetime/joda/DateTimeFormatterFactoryBean.java b/spring-context/src/main/java/org/springframework/format/datetime/joda/DateTimeFormatterFactoryBean.java index b7010b8924..8c12e4b317 100644 --- a/spring-context/src/main/java/org/springframework/format/datetime/joda/DateTimeFormatterFactoryBean.java +++ b/spring-context/src/main/java/org/springframework/format/datetime/joda/DateTimeFormatterFactoryBean.java @@ -39,22 +39,18 @@ public class DateTimeFormatterFactoryBean extends DateTimeFormatterFactory private DateTimeFormatter dateTimeFormatter; - @Override public void afterPropertiesSet() { this.dateTimeFormatter = createDateTimeFormatter(); } - @Override public DateTimeFormatter getObject() { return this.dateTimeFormatter; } - @Override public Class getObjectType() { return DateTimeFormatter.class; } - @Override public boolean isSingleton() { return true; } diff --git a/spring-context/src/main/java/org/springframework/format/datetime/joda/DateTimeParser.java b/spring-context/src/main/java/org/springframework/format/datetime/joda/DateTimeParser.java index 8171ee34c2..92285dffb4 100644 --- a/spring-context/src/main/java/org/springframework/format/datetime/joda/DateTimeParser.java +++ b/spring-context/src/main/java/org/springframework/format/datetime/joda/DateTimeParser.java @@ -42,7 +42,6 @@ public final class DateTimeParser implements Parser { this.formatter = formatter; } - @Override public DateTime parse(String text, Locale locale) throws ParseException { return JodaTimeContextHolder.getFormatter(this.formatter, locale).parseDateTime(text); } diff --git a/spring-context/src/main/java/org/springframework/format/datetime/joda/JodaDateTimeFormatAnnotationFormatterFactory.java b/spring-context/src/main/java/org/springframework/format/datetime/joda/JodaDateTimeFormatAnnotationFormatterFactory.java index f161939942..2c5638c26f 100644 --- a/spring-context/src/main/java/org/springframework/format/datetime/joda/JodaDateTimeFormatAnnotationFormatterFactory.java +++ b/spring-context/src/main/java/org/springframework/format/datetime/joda/JodaDateTimeFormatAnnotationFormatterFactory.java @@ -71,12 +71,10 @@ public class JodaDateTimeFormatAnnotationFormatterFactory private StringValueResolver embeddedValueResolver; - @Override public final Set> getFieldTypes() { return FIELD_TYPES; } - @Override public void setEmbeddedValueResolver(StringValueResolver resolver) { this.embeddedValueResolver = resolver; } @@ -85,7 +83,6 @@ public class JodaDateTimeFormatAnnotationFormatterFactory return (this.embeddedValueResolver != null ? this.embeddedValueResolver.resolveStringValue(value) : value); } - @Override public Printer getPrinter(DateTimeFormat annotation, Class fieldType) { DateTimeFormatter formatter = getFormatter(annotation, fieldType); if (ReadableInstant.class.isAssignableFrom(fieldType)) { @@ -102,7 +99,6 @@ public class JodaDateTimeFormatAnnotationFormatterFactory return new MillisecondInstantPrinter(formatter); } - @Override public Parser getParser(DateTimeFormat annotation, Class fieldType) { return new DateTimeParser(getFormatter(annotation, fieldType)); } diff --git a/spring-context/src/main/java/org/springframework/format/datetime/joda/JodaTimeConverters.java b/spring-context/src/main/java/org/springframework/format/datetime/joda/JodaTimeConverters.java index ef214dccb8..6943ad4241 100644 --- a/spring-context/src/main/java/org/springframework/format/datetime/joda/JodaTimeConverters.java +++ b/spring-context/src/main/java/org/springframework/format/datetime/joda/JodaTimeConverters.java @@ -63,7 +63,6 @@ final class JodaTimeConverters { * @see DateTimeParser **/ private static class DateTimeToLocalDateConverter implements Converter { - @Override public LocalDate convert(DateTime source) { return source.toLocalDate(); } @@ -74,7 +73,6 @@ final class JodaTimeConverters { * @see DateTimeParser */ private static class DateTimeToLocalTimeConverter implements Converter { - @Override public LocalTime convert(DateTime source) { return source.toLocalTime(); } @@ -85,7 +83,6 @@ final class JodaTimeConverters { * @see DateTimeParser */ private static class DateTimeToLocalDateTimeConverter implements Converter { - @Override public LocalDateTime convert(DateTime source) { return source.toLocalDateTime(); } @@ -96,7 +93,6 @@ final class JodaTimeConverters { * @see DateTimeParser */ private static class DateTimeToDateMidnightConverter implements Converter { - @Override public DateMidnight convert(DateTime source) { return source.toDateMidnight(); } @@ -107,7 +103,6 @@ final class JodaTimeConverters { * @see DateTimeParser */ private static class DateTimeToInstantConverter implements Converter { - @Override public Instant convert(DateTime source) { return source.toInstant(); } @@ -118,7 +113,6 @@ final class JodaTimeConverters { * @see DateTimeParser */ private static class DateTimeToMutableDateTimeConverter implements Converter { - @Override public MutableDateTime convert(DateTime source) { return source.toMutableDateTime(); } @@ -129,7 +123,6 @@ final class JodaTimeConverters { * @see DateTimeParser */ private static class DateTimeToDateConverter implements Converter { - @Override public Date convert(DateTime source) { return source.toDate(); } @@ -140,7 +133,6 @@ final class JodaTimeConverters { * @see DateTimeParser */ private static class DateTimeToCalendarConverter implements Converter { - @Override public Calendar convert(DateTime source) { return source.toGregorianCalendar(); } @@ -151,7 +143,6 @@ final class JodaTimeConverters { * @see DateTimeParser */ private static class DateTimeToLongConverter implements Converter { - @Override public Long convert(DateTime source) { return source.getMillis(); } @@ -163,7 +154,6 @@ final class JodaTimeConverters { * @see JodaDateTimeFormatAnnotationFormatterFactory */ private static class CalendarToReadableInstantConverter implements Converter { - @Override public ReadableInstant convert(Calendar source) { return new DateTime(source); } diff --git a/spring-context/src/main/java/org/springframework/format/datetime/joda/JodaTimeFormatterRegistrar.java b/spring-context/src/main/java/org/springframework/format/datetime/joda/JodaTimeFormatterRegistrar.java index fbf01be973..51d9f9684b 100644 --- a/spring-context/src/main/java/org/springframework/format/datetime/joda/JodaTimeFormatterRegistrar.java +++ b/spring-context/src/main/java/org/springframework/format/datetime/joda/JodaTimeFormatterRegistrar.java @@ -149,7 +149,6 @@ public class JodaTimeFormatterRegistrar implements FormatterRegistrar { this.formatters.put(Type.DATE_TIME, formatter); } - @Override public void registerFormatters(FormatterRegistry registry) { JodaTimeConverters.registerConverters(registry); diff --git a/spring-context/src/main/java/org/springframework/format/datetime/joda/MillisecondInstantPrinter.java b/spring-context/src/main/java/org/springframework/format/datetime/joda/MillisecondInstantPrinter.java index 325d3029e7..1cca5b6b73 100644 --- a/spring-context/src/main/java/org/springframework/format/datetime/joda/MillisecondInstantPrinter.java +++ b/spring-context/src/main/java/org/springframework/format/datetime/joda/MillisecondInstantPrinter.java @@ -40,7 +40,6 @@ public final class MillisecondInstantPrinter implements Printer { this.formatter = formatter; } - @Override public String print(Long instant, Locale locale) { return JodaTimeContextHolder.getFormatter(this.formatter, locale).print(instant); } diff --git a/spring-context/src/main/java/org/springframework/format/datetime/joda/ReadableInstantPrinter.java b/spring-context/src/main/java/org/springframework/format/datetime/joda/ReadableInstantPrinter.java index 40a402d383..a71834ff62 100644 --- a/spring-context/src/main/java/org/springframework/format/datetime/joda/ReadableInstantPrinter.java +++ b/spring-context/src/main/java/org/springframework/format/datetime/joda/ReadableInstantPrinter.java @@ -40,7 +40,6 @@ public final class ReadableInstantPrinter implements Printer { this.formatter = formatter; } - @Override public String print(ReadableInstant instant, Locale locale) { return JodaTimeContextHolder.getFormatter(this.formatter, locale).print(instant); } diff --git a/spring-context/src/main/java/org/springframework/format/datetime/joda/ReadablePartialPrinter.java b/spring-context/src/main/java/org/springframework/format/datetime/joda/ReadablePartialPrinter.java index a8b8981f47..bb78ec7ba1 100644 --- a/spring-context/src/main/java/org/springframework/format/datetime/joda/ReadablePartialPrinter.java +++ b/spring-context/src/main/java/org/springframework/format/datetime/joda/ReadablePartialPrinter.java @@ -41,7 +41,6 @@ public final class ReadablePartialPrinter implements Printer { this.formatter = formatter; } - @Override public String print(ReadablePartial partial, Locale locale) { return JodaTimeContextHolder.getFormatter(this.formatter, locale).print(partial); } diff --git a/spring-context/src/main/java/org/springframework/format/number/AbstractNumberFormatter.java b/spring-context/src/main/java/org/springframework/format/number/AbstractNumberFormatter.java index aa9e85177a..da34f935bc 100644 --- a/spring-context/src/main/java/org/springframework/format/number/AbstractNumberFormatter.java +++ b/spring-context/src/main/java/org/springframework/format/number/AbstractNumberFormatter.java @@ -44,12 +44,10 @@ public abstract class AbstractNumberFormatter implements Formatter { this.lenient = lenient; } - @Override public String print(Number number, Locale locale) { return getNumberFormat(locale).format(number); } - @Override public Number parse(String text, Locale locale) throws ParseException { NumberFormat format = getNumberFormat(locale); ParsePosition position = new ParsePosition(0); diff --git a/spring-context/src/main/java/org/springframework/format/number/CurrencyFormatter.java b/spring-context/src/main/java/org/springframework/format/number/CurrencyFormatter.java index 739f9c4343..4d2bf8e9f5 100644 --- a/spring-context/src/main/java/org/springframework/format/number/CurrencyFormatter.java +++ b/spring-context/src/main/java/org/springframework/format/number/CurrencyFormatter.java @@ -75,7 +75,6 @@ public class CurrencyFormatter extends AbstractNumberFormatter { } - @Override public BigDecimal parse(String text, Locale locale) throws ParseException { BigDecimal decimal = (BigDecimal) super.parse(text, locale); if (decimal != null) { @@ -89,7 +88,6 @@ public class CurrencyFormatter extends AbstractNumberFormatter { return decimal; } - @Override protected NumberFormat getNumberFormat(Locale locale) { DecimalFormat format = (DecimalFormat) NumberFormat.getCurrencyInstance(locale); format.setParseBigDecimal(true); diff --git a/spring-context/src/main/java/org/springframework/format/number/NumberFormatAnnotationFormatterFactory.java b/spring-context/src/main/java/org/springframework/format/number/NumberFormatAnnotationFormatterFactory.java index a20cf4120a..2108d9f5ae 100644 --- a/spring-context/src/main/java/org/springframework/format/number/NumberFormatAnnotationFormatterFactory.java +++ b/spring-context/src/main/java/org/springframework/format/number/NumberFormatAnnotationFormatterFactory.java @@ -59,13 +59,11 @@ public class NumberFormatAnnotationFormatterFactory this.fieldTypes = Collections.unmodifiableSet(rawFieldTypes); } - @Override public final Set> getFieldTypes() { return this.fieldTypes; } - @Override public void setEmbeddedValueResolver(StringValueResolver resolver) { this.embeddedValueResolver = resolver; } @@ -75,12 +73,10 @@ public class NumberFormatAnnotationFormatterFactory } - @Override public Printer getPrinter(NumberFormat annotation, Class fieldType) { return configureFormatterFrom(annotation); } - @Override public Parser getParser(NumberFormat annotation, Class fieldType) { return configureFormatterFrom(annotation); } diff --git a/spring-context/src/main/java/org/springframework/format/number/NumberFormatter.java b/spring-context/src/main/java/org/springframework/format/number/NumberFormatter.java index 5111c17bab..dbec6ba2a7 100644 --- a/spring-context/src/main/java/org/springframework/format/number/NumberFormatter.java +++ b/spring-context/src/main/java/org/springframework/format/number/NumberFormatter.java @@ -65,7 +65,6 @@ public class NumberFormatter extends AbstractNumberFormatter { } - @Override public NumberFormat getNumberFormat(Locale locale) { NumberFormat format = NumberFormat.getInstance(locale); if (!(format instanceof DecimalFormat)) { diff --git a/spring-context/src/main/java/org/springframework/format/number/PercentFormatter.java b/spring-context/src/main/java/org/springframework/format/number/PercentFormatter.java index 8058b020eb..9e70fd76df 100644 --- a/spring-context/src/main/java/org/springframework/format/number/PercentFormatter.java +++ b/spring-context/src/main/java/org/springframework/format/number/PercentFormatter.java @@ -34,7 +34,6 @@ import java.util.Locale; */ public class PercentFormatter extends AbstractNumberFormatter { - @Override protected NumberFormat getNumberFormat(Locale locale) { NumberFormat format = NumberFormat.getPercentInstance(locale); if (format instanceof DecimalFormat) { diff --git a/spring-context/src/main/java/org/springframework/format/support/FormattingConversionService.java b/spring-context/src/main/java/org/springframework/format/support/FormattingConversionService.java index 4346e46ef9..345131a5aa 100644 --- a/spring-context/src/main/java/org/springframework/format/support/FormattingConversionService.java +++ b/spring-context/src/main/java/org/springframework/format/support/FormattingConversionService.java @@ -59,13 +59,11 @@ public class FormattingConversionService extends GenericConversionService new ConcurrentHashMap(64); - @Override public void setEmbeddedValueResolver(StringValueResolver resolver) { this.embeddedValueResolver = resolver; } - @Override public void addFormatter(Formatter formatter) { Class fieldType = GenericTypeResolver.resolveTypeArgument(formatter.getClass(), Formatter.class); if (fieldType == null) { @@ -75,19 +73,16 @@ public class FormattingConversionService extends GenericConversionService addFormatterForFieldType(fieldType, formatter); } - @Override public void addFormatterForFieldType(Class fieldType, Formatter formatter) { addConverter(new PrinterConverter(fieldType, formatter, this)); addConverter(new ParserConverter(fieldType, formatter, this)); } - @Override public void addFormatterForFieldType(Class fieldType, Printer printer, Parser parser) { addConverter(new PrinterConverter(fieldType, printer, this)); addConverter(new ParserConverter(fieldType, parser, this)); } - @Override @SuppressWarnings({ "unchecked", "rawtypes" }) public void addFormatterForFieldAnnotation(AnnotationFormatterFactory annotationFormatterFactory) { final Class annotationType = (Class) @@ -125,12 +120,10 @@ public class FormattingConversionService extends GenericConversionService this.conversionService = conversionService; } - @Override public Set getConvertibleTypes() { return Collections.singleton(new ConvertiblePair(this.fieldType, String.class)); } - @Override @SuppressWarnings("unchecked") public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) { if (source == null) { @@ -166,12 +159,10 @@ public class FormattingConversionService extends GenericConversionService this.conversionService = conversionService; } - @Override public Set getConvertibleTypes() { return Collections.singleton(new ConvertiblePair(String.class, this.fieldType)); } - @Override public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) { String text = (String) source; if (!StringUtils.hasText(text)) { @@ -215,17 +206,14 @@ public class FormattingConversionService extends GenericConversionService this.fieldType = fieldType; } - @Override public Set getConvertibleTypes() { return Collections.singleton(new ConvertiblePair(fieldType, String.class)); } - @Override public boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType) { return sourceType.hasAnnotation(annotationType); } - @Override @SuppressWarnings("unchecked") public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) { AnnotationConverterKey converterKey = @@ -262,17 +250,14 @@ public class FormattingConversionService extends GenericConversionService this.fieldType = fieldType; } - @Override public Set getConvertibleTypes() { return Collections.singleton(new ConvertiblePair(String.class, fieldType)); } - @Override public boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType) { return targetType.hasAnnotation(annotationType); } - @Override @SuppressWarnings("unchecked") public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) { AnnotationConverterKey converterKey = diff --git a/spring-context/src/main/java/org/springframework/format/support/FormattingConversionServiceFactoryBean.java b/spring-context/src/main/java/org/springframework/format/support/FormattingConversionServiceFactoryBean.java index 8a464ce05e..2dc19dda74 100644 --- a/spring-context/src/main/java/org/springframework/format/support/FormattingConversionServiceFactoryBean.java +++ b/spring-context/src/main/java/org/springframework/format/support/FormattingConversionServiceFactoryBean.java @@ -124,13 +124,11 @@ public class FormattingConversionServiceFactoryBean this.registerDefaultFormatters = registerDefaultFormatters; } - @Override public void setEmbeddedValueResolver(StringValueResolver embeddedValueResolver) { this.embeddedValueResolver = embeddedValueResolver; } - @Override public void afterPropertiesSet() { this.conversionService = new DefaultFormattingConversionService(this.embeddedValueResolver, this.registerDefaultFormatters); ConversionServiceFactory.registerConverters(this.converters, this.conversionService); @@ -173,17 +171,14 @@ public class FormattingConversionServiceFactoryBean } - @Override public FormattingConversionService getObject() { return this.conversionService; } - @Override public Class getObjectType() { return FormattingConversionService.class; } - @Override public boolean isSingleton() { return true; } diff --git a/spring-context/src/main/java/org/springframework/instrument/classloading/InstrumentationLoadTimeWeaver.java b/spring-context/src/main/java/org/springframework/instrument/classloading/InstrumentationLoadTimeWeaver.java index 54a3571064..94316c8f6d 100644 --- a/spring-context/src/main/java/org/springframework/instrument/classloading/InstrumentationLoadTimeWeaver.java +++ b/spring-context/src/main/java/org/springframework/instrument/classloading/InstrumentationLoadTimeWeaver.java @@ -78,7 +78,6 @@ public class InstrumentationLoadTimeWeaver implements LoadTimeWeaver { } - @Override public void addTransformer(ClassFileTransformer transformer) { Assert.notNull(transformer, "Transformer must not be null"); FilteringClassFileTransformer actualTransformer = @@ -98,7 +97,6 @@ public class InstrumentationLoadTimeWeaver implements LoadTimeWeaver { * JVM in this way, so the instrumentable class loader will always be the * current loader. */ - @Override public ClassLoader getInstrumentableClassLoader() { return this.classLoader; } @@ -106,7 +104,6 @@ public class InstrumentationLoadTimeWeaver implements LoadTimeWeaver { /** * This implementation always returns a {@link SimpleThrowawayClassLoader}. */ - @Override public ClassLoader getThrowawayClassLoader() { return new SimpleThrowawayClassLoader(getInstrumentableClassLoader()); } @@ -174,7 +171,6 @@ public class InstrumentationLoadTimeWeaver implements LoadTimeWeaver { this.targetClassLoader = targetClassLoader; } - @Override public byte[] transform(ClassLoader loader, String className, Class classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws IllegalClassFormatException { diff --git a/spring-context/src/main/java/org/springframework/instrument/classloading/ReflectiveLoadTimeWeaver.java b/spring-context/src/main/java/org/springframework/instrument/classloading/ReflectiveLoadTimeWeaver.java index 646066db59..86907d33dd 100644 --- a/spring-context/src/main/java/org/springframework/instrument/classloading/ReflectiveLoadTimeWeaver.java +++ b/spring-context/src/main/java/org/springframework/instrument/classloading/ReflectiveLoadTimeWeaver.java @@ -117,18 +117,15 @@ public class ReflectiveLoadTimeWeaver implements LoadTimeWeaver { } - @Override public void addTransformer(ClassFileTransformer transformer) { Assert.notNull(transformer, "Transformer must not be null"); ReflectionUtils.invokeMethod(this.addTransformerMethod, this.classLoader, new Object[] {transformer}); } - @Override public ClassLoader getInstrumentableClassLoader() { return this.classLoader; } - @Override public ClassLoader getThrowawayClassLoader() { if (this.getThrowawayClassLoaderMethod != null) { return (ClassLoader) ReflectionUtils.invokeMethod(this.getThrowawayClassLoaderMethod, this.classLoader, diff --git a/spring-context/src/main/java/org/springframework/instrument/classloading/ResourceOverridingShadowingClassLoader.java b/spring-context/src/main/java/org/springframework/instrument/classloading/ResourceOverridingShadowingClassLoader.java index 47bb8dc30b..3d15f1035c 100644 --- a/spring-context/src/main/java/org/springframework/instrument/classloading/ResourceOverridingShadowingClassLoader.java +++ b/spring-context/src/main/java/org/springframework/instrument/classloading/ResourceOverridingShadowingClassLoader.java @@ -36,11 +36,9 @@ import org.springframework.util.Assert; public class ResourceOverridingShadowingClassLoader extends ShadowingClassLoader { private static final Enumeration EMPTY_URL_ENUMERATION = new Enumeration() { - @Override public boolean hasMoreElements() { return false; } - @Override public URL nextElement() { throw new UnsupportedOperationException("Should not be called. I am empty."); } diff --git a/spring-context/src/main/java/org/springframework/instrument/classloading/SimpleLoadTimeWeaver.java b/spring-context/src/main/java/org/springframework/instrument/classloading/SimpleLoadTimeWeaver.java index d95b3d9821..a421f0418e 100644 --- a/spring-context/src/main/java/org/springframework/instrument/classloading/SimpleLoadTimeWeaver.java +++ b/spring-context/src/main/java/org/springframework/instrument/classloading/SimpleLoadTimeWeaver.java @@ -62,12 +62,10 @@ public class SimpleLoadTimeWeaver implements LoadTimeWeaver { } - @Override public void addTransformer(ClassFileTransformer transformer) { this.classLoader.addTransformer(transformer); } - @Override public ClassLoader getInstrumentableClassLoader() { return this.classLoader; } @@ -75,7 +73,6 @@ public class SimpleLoadTimeWeaver implements LoadTimeWeaver { /** * This implementation builds a {@link SimpleThrowawayClassLoader}. */ - @Override public ClassLoader getThrowawayClassLoader() { return new SimpleThrowawayClassLoader(getInstrumentableClassLoader()); } diff --git a/spring-context/src/main/java/org/springframework/instrument/classloading/glassfish/ClassTransformerAdapter.java b/spring-context/src/main/java/org/springframework/instrument/classloading/glassfish/ClassTransformerAdapter.java index 67e33d6902..2adca687e1 100644 --- a/spring-context/src/main/java/org/springframework/instrument/classloading/glassfish/ClassTransformerAdapter.java +++ b/spring-context/src/main/java/org/springframework/instrument/classloading/glassfish/ClassTransformerAdapter.java @@ -42,7 +42,6 @@ class ClassTransformerAdapter implements ClassTransformer { this.classFileTransformer = classFileTransformer; } - @Override public byte[] transform(ClassLoader loader, String className, Class classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws IllegalClassFormatException { diff --git a/spring-context/src/main/java/org/springframework/instrument/classloading/glassfish/GlassFishLoadTimeWeaver.java b/spring-context/src/main/java/org/springframework/instrument/classloading/glassfish/GlassFishLoadTimeWeaver.java index 205ed59c2a..eb28f67ddf 100644 --- a/spring-context/src/main/java/org/springframework/instrument/classloading/glassfish/GlassFishLoadTimeWeaver.java +++ b/spring-context/src/main/java/org/springframework/instrument/classloading/glassfish/GlassFishLoadTimeWeaver.java @@ -59,17 +59,14 @@ public class GlassFishLoadTimeWeaver implements LoadTimeWeaver { } - @Override public void addTransformer(ClassFileTransformer transformer) { this.classLoader.addTransformer(transformer); } - @Override public ClassLoader getInstrumentableClassLoader() { return this.classLoader.getClassLoader(); } - @Override public ClassLoader getThrowawayClassLoader() { return this.classLoader.getThrowawayClassLoader(); } diff --git a/spring-context/src/main/java/org/springframework/instrument/classloading/jboss/JBossLoadTimeWeaver.java b/spring-context/src/main/java/org/springframework/instrument/classloading/jboss/JBossLoadTimeWeaver.java index 939114249f..260d1d4885 100644 --- a/spring-context/src/main/java/org/springframework/instrument/classloading/jboss/JBossLoadTimeWeaver.java +++ b/spring-context/src/main/java/org/springframework/instrument/classloading/jboss/JBossLoadTimeWeaver.java @@ -72,17 +72,14 @@ public class JBossLoadTimeWeaver implements LoadTimeWeaver { } - @Override public void addTransformer(ClassFileTransformer transformer) { this.adapter.addTransformer(transformer); } - @Override public ClassLoader getInstrumentableClassLoader() { return this.adapter.getInstrumentableClassLoader(); } - @Override public ClassLoader getThrowawayClassLoader() { return new SimpleThrowawayClassLoader(getInstrumentableClassLoader()); } diff --git a/spring-context/src/main/java/org/springframework/instrument/classloading/jboss/JBossMCAdapter.java b/spring-context/src/main/java/org/springframework/instrument/classloading/jboss/JBossMCAdapter.java index fe262717be..a128608d84 100644 --- a/spring-context/src/main/java/org/springframework/instrument/classloading/jboss/JBossMCAdapter.java +++ b/spring-context/src/main/java/org/springframework/instrument/classloading/jboss/JBossMCAdapter.java @@ -127,7 +127,6 @@ class JBossMCAdapter implements JBossClassLoaderAdapter { } } - @Override public void addTransformer(ClassFileTransformer transformer) { InvocationHandler adapter = new JBossMCTranslatorAdapter(transformer); Object adapterInstance = Proxy.newProxyInstance(this.translatorClass.getClassLoader(), @@ -140,7 +139,6 @@ class JBossMCAdapter implements JBossClassLoaderAdapter { } } - @Override public ClassLoader getInstrumentableClassLoader() { return classLoader; } diff --git a/spring-context/src/main/java/org/springframework/instrument/classloading/jboss/JBossMCTranslatorAdapter.java b/spring-context/src/main/java/org/springframework/instrument/classloading/jboss/JBossMCTranslatorAdapter.java index 220d6ceb3d..8325e1b798 100644 --- a/spring-context/src/main/java/org/springframework/instrument/classloading/jboss/JBossMCTranslatorAdapter.java +++ b/spring-context/src/main/java/org/springframework/instrument/classloading/jboss/JBossMCTranslatorAdapter.java @@ -43,7 +43,6 @@ class JBossMCTranslatorAdapter implements InvocationHandler { this.transformer = transformer; } - @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { String name = method.getName(); diff --git a/spring-context/src/main/java/org/springframework/instrument/classloading/jboss/JBossModulesAdapter.java b/spring-context/src/main/java/org/springframework/instrument/classloading/jboss/JBossModulesAdapter.java index 9faced8dee..75c250078f 100644 --- a/spring-context/src/main/java/org/springframework/instrument/classloading/jboss/JBossModulesAdapter.java +++ b/spring-context/src/main/java/org/springframework/instrument/classloading/jboss/JBossModulesAdapter.java @@ -57,7 +57,6 @@ class JBossModulesAdapter implements JBossClassLoaderAdapter { } } - @Override public void addTransformer(ClassFileTransformer transformer) { try { addTransformer.invoke(delegatingTransformer, transformer); @@ -66,7 +65,6 @@ class JBossModulesAdapter implements JBossClassLoaderAdapter { } } - @Override public ClassLoader getInstrumentableClassLoader() { return classLoader; } diff --git a/spring-context/src/main/java/org/springframework/instrument/classloading/oc4j/OC4JClassPreprocessorAdapter.java b/spring-context/src/main/java/org/springframework/instrument/classloading/oc4j/OC4JClassPreprocessorAdapter.java index 725aa5529b..dce5761898 100644 --- a/spring-context/src/main/java/org/springframework/instrument/classloading/oc4j/OC4JClassPreprocessorAdapter.java +++ b/spring-context/src/main/java/org/springframework/instrument/classloading/oc4j/OC4JClassPreprocessorAdapter.java @@ -43,7 +43,6 @@ class OC4JClassPreprocessorAdapter implements InvocationHandler { this.transformer = transformer; } - @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { String name = method.getName(); diff --git a/spring-context/src/main/java/org/springframework/instrument/classloading/oc4j/OC4JLoadTimeWeaver.java b/spring-context/src/main/java/org/springframework/instrument/classloading/oc4j/OC4JLoadTimeWeaver.java index 761629a6b9..1e71d0cdbb 100644 --- a/spring-context/src/main/java/org/springframework/instrument/classloading/oc4j/OC4JLoadTimeWeaver.java +++ b/spring-context/src/main/java/org/springframework/instrument/classloading/oc4j/OC4JLoadTimeWeaver.java @@ -62,7 +62,6 @@ public class OC4JLoadTimeWeaver implements LoadTimeWeaver { } - @Override public void addTransformer(ClassFileTransformer transformer) { Assert.notNull(transformer, "Transformer must not be null"); // Since OC4J 10.1.3's PolicyClassLoader is going to be removed, @@ -70,12 +69,10 @@ public class OC4JLoadTimeWeaver implements LoadTimeWeaver { this.classLoader.addTransformer(transformer); } - @Override public ClassLoader getInstrumentableClassLoader() { return this.classLoader.getClassLoader(); } - @Override public ClassLoader getThrowawayClassLoader() { return this.classLoader.getThrowawayClassLoader(); } diff --git a/spring-context/src/main/java/org/springframework/instrument/classloading/weblogic/WebLogicClassPreProcessorAdapter.java b/spring-context/src/main/java/org/springframework/instrument/classloading/weblogic/WebLogicClassPreProcessorAdapter.java index e0c2f310b0..aede3544be 100644 --- a/spring-context/src/main/java/org/springframework/instrument/classloading/weblogic/WebLogicClassPreProcessorAdapter.java +++ b/spring-context/src/main/java/org/springframework/instrument/classloading/weblogic/WebLogicClassPreProcessorAdapter.java @@ -49,7 +49,6 @@ class WebLogicClassPreProcessorAdapter implements InvocationHandler { this.loader = loader; } - @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { String name = method.getName(); diff --git a/spring-context/src/main/java/org/springframework/instrument/classloading/weblogic/WebLogicLoadTimeWeaver.java b/spring-context/src/main/java/org/springframework/instrument/classloading/weblogic/WebLogicLoadTimeWeaver.java index 087b47d735..6662830c73 100644 --- a/spring-context/src/main/java/org/springframework/instrument/classloading/weblogic/WebLogicLoadTimeWeaver.java +++ b/spring-context/src/main/java/org/springframework/instrument/classloading/weblogic/WebLogicLoadTimeWeaver.java @@ -58,17 +58,14 @@ public class WebLogicLoadTimeWeaver implements LoadTimeWeaver { } - @Override public void addTransformer(ClassFileTransformer transformer) { this.classLoader.addTransformer(transformer); } - @Override public ClassLoader getInstrumentableClassLoader() { return this.classLoader.getClassLoader(); } - @Override public ClassLoader getThrowawayClassLoader() { return this.classLoader.getThrowawayClassLoader(); } diff --git a/spring-context/src/main/java/org/springframework/instrument/classloading/websphere/WebSphereClassPreDefinePlugin.java b/spring-context/src/main/java/org/springframework/instrument/classloading/websphere/WebSphereClassPreDefinePlugin.java index 5662febce0..c95684c4d6 100644 --- a/spring-context/src/main/java/org/springframework/instrument/classloading/websphere/WebSphereClassPreDefinePlugin.java +++ b/spring-context/src/main/java/org/springframework/instrument/classloading/websphere/WebSphereClassPreDefinePlugin.java @@ -58,7 +58,6 @@ class WebSphereClassPreDefinePlugin implements InvocationHandler { } - @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { String name = method.getName(); if ("equals".equals(name)) { diff --git a/spring-context/src/main/java/org/springframework/instrument/classloading/websphere/WebSphereLoadTimeWeaver.java b/spring-context/src/main/java/org/springframework/instrument/classloading/websphere/WebSphereLoadTimeWeaver.java index 55c6f863ef..3312c37778 100644 --- a/spring-context/src/main/java/org/springframework/instrument/classloading/websphere/WebSphereLoadTimeWeaver.java +++ b/spring-context/src/main/java/org/springframework/instrument/classloading/websphere/WebSphereLoadTimeWeaver.java @@ -55,17 +55,14 @@ public class WebSphereLoadTimeWeaver implements LoadTimeWeaver { } - @Override public void addTransformer(ClassFileTransformer transformer) { this.classLoader.addTransformer(transformer); } - @Override public ClassLoader getInstrumentableClassLoader() { return this.classLoader.getClassLoader(); } - @Override public ClassLoader getThrowawayClassLoader() { return this.classLoader.getThrowawayClassLoader(); } diff --git a/spring-context/src/main/java/org/springframework/jmx/access/MBeanClientInterceptor.java b/spring-context/src/main/java/org/springframework/jmx/access/MBeanClientInterceptor.java index 86c95431c1..36894535ed 100644 --- a/spring-context/src/main/java/org/springframework/jmx/access/MBeanClientInterceptor.java +++ b/spring-context/src/main/java/org/springframework/jmx/access/MBeanClientInterceptor.java @@ -227,7 +227,6 @@ public class MBeanClientInterceptor return this.managementInterface; } - @Override public void setBeanClassLoader(ClassLoader beanClassLoader) { this.beanClassLoader = beanClassLoader; } @@ -237,7 +236,6 @@ public class MBeanClientInterceptor * Prepares the {@code MBeanServerConnection} if the "connectOnStartup" * is turned on (which it is by default). */ - @Override public void afterPropertiesSet() { if (this.server != null && this.refreshOnConnectFailure) { throw new IllegalArgumentException("'refreshOnConnectFailure' does not work when setting " + @@ -344,7 +342,6 @@ public class MBeanClientInterceptor * @see #doInvoke * @see #handleConnectFailure */ - @Override public Object invoke(MethodInvocation invocation) throws Throwable { // Lazily connect to MBeanServer if necessary. synchronized (this.preparationMonitor) { @@ -607,7 +604,6 @@ public class MBeanClientInterceptor } - @Override public void destroy() { this.connector.close(); } diff --git a/spring-context/src/main/java/org/springframework/jmx/access/MBeanProxyFactoryBean.java b/spring-context/src/main/java/org/springframework/jmx/access/MBeanProxyFactoryBean.java index 022a3a01f6..466a4ff8fb 100644 --- a/spring-context/src/main/java/org/springframework/jmx/access/MBeanProxyFactoryBean.java +++ b/spring-context/src/main/java/org/springframework/jmx/access/MBeanProxyFactoryBean.java @@ -94,17 +94,14 @@ public class MBeanProxyFactoryBean extends MBeanClientInterceptor } - @Override public Object getObject() { return this.mbeanProxy; } - @Override public Class getObjectType() { return this.proxyInterface; } - @Override public boolean isSingleton() { return true; } diff --git a/spring-context/src/main/java/org/springframework/jmx/access/NotificationListenerRegistrar.java b/spring-context/src/main/java/org/springframework/jmx/access/NotificationListenerRegistrar.java index 913136578b..bb0b2021de 100644 --- a/spring-context/src/main/java/org/springframework/jmx/access/NotificationListenerRegistrar.java +++ b/spring-context/src/main/java/org/springframework/jmx/access/NotificationListenerRegistrar.java @@ -112,7 +112,6 @@ public class NotificationListenerRegistrar extends NotificationListenerHolder } - @Override public void afterPropertiesSet() { if (getNotificationListener() == null) { throw new IllegalArgumentException("Property 'notificationListener' is required"); @@ -154,7 +153,6 @@ public class NotificationListenerRegistrar extends NotificationListenerHolder /** * Unregisters the specified {@code NotificationListener}. */ - @Override public void destroy() { try { if (this.actualObjectNames != null) { diff --git a/spring-context/src/main/java/org/springframework/jmx/export/MBeanExporter.java b/spring-context/src/main/java/org/springframework/jmx/export/MBeanExporter.java index e9a73da2ff..9e94a66df3 100644 --- a/spring-context/src/main/java/org/springframework/jmx/export/MBeanExporter.java +++ b/spring-context/src/main/java/org/springframework/jmx/export/MBeanExporter.java @@ -371,7 +371,6 @@ public class MBeanExporter extends MBeanRegistrationSupport notificationListeners.toArray(new NotificationListenerBean[notificationListeners.size()]); } - @Override public void setBeanClassLoader(ClassLoader classLoader) { this.beanClassLoader = classLoader; } @@ -384,7 +383,6 @@ public class MBeanExporter extends MBeanRegistrationSupport * @see #setBeans * @see #setAutodetect */ - @Override public void setBeanFactory(BeanFactory beanFactory) { if (beanFactory instanceof ListableBeanFactory) { this.beanFactory = (ListableBeanFactory) beanFactory; @@ -404,7 +402,6 @@ public class MBeanExporter extends MBeanRegistrationSupport * {@code ApplicationContext}. * @see #registerBeans() */ - @Override public void afterPropertiesSet() { // If no server was provided then try to find one. This is useful in an environment // such as JDK 1.5, Tomcat or JBoss where there is already an MBeanServer loaded. @@ -428,7 +425,6 @@ public class MBeanExporter extends MBeanRegistrationSupport * Unregisters all beans that this exported has exposed via JMX * when the enclosing {@code ApplicationContext} is destroyed. */ - @Override public void destroy() { logger.info("Unregistering JMX-exposed beans on shutdown"); unregisterNotificationListeners(); @@ -440,7 +436,6 @@ public class MBeanExporter extends MBeanRegistrationSupport // Implementation of MBeanExportOperations interface //--------------------------------------------------------------------- - @Override public ObjectName registerManagedResource(Object managedResource) throws MBeanExportException { Assert.notNull(managedResource, "Managed resource must not be null"); ObjectName objectName; @@ -457,7 +452,6 @@ public class MBeanExporter extends MBeanRegistrationSupport return objectName; } - @Override public void registerManagedResource(Object managedResource, ObjectName objectName) throws MBeanExportException { Assert.notNull(managedResource, "Managed resource must not be null"); Assert.notNull(objectName, "ObjectName must not be null"); @@ -477,7 +471,6 @@ public class MBeanExporter extends MBeanRegistrationSupport } } - @Override public void unregisterManagedResource(ObjectName objectName) { Assert.notNull(objectName, "ObjectName must not be null"); doUnregister(objectName); @@ -847,7 +840,6 @@ public class MBeanExporter extends MBeanRegistrationSupport */ private void autodetectBeans(final AutodetectCapableMBeanInfoAssembler assembler) { autodetect(new AutodetectCallback() { - @Override public boolean include(Class beanClass, String beanName) { return assembler.includeBean(beanClass, beanName); } @@ -860,7 +852,6 @@ public class MBeanExporter extends MBeanRegistrationSupport */ private void autodetectMBeans() { autodetect(new AutodetectCallback() { - @Override public boolean include(Class beanClass, String beanName) { return isMBean(beanClass); } diff --git a/spring-context/src/main/java/org/springframework/jmx/export/NotificationListenerBean.java b/spring-context/src/main/java/org/springframework/jmx/export/NotificationListenerBean.java index 53339d84e4..32627c2c0b 100644 --- a/spring-context/src/main/java/org/springframework/jmx/export/NotificationListenerBean.java +++ b/spring-context/src/main/java/org/springframework/jmx/export/NotificationListenerBean.java @@ -61,7 +61,6 @@ public class NotificationListenerBean extends NotificationListenerHolder impleme } - @Override public void afterPropertiesSet() { if (getNotificationListener() == null) { throw new IllegalArgumentException("Property 'notificationListener' is required"); diff --git a/spring-context/src/main/java/org/springframework/jmx/export/annotation/AnnotationJmxAttributeSource.java b/spring-context/src/main/java/org/springframework/jmx/export/annotation/AnnotationJmxAttributeSource.java index fece173a26..741932841d 100644 --- a/spring-context/src/main/java/org/springframework/jmx/export/annotation/AnnotationJmxAttributeSource.java +++ b/spring-context/src/main/java/org/springframework/jmx/export/annotation/AnnotationJmxAttributeSource.java @@ -52,13 +52,11 @@ public class AnnotationJmxAttributeSource implements JmxAttributeSource, BeanFac private StringValueResolver embeddedValueResolver; - @Override public void setBeanFactory(final BeanFactory beanFactory) { if (beanFactory instanceof ConfigurableBeanFactory) { // Not using EmbeddedValueResolverAware in order to avoid a spring-context dependency: // ConfigurableBeanFactory and its resolveEmbeddedValue live in the spring-beans module. this.embeddedValueResolver = new StringValueResolver() { - @Override public String resolveStringValue(String strVal) { return ((ConfigurableBeanFactory) beanFactory).resolveEmbeddedValue(strVal); } @@ -67,7 +65,6 @@ public class AnnotationJmxAttributeSource implements JmxAttributeSource, BeanFac } - @Override public ManagedResource getManagedResource(Class beanClass) throws InvalidMetadataException { org.springframework.jmx.export.annotation.ManagedResource ann = beanClass.getAnnotation(org.springframework.jmx.export.annotation.ManagedResource.class); @@ -86,7 +83,6 @@ public class AnnotationJmxAttributeSource implements JmxAttributeSource, BeanFac return managedResource; } - @Override public ManagedAttribute getManagedAttribute(Method method) throws InvalidMetadataException { org.springframework.jmx.export.annotation.ManagedAttribute ann = AnnotationUtils.findAnnotation(method, org.springframework.jmx.export.annotation.ManagedAttribute.class); @@ -101,7 +97,6 @@ public class AnnotationJmxAttributeSource implements JmxAttributeSource, BeanFac return managedAttribute; } - @Override public ManagedMetric getManagedMetric(Method method) throws InvalidMetadataException { org.springframework.jmx.export.annotation.ManagedMetric ann = AnnotationUtils.findAnnotation(method, org.springframework.jmx.export.annotation.ManagedMetric.class); @@ -113,7 +108,6 @@ public class AnnotationJmxAttributeSource implements JmxAttributeSource, BeanFac return managedMetric; } - @Override public ManagedOperation getManagedOperation(Method method) throws InvalidMetadataException { Annotation ann = AnnotationUtils.findAnnotation(method, org.springframework.jmx.export.annotation.ManagedOperation.class); if (ann == null) { @@ -124,7 +118,6 @@ public class AnnotationJmxAttributeSource implements JmxAttributeSource, BeanFac return op; } - @Override public ManagedOperationParameter[] getManagedOperationParameters(Method method) throws InvalidMetadataException { @@ -146,7 +139,6 @@ public class AnnotationJmxAttributeSource implements JmxAttributeSource, BeanFac return result; } - @Override public ManagedNotification[] getManagedNotifications(Class clazz) throws InvalidMetadataException { ManagedNotifications notificationsAnn = clazz.getAnnotation(ManagedNotifications.class); if(notificationsAnn == null) { diff --git a/spring-context/src/main/java/org/springframework/jmx/export/assembler/AbstractMBeanInfoAssembler.java b/spring-context/src/main/java/org/springframework/jmx/export/assembler/AbstractMBeanInfoAssembler.java index 244e6a5966..ce2c24a185 100644 --- a/spring-context/src/main/java/org/springframework/jmx/export/assembler/AbstractMBeanInfoAssembler.java +++ b/spring-context/src/main/java/org/springframework/jmx/export/assembler/AbstractMBeanInfoAssembler.java @@ -59,7 +59,6 @@ public abstract class AbstractMBeanInfoAssembler implements MBeanInfoAssembler { * @see #getNotificationInfo(Object, String) * @see #populateMBeanDescriptor(javax.management.Descriptor, Object, String) */ - @Override public ModelMBeanInfo getMBeanInfo(Object managedBean, String beanKey) throws JMException { checkManagedBean(managedBean); ModelMBeanInfo info = new ModelMBeanInfoSupport( diff --git a/spring-context/src/main/java/org/springframework/jmx/export/assembler/InterfaceBasedMBeanInfoAssembler.java b/spring-context/src/main/java/org/springframework/jmx/export/assembler/InterfaceBasedMBeanInfoAssembler.java index 3f91e7fdfa..e464fa234b 100644 --- a/spring-context/src/main/java/org/springframework/jmx/export/assembler/InterfaceBasedMBeanInfoAssembler.java +++ b/spring-context/src/main/java/org/springframework/jmx/export/assembler/InterfaceBasedMBeanInfoAssembler.java @@ -109,13 +109,11 @@ public class InterfaceBasedMBeanInfoAssembler extends AbstractConfigurableMBeanI this.interfaceMappings = mappings; } - @Override public void setBeanClassLoader(ClassLoader beanClassLoader) { this.beanClassLoader = beanClassLoader; } - @Override public void afterPropertiesSet() { if (this.interfaceMappings != null) { this.resolvedInterfaceMappings = resolveInterfaceMappings(this.interfaceMappings); diff --git a/spring-context/src/main/java/org/springframework/jmx/export/assembler/MetadataMBeanInfoAssembler.java b/spring-context/src/main/java/org/springframework/jmx/export/assembler/MetadataMBeanInfoAssembler.java index e20ad95df8..320a64790e 100644 --- a/spring-context/src/main/java/org/springframework/jmx/export/assembler/MetadataMBeanInfoAssembler.java +++ b/spring-context/src/main/java/org/springframework/jmx/export/assembler/MetadataMBeanInfoAssembler.java @@ -88,7 +88,6 @@ public class MetadataMBeanInfoAssembler extends AbstractReflectiveMBeanInfoAssem this.attributeSource = attributeSource; } - @Override public void afterPropertiesSet() { if (this.attributeSource == null) { throw new IllegalArgumentException("Property 'attributeSource' is required"); @@ -115,7 +114,6 @@ public class MetadataMBeanInfoAssembler extends AbstractReflectiveMBeanInfoAssem * @param beanClass the class of the bean * @param beanName the name of the bean in the bean factory */ - @Override public boolean includeBean(Class beanClass, String beanName) { return (this.attributeSource.getManagedResource(getClassToExpose(beanClass)) != null); } diff --git a/spring-context/src/main/java/org/springframework/jmx/export/naming/IdentityNamingStrategy.java b/spring-context/src/main/java/org/springframework/jmx/export/naming/IdentityNamingStrategy.java index ea29cc1737..1e9e4ff432 100644 --- a/spring-context/src/main/java/org/springframework/jmx/export/naming/IdentityNamingStrategy.java +++ b/spring-context/src/main/java/org/springframework/jmx/export/naming/IdentityNamingStrategy.java @@ -47,7 +47,6 @@ public class IdentityNamingStrategy implements ObjectNamingStrategy { * Returns an instance of {@code ObjectName} based on the identity * of the managed resource. */ - @Override public ObjectName getObjectName(Object managedBean, String beanKey) throws MalformedObjectNameException { String domain = ClassUtils.getPackageName(managedBean.getClass()); Hashtable keys = new Hashtable(); diff --git a/spring-context/src/main/java/org/springframework/jmx/export/naming/KeyNamingStrategy.java b/spring-context/src/main/java/org/springframework/jmx/export/naming/KeyNamingStrategy.java index fd0f36cbba..07b459910d 100644 --- a/spring-context/src/main/java/org/springframework/jmx/export/naming/KeyNamingStrategy.java +++ b/spring-context/src/main/java/org/springframework/jmx/export/naming/KeyNamingStrategy.java @@ -108,7 +108,6 @@ public class KeyNamingStrategy implements ObjectNamingStrategy, InitializingBean * used for {@code ObjectName} resolution. * @throws IOException */ - @Override public void afterPropertiesSet() throws IOException { this.mergedMappings = new Properties(); @@ -130,7 +129,6 @@ public class KeyNamingStrategy implements ObjectNamingStrategy, InitializingBean * Attempts to retrieve the {@code ObjectName} via the given key, trying to * find a mapped value in the mappings first. */ - @Override public ObjectName getObjectName(Object managedBean, String beanKey) throws MalformedObjectNameException { String objectName = null; if (this.mergedMappings != null) { diff --git a/spring-context/src/main/java/org/springframework/jmx/export/naming/MetadataNamingStrategy.java b/spring-context/src/main/java/org/springframework/jmx/export/naming/MetadataNamingStrategy.java index f574256ef0..f1d138d38b 100644 --- a/spring-context/src/main/java/org/springframework/jmx/export/naming/MetadataNamingStrategy.java +++ b/spring-context/src/main/java/org/springframework/jmx/export/naming/MetadataNamingStrategy.java @@ -94,7 +94,6 @@ public class MetadataNamingStrategy implements ObjectNamingStrategy, Initializin this.defaultDomain = defaultDomain; } - @Override public void afterPropertiesSet() { if (this.attributeSource == null) { throw new IllegalArgumentException("Property 'attributeSource' is required"); @@ -106,7 +105,6 @@ public class MetadataNamingStrategy implements ObjectNamingStrategy, Initializin * Reads the {@code ObjectName} from the source-level metadata associated * with the managed resource's {@code Class}. */ - @Override public ObjectName getObjectName(Object managedBean, String beanKey) throws MalformedObjectNameException { Class managedClass = AopUtils.getTargetClass(managedBean); ManagedResource mr = this.attributeSource.getManagedResource(managedClass); diff --git a/spring-context/src/main/java/org/springframework/jmx/export/notification/ModelMBeanNotificationPublisher.java b/spring-context/src/main/java/org/springframework/jmx/export/notification/ModelMBeanNotificationPublisher.java index 3d4e11ff7d..1c94273bbb 100644 --- a/spring-context/src/main/java/org/springframework/jmx/export/notification/ModelMBeanNotificationPublisher.java +++ b/spring-context/src/main/java/org/springframework/jmx/export/notification/ModelMBeanNotificationPublisher.java @@ -85,7 +85,6 @@ public class ModelMBeanNotificationPublisher implements NotificationPublisher { * @throws IllegalArgumentException if the supplied {@code notification} is {@code null} * @throws UnableToSendNotificationException if the supplied {@code notification} could not be sent */ - @Override public void sendNotification(Notification notification) { Assert.notNull(notification, "Notification must not be null"); replaceNotificationSourceIfNecessary(notification); diff --git a/spring-context/src/main/java/org/springframework/jmx/support/ConnectorServerFactoryBean.java b/spring-context/src/main/java/org/springframework/jmx/support/ConnectorServerFactoryBean.java index 5a4d05a7fb..a717b8a1ab 100644 --- a/spring-context/src/main/java/org/springframework/jmx/support/ConnectorServerFactoryBean.java +++ b/spring-context/src/main/java/org/springframework/jmx/support/ConnectorServerFactoryBean.java @@ -142,7 +142,6 @@ public class ConnectorServerFactoryBean extends MBeanRegistrationSupport * with the {@code MBeanServer} * @throws IOException if there is a problem starting the connector server */ - @Override public void afterPropertiesSet() throws JMException, IOException { if (this.server == null) { this.server = JmxUtils.locateMBeanServer(); @@ -201,17 +200,14 @@ public class ConnectorServerFactoryBean extends MBeanRegistrationSupport } - @Override public JMXConnectorServer getObject() { return this.connectorServer; } - @Override public Class getObjectType() { return (this.connectorServer != null ? this.connectorServer.getClass() : JMXConnectorServer.class); } - @Override public boolean isSingleton() { return true; } @@ -222,7 +218,6 @@ public class ConnectorServerFactoryBean extends MBeanRegistrationSupport * Automatically called on {@code ApplicationContext} shutdown. * @throws IOException if there is an error stopping the connector server */ - @Override public void destroy() throws IOException { if (logger.isInfoEnabled()) { logger.info("Stopping JMX connector server: " + this.connectorServer); diff --git a/spring-context/src/main/java/org/springframework/jmx/support/MBeanServerConnectionFactoryBean.java b/spring-context/src/main/java/org/springframework/jmx/support/MBeanServerConnectionFactoryBean.java index 5c923b1903..3d9b82bc34 100644 --- a/spring-context/src/main/java/org/springframework/jmx/support/MBeanServerConnectionFactoryBean.java +++ b/spring-context/src/main/java/org/springframework/jmx/support/MBeanServerConnectionFactoryBean.java @@ -101,7 +101,6 @@ public class MBeanServerConnectionFactoryBean this.connectOnStartup = connectOnStartup; } - @Override public void setBeanClassLoader(ClassLoader classLoader) { this.beanClassLoader = classLoader; } @@ -111,7 +110,6 @@ public class MBeanServerConnectionFactoryBean * Creates a {@code JMXConnector} for the given settings * and exposes the associated {@code MBeanServerConnection}. */ - @Override public void afterPropertiesSet() throws IOException { if (this.serviceUrl == null) { throw new IllegalArgumentException("Property 'serviceUrl' is required"); @@ -148,17 +146,14 @@ public class MBeanServerConnectionFactoryBean } - @Override public MBeanServerConnection getObject() { return this.connection; } - @Override public Class getObjectType() { return (this.connection != null ? this.connection.getClass() : MBeanServerConnection.class); } - @Override public boolean isSingleton() { return true; } @@ -167,7 +162,6 @@ public class MBeanServerConnectionFactoryBean /** * Closes the underlying {@code JMXConnector}. */ - @Override public void destroy() throws IOException { if (this.connectorTargetSource == null || this.connectorTargetSource.isInitialized()) { this.connector.close(); diff --git a/spring-context/src/main/java/org/springframework/jmx/support/MBeanServerFactoryBean.java b/spring-context/src/main/java/org/springframework/jmx/support/MBeanServerFactoryBean.java index 9bbfe08c85..61b1086a4c 100644 --- a/spring-context/src/main/java/org/springframework/jmx/support/MBeanServerFactoryBean.java +++ b/spring-context/src/main/java/org/springframework/jmx/support/MBeanServerFactoryBean.java @@ -118,7 +118,6 @@ public class MBeanServerFactoryBean implements FactoryBean, Initial /** * Creates the {@code MBeanServer} instance. */ - @Override public void afterPropertiesSet() throws MBeanServerNotFoundException { // Try to locate existing MBeanServer, if desired. if (this.locateExistingServerIfPossible || this.agentId != null) { @@ -180,17 +179,14 @@ public class MBeanServerFactoryBean implements FactoryBean, Initial } - @Override public MBeanServer getObject() { return this.server; } - @Override public Class getObjectType() { return (this.server != null ? this.server.getClass() : MBeanServer.class); } - @Override public boolean isSingleton() { return true; } @@ -199,7 +195,6 @@ public class MBeanServerFactoryBean implements FactoryBean, Initial /** * Unregisters the {@code MBeanServer} instance, if necessary. */ - @Override public void destroy() { if (this.newlyRegistered) { MBeanServerFactory.releaseMBeanServer(this.server); diff --git a/spring-context/src/main/java/org/springframework/jmx/support/WebSphereMBeanServerFactoryBean.java b/spring-context/src/main/java/org/springframework/jmx/support/WebSphereMBeanServerFactoryBean.java index 1cd564b193..5cd37f3d65 100644 --- a/spring-context/src/main/java/org/springframework/jmx/support/WebSphereMBeanServerFactoryBean.java +++ b/spring-context/src/main/java/org/springframework/jmx/support/WebSphereMBeanServerFactoryBean.java @@ -55,7 +55,6 @@ public class WebSphereMBeanServerFactoryBean implements FactoryBean private MBeanServer mbeanServer; - @Override public void afterPropertiesSet() throws MBeanServerNotFoundException { try { /* @@ -81,17 +80,14 @@ public class WebSphereMBeanServerFactoryBean implements FactoryBean } - @Override public MBeanServer getObject() { return this.mbeanServer; } - @Override public Class getObjectType() { return (this.mbeanServer != null ? this.mbeanServer.getClass() : MBeanServer.class); } - @Override public boolean isSingleton() { return true; } diff --git a/spring-context/src/main/java/org/springframework/jndi/JndiObjectFactoryBean.java b/spring-context/src/main/java/org/springframework/jndi/JndiObjectFactoryBean.java index 7c8d2f5b9c..92315a9248 100644 --- a/spring-context/src/main/java/org/springframework/jndi/JndiObjectFactoryBean.java +++ b/spring-context/src/main/java/org/springframework/jndi/JndiObjectFactoryBean.java @@ -155,7 +155,6 @@ public class JndiObjectFactoryBean extends JndiObjectLocator implements FactoryB this.defaultObject = defaultObject; } - @Override public void setBeanClassLoader(ClassLoader classLoader) { this.beanClassLoader = classLoader; } @@ -229,12 +228,10 @@ public class JndiObjectFactoryBean extends JndiObjectLocator implements FactoryB /** * Return the singleton JNDI object. */ - @Override public Object getObject() { return this.jndiObject; } - @Override public Class getObjectType() { if (this.proxyInterfaces != null) { if (this.proxyInterfaces.length == 1) { @@ -252,7 +249,6 @@ public class JndiObjectFactoryBean extends JndiObjectLocator implements FactoryB } } - @Override public boolean isSingleton() { return true; } @@ -327,7 +323,6 @@ public class JndiObjectFactoryBean extends JndiObjectLocator implements FactoryB this.jndiTemplate = jndiTemplate; } - @Override public Object invoke(MethodInvocation invocation) throws Throwable { Context ctx = (isEligible(invocation.getMethod()) ? this.jndiTemplate.getContext() : null); try { diff --git a/spring-context/src/main/java/org/springframework/jndi/JndiObjectLocator.java b/spring-context/src/main/java/org/springframework/jndi/JndiObjectLocator.java index 123dcee53c..8c2750da2a 100644 --- a/spring-context/src/main/java/org/springframework/jndi/JndiObjectLocator.java +++ b/spring-context/src/main/java/org/springframework/jndi/JndiObjectLocator.java @@ -85,7 +85,6 @@ public abstract class JndiObjectLocator extends JndiLocatorSupport implements In return this.expectedType; } - @Override public void afterPropertiesSet() throws IllegalArgumentException, NamingException { if (!StringUtils.hasLength(getJndiName())) { throw new IllegalArgumentException("Property 'jndiName' is required"); diff --git a/spring-context/src/main/java/org/springframework/jndi/JndiObjectTargetSource.java b/spring-context/src/main/java/org/springframework/jndi/JndiObjectTargetSource.java index 7202531de1..5a9bb616b1 100644 --- a/spring-context/src/main/java/org/springframework/jndi/JndiObjectTargetSource.java +++ b/spring-context/src/main/java/org/springframework/jndi/JndiObjectTargetSource.java @@ -105,7 +105,6 @@ public class JndiObjectTargetSource extends JndiObjectLocator implements TargetS } - @Override public Class getTargetClass() { if (this.cachedObject != null) { return this.cachedObject.getClass(); @@ -118,12 +117,10 @@ public class JndiObjectTargetSource extends JndiObjectLocator implements TargetS } } - @Override public boolean isStatic() { return (this.cachedObject != null); } - @Override public Object getTarget() { try { if (this.lookupOnStartup || !this.cache) { @@ -143,7 +140,6 @@ public class JndiObjectTargetSource extends JndiObjectLocator implements TargetS } } - @Override public void releaseTarget(Object target) { } diff --git a/spring-context/src/main/java/org/springframework/jndi/JndiTemplate.java b/spring-context/src/main/java/org/springframework/jndi/JndiTemplate.java index 35f964fde8..441a113d88 100644 --- a/spring-context/src/main/java/org/springframework/jndi/JndiTemplate.java +++ b/spring-context/src/main/java/org/springframework/jndi/JndiTemplate.java @@ -150,7 +150,6 @@ public class JndiTemplate { logger.debug("Looking up JNDI object with name [" + name + "]"); } return execute(new JndiCallback() { - @Override public Object doInContext(Context ctx) throws NamingException { Object located = ctx.lookup(name); if (located == null) { @@ -195,7 +194,6 @@ public class JndiTemplate { logger.debug("Binding JNDI object with name [" + name + "]"); } execute(new JndiCallback() { - @Override public Object doInContext(Context ctx) throws NamingException { ctx.bind(name, object); return null; @@ -215,7 +213,6 @@ public class JndiTemplate { logger.debug("Rebinding JNDI object with name [" + name + "]"); } execute(new JndiCallback() { - @Override public Object doInContext(Context ctx) throws NamingException { ctx.rebind(name, object); return null; @@ -233,7 +230,6 @@ public class JndiTemplate { logger.debug("Unbinding JNDI object with name [" + name + "]"); } execute(new JndiCallback() { - @Override public Object doInContext(Context ctx) throws NamingException { ctx.unbind(name); return null; diff --git a/spring-context/src/main/java/org/springframework/jndi/support/SimpleJndiBeanFactory.java b/spring-context/src/main/java/org/springframework/jndi/support/SimpleJndiBeanFactory.java index 555e1f4b91..f565f37edf 100644 --- a/spring-context/src/main/java/org/springframework/jndi/support/SimpleJndiBeanFactory.java +++ b/spring-context/src/main/java/org/springframework/jndi/support/SimpleJndiBeanFactory.java @@ -100,12 +100,10 @@ public class SimpleJndiBeanFactory extends JndiLocatorSupport implements BeanFac //--------------------------------------------------------------------- - @Override public Object getBean(String name) throws BeansException { return getBean(name, Object.class); } - @Override public T getBean(String name, Class requiredType) throws BeansException { try { if (isSingleton(name)) { @@ -126,12 +124,10 @@ public class SimpleJndiBeanFactory extends JndiLocatorSupport implements BeanFac } } - @Override public T getBean(Class requiredType) throws BeansException { return getBean(requiredType.getSimpleName(), requiredType); } - @Override public Object getBean(String name, Object... args) throws BeansException { if (args != null) { throw new UnsupportedOperationException( @@ -140,7 +136,6 @@ public class SimpleJndiBeanFactory extends JndiLocatorSupport implements BeanFac return getBean(name); } - @Override public boolean containsBean(String name) { if (this.singletonObjects.containsKey(name) || this.resourceTypes.containsKey(name)) { return true; @@ -154,23 +149,19 @@ public class SimpleJndiBeanFactory extends JndiLocatorSupport implements BeanFac } } - @Override public boolean isSingleton(String name) throws NoSuchBeanDefinitionException { return this.shareableResources.contains(name); } - @Override public boolean isPrototype(String name) throws NoSuchBeanDefinitionException { return !this.shareableResources.contains(name); } - @Override public boolean isTypeMatch(String name, Class targetType) throws NoSuchBeanDefinitionException { Class type = getType(name); return (targetType == null || (type != null && targetType.isAssignableFrom(type))); } - @Override public Class getType(String name) throws NoSuchBeanDefinitionException { try { return doGetType(name); @@ -183,7 +174,6 @@ public class SimpleJndiBeanFactory extends JndiLocatorSupport implements BeanFac } } - @Override public String[] getAliases(String name) { return new String[0]; } diff --git a/spring-context/src/main/java/org/springframework/remoting/rmi/JndiRmiClientInterceptor.java b/spring-context/src/main/java/org/springframework/remoting/rmi/JndiRmiClientInterceptor.java index d0be75a7b8..8660e2cf5b 100644 --- a/spring-context/src/main/java/org/springframework/remoting/rmi/JndiRmiClientInterceptor.java +++ b/spring-context/src/main/java/org/springframework/remoting/rmi/JndiRmiClientInterceptor.java @@ -267,7 +267,6 @@ public class JndiRmiClientInterceptor extends JndiObjectLocator implements Metho * @see java.rmi.ConnectIOException * @see java.rmi.NoSuchObjectException */ - @Override public Object invoke(MethodInvocation invocation) throws Throwable { Object stub = null; try { diff --git a/spring-context/src/main/java/org/springframework/remoting/rmi/JndiRmiProxyFactoryBean.java b/spring-context/src/main/java/org/springframework/remoting/rmi/JndiRmiProxyFactoryBean.java index 645251429c..b4e884e260 100644 --- a/spring-context/src/main/java/org/springframework/remoting/rmi/JndiRmiProxyFactoryBean.java +++ b/spring-context/src/main/java/org/springframework/remoting/rmi/JndiRmiProxyFactoryBean.java @@ -69,7 +69,6 @@ public class JndiRmiProxyFactoryBean extends JndiRmiClientInterceptor private Object serviceProxy; - @Override public void setBeanClassLoader(ClassLoader classLoader) { this.beanClassLoader = classLoader; } @@ -84,17 +83,14 @@ public class JndiRmiProxyFactoryBean extends JndiRmiClientInterceptor } - @Override public Object getObject() { return this.serviceProxy; } - @Override public Class getObjectType() { return getServiceInterface(); } - @Override public boolean isSingleton() { return true; } diff --git a/spring-context/src/main/java/org/springframework/remoting/rmi/JndiRmiServiceExporter.java b/spring-context/src/main/java/org/springframework/remoting/rmi/JndiRmiServiceExporter.java index d3e50819f1..180ba0f563 100644 --- a/spring-context/src/main/java/org/springframework/remoting/rmi/JndiRmiServiceExporter.java +++ b/spring-context/src/main/java/org/springframework/remoting/rmi/JndiRmiServiceExporter.java @@ -101,7 +101,6 @@ public class JndiRmiServiceExporter extends RmiBasedExporter implements Initiali } - @Override public void afterPropertiesSet() throws NamingException, RemoteException { prepare(); } @@ -138,7 +137,6 @@ public class JndiRmiServiceExporter extends RmiBasedExporter implements Initiali /** * Unbind the RMI service from JNDI on bean factory shutdown. */ - @Override public void destroy() throws NamingException, NoSuchObjectException { if (logger.isInfoEnabled()) { logger.info("Unbinding RMI service from JNDI location [" + this.jndiName + "]"); diff --git a/spring-context/src/main/java/org/springframework/remoting/rmi/RemoteInvocationSerializingExporter.java b/spring-context/src/main/java/org/springframework/remoting/rmi/RemoteInvocationSerializingExporter.java index 6e0c08466a..d4673dbff6 100644 --- a/spring-context/src/main/java/org/springframework/remoting/rmi/RemoteInvocationSerializingExporter.java +++ b/spring-context/src/main/java/org/springframework/remoting/rmi/RemoteInvocationSerializingExporter.java @@ -94,7 +94,6 @@ public abstract class RemoteInvocationSerializingExporter extends RemoteInvocati } - @Override public void afterPropertiesSet() { prepare(); } diff --git a/spring-context/src/main/java/org/springframework/remoting/rmi/RmiClientInterceptor.java b/spring-context/src/main/java/org/springframework/remoting/rmi/RmiClientInterceptor.java index f019c3644e..ba9d8775d9 100644 --- a/spring-context/src/main/java/org/springframework/remoting/rmi/RmiClientInterceptor.java +++ b/spring-context/src/main/java/org/springframework/remoting/rmi/RmiClientInterceptor.java @@ -253,7 +253,6 @@ public class RmiClientInterceptor extends RemoteInvocationBasedAccessor * @see java.rmi.ConnectIOException * @see java.rmi.NoSuchObjectException */ - @Override public Object invoke(MethodInvocation invocation) throws Throwable { Remote stub = getStub(); try { diff --git a/spring-context/src/main/java/org/springframework/remoting/rmi/RmiInvocationWrapper.java b/spring-context/src/main/java/org/springframework/remoting/rmi/RmiInvocationWrapper.java index b5d2da6159..22cac7f71f 100644 --- a/spring-context/src/main/java/org/springframework/remoting/rmi/RmiInvocationWrapper.java +++ b/spring-context/src/main/java/org/springframework/remoting/rmi/RmiInvocationWrapper.java @@ -57,7 +57,6 @@ class RmiInvocationWrapper implements RmiInvocationHandler { * Exposes the exporter's service interface, if any, as target interface. * @see RmiBasedExporter#getServiceInterface() */ - @Override public String getTargetInterfaceName() { Class ifc = this.rmiExporter.getServiceInterface(); return (ifc != null ? ifc.getName() : null); @@ -67,7 +66,6 @@ class RmiInvocationWrapper implements RmiInvocationHandler { * Delegates the actual invocation handling to the RMI exporter. * @see RmiBasedExporter#invoke(org.springframework.remoting.support.RemoteInvocation, Object) */ - @Override public Object invoke(RemoteInvocation invocation) throws RemoteException, NoSuchMethodException, IllegalAccessException, InvocationTargetException { diff --git a/spring-context/src/main/java/org/springframework/remoting/rmi/RmiProxyFactoryBean.java b/spring-context/src/main/java/org/springframework/remoting/rmi/RmiProxyFactoryBean.java index ef88378589..a635a1fa59 100644 --- a/spring-context/src/main/java/org/springframework/remoting/rmi/RmiProxyFactoryBean.java +++ b/spring-context/src/main/java/org/springframework/remoting/rmi/RmiProxyFactoryBean.java @@ -73,17 +73,14 @@ public class RmiProxyFactoryBean extends RmiClientInterceptor implements Factory } - @Override public Object getObject() { return this.serviceProxy; } - @Override public Class getObjectType() { return getServiceInterface(); } - @Override public boolean isSingleton() { return true; } diff --git a/spring-context/src/main/java/org/springframework/remoting/rmi/RmiRegistryFactoryBean.java b/spring-context/src/main/java/org/springframework/remoting/rmi/RmiRegistryFactoryBean.java index 0a6ded9114..fee68ce8d7 100644 --- a/spring-context/src/main/java/org/springframework/remoting/rmi/RmiRegistryFactoryBean.java +++ b/spring-context/src/main/java/org/springframework/remoting/rmi/RmiRegistryFactoryBean.java @@ -149,7 +149,6 @@ public class RmiRegistryFactoryBean implements FactoryBean, Initializi } - @Override public void afterPropertiesSet() throws Exception { // Check socket factories for registry. if (this.clientSocketFactory instanceof RMIServerSocketFactory) { @@ -283,17 +282,14 @@ public class RmiRegistryFactoryBean implements FactoryBean, Initializi } - @Override public Registry getObject() throws Exception { return this.registry; } - @Override public Class getObjectType() { return (this.registry != null ? this.registry.getClass() : Registry.class); } - @Override public boolean isSingleton() { return true; } @@ -303,7 +299,6 @@ public class RmiRegistryFactoryBean implements FactoryBean, Initializi * Unexport the RMI registry on bean factory shutdown, * provided that this bean actually created a registry. */ - @Override public void destroy() throws RemoteException { if (this.created) { logger.info("Unexporting RMI registry"); diff --git a/spring-context/src/main/java/org/springframework/remoting/rmi/RmiServiceExporter.java b/spring-context/src/main/java/org/springframework/remoting/rmi/RmiServiceExporter.java index 49429b36d8..dcd5f91f85 100644 --- a/spring-context/src/main/java/org/springframework/remoting/rmi/RmiServiceExporter.java +++ b/spring-context/src/main/java/org/springframework/remoting/rmi/RmiServiceExporter.java @@ -225,7 +225,6 @@ public class RmiServiceExporter extends RmiBasedExporter implements Initializing } - @Override public void afterPropertiesSet() throws RemoteException { prepare(); } @@ -425,7 +424,6 @@ public class RmiServiceExporter extends RmiBasedExporter implements Initializing /** * Unbind the RMI service from the registry on bean factory shutdown. */ - @Override public void destroy() throws RemoteException { if (logger.isInfoEnabled()) { logger.info("Unbinding RMI service '" + this.serviceName + diff --git a/spring-context/src/main/java/org/springframework/remoting/support/DefaultRemoteInvocationExecutor.java b/spring-context/src/main/java/org/springframework/remoting/support/DefaultRemoteInvocationExecutor.java index d664730125..a4969dc42f 100644 --- a/spring-context/src/main/java/org/springframework/remoting/support/DefaultRemoteInvocationExecutor.java +++ b/spring-context/src/main/java/org/springframework/remoting/support/DefaultRemoteInvocationExecutor.java @@ -30,7 +30,6 @@ import org.springframework.util.Assert; */ public class DefaultRemoteInvocationExecutor implements RemoteInvocationExecutor { - @Override public Object invoke(RemoteInvocation invocation, Object targetObject) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException{ diff --git a/spring-context/src/main/java/org/springframework/remoting/support/DefaultRemoteInvocationFactory.java b/spring-context/src/main/java/org/springframework/remoting/support/DefaultRemoteInvocationFactory.java index 83d0e71265..e98a226510 100644 --- a/spring-context/src/main/java/org/springframework/remoting/support/DefaultRemoteInvocationFactory.java +++ b/spring-context/src/main/java/org/springframework/remoting/support/DefaultRemoteInvocationFactory.java @@ -27,7 +27,6 @@ import org.aopalliance.intercept.MethodInvocation; */ public class DefaultRemoteInvocationFactory implements RemoteInvocationFactory { - @Override public RemoteInvocation createRemoteInvocation(MethodInvocation methodInvocation) { return new RemoteInvocation(methodInvocation); } diff --git a/spring-context/src/main/java/org/springframework/remoting/support/RemoteInvocationTraceInterceptor.java b/spring-context/src/main/java/org/springframework/remoting/support/RemoteInvocationTraceInterceptor.java index f629dc6b7d..f7a1599c81 100644 --- a/spring-context/src/main/java/org/springframework/remoting/support/RemoteInvocationTraceInterceptor.java +++ b/spring-context/src/main/java/org/springframework/remoting/support/RemoteInvocationTraceInterceptor.java @@ -67,7 +67,6 @@ public class RemoteInvocationTraceInterceptor implements MethodInterceptor { } - @Override public Object invoke(MethodInvocation invocation) throws Throwable { Method method = invocation.getMethod(); if (logger.isDebugEnabled()) { diff --git a/spring-context/src/main/java/org/springframework/remoting/support/RemotingSupport.java b/spring-context/src/main/java/org/springframework/remoting/support/RemotingSupport.java index 02f31ba803..832d489962 100644 --- a/spring-context/src/main/java/org/springframework/remoting/support/RemotingSupport.java +++ b/spring-context/src/main/java/org/springframework/remoting/support/RemotingSupport.java @@ -37,7 +37,6 @@ public abstract class RemotingSupport implements BeanClassLoaderAware { private ClassLoader beanClassLoader = ClassUtils.getDefaultClassLoader(); - @Override public void setBeanClassLoader(ClassLoader classLoader) { this.beanClassLoader = classLoader; } diff --git a/spring-context/src/main/java/org/springframework/remoting/support/SimpleHttpServerFactoryBean.java b/spring-context/src/main/java/org/springframework/remoting/support/SimpleHttpServerFactoryBean.java index 1cc5669e6c..69f4ebe821 100644 --- a/spring-context/src/main/java/org/springframework/remoting/support/SimpleHttpServerFactoryBean.java +++ b/spring-context/src/main/java/org/springframework/remoting/support/SimpleHttpServerFactoryBean.java @@ -143,7 +143,6 @@ public class SimpleHttpServerFactoryBean implements FactoryBean, Ini } - @Override public void afterPropertiesSet() throws IOException { InetSocketAddress address = (this.hostname != null ? new InetSocketAddress(this.hostname, this.port) : new InetSocketAddress(this.port)); @@ -168,22 +167,18 @@ public class SimpleHttpServerFactoryBean implements FactoryBean, Ini this.server.start(); } - @Override public HttpServer getObject() { return this.server; } - @Override public Class getObjectType() { return (this.server != null ? this.server.getClass() : HttpServer.class); } - @Override public boolean isSingleton() { return true; } - @Override public void destroy() { logger.info("Stopping HttpServer"); this.server.stop(this.shutdownDelay); diff --git a/spring-context/src/main/java/org/springframework/remoting/support/UrlBasedRemoteAccessor.java b/spring-context/src/main/java/org/springframework/remoting/support/UrlBasedRemoteAccessor.java index 9e00b592f8..6e15b0941c 100644 --- a/spring-context/src/main/java/org/springframework/remoting/support/UrlBasedRemoteAccessor.java +++ b/spring-context/src/main/java/org/springframework/remoting/support/UrlBasedRemoteAccessor.java @@ -46,7 +46,6 @@ public abstract class UrlBasedRemoteAccessor extends RemoteAccessor implements I } - @Override public void afterPropertiesSet() { if (getServiceUrl() == null) { throw new IllegalArgumentException("Property 'serviceUrl' is required"); diff --git a/spring-context/src/main/java/org/springframework/scheduling/annotation/AbstractAsyncConfiguration.java b/spring-context/src/main/java/org/springframework/scheduling/annotation/AbstractAsyncConfiguration.java index 2f8703dc69..57fd7b6945 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/annotation/AbstractAsyncConfiguration.java +++ b/spring-context/src/main/java/org/springframework/scheduling/annotation/AbstractAsyncConfiguration.java @@ -40,7 +40,6 @@ public abstract class AbstractAsyncConfiguration implements ImportAware { protected AnnotationAttributes enableAsync; protected Executor executor; - @Override public void setImportMetadata(AnnotationMetadata importMetadata) { this.enableAsync = AnnotationAttributes.fromMap( importMetadata.getAnnotationAttributes(EnableAsync.class.getName(), false)); diff --git a/spring-context/src/main/java/org/springframework/scheduling/annotation/AsyncAnnotationAdvisor.java b/spring-context/src/main/java/org/springframework/scheduling/annotation/AsyncAnnotationAdvisor.java index 21613bc066..873740c21c 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/annotation/AsyncAnnotationAdvisor.java +++ b/spring-context/src/main/java/org/springframework/scheduling/annotation/AsyncAnnotationAdvisor.java @@ -91,7 +91,6 @@ public class AsyncAnnotationAdvisor extends AbstractPointcutAdvisor implements B /** * Set the {@code BeanFactory} to be used when looking up executors by qualifier. */ - @Override public void setBeanFactory(BeanFactory beanFactory) throws BeansException { this.beanFactory = beanFactory; delegateBeanFactory(beanFactory); @@ -128,12 +127,10 @@ public class AsyncAnnotationAdvisor extends AbstractPointcutAdvisor implements B } - @Override public Advice getAdvice() { return this.advice; } - @Override public Pointcut getPointcut() { return this.pointcut; } diff --git a/spring-context/src/main/java/org/springframework/scheduling/annotation/AsyncAnnotationBeanPostProcessor.java b/spring-context/src/main/java/org/springframework/scheduling/annotation/AsyncAnnotationBeanPostProcessor.java index 63c7ee012e..f4c7d65125 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/annotation/AsyncAnnotationBeanPostProcessor.java +++ b/spring-context/src/main/java/org/springframework/scheduling/annotation/AsyncAnnotationBeanPostProcessor.java @@ -74,7 +74,6 @@ public class AsyncAnnotationBeanPostProcessor extends AbstractAdvisingBeanPostPr this.executor = executor; } - @Override public void setBeanFactory(BeanFactory beanFactory) { AsyncAnnotationAdvisor advisor = (this.executor != null ? new AsyncAnnotationAdvisor(this.executor) : new AsyncAnnotationAdvisor()); diff --git a/spring-context/src/main/java/org/springframework/scheduling/annotation/AsyncConfigurationSelector.java b/spring-context/src/main/java/org/springframework/scheduling/annotation/AsyncConfigurationSelector.java index ea6afa94b8..49b01a8e76 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/annotation/AsyncConfigurationSelector.java +++ b/spring-context/src/main/java/org/springframework/scheduling/annotation/AsyncConfigurationSelector.java @@ -37,7 +37,6 @@ public class AsyncConfigurationSelector extends AdviceModeImportSelector implements Future { this.value = value; } - @Override public boolean cancel(boolean mayInterruptIfRunning) { return false; } - @Override public boolean isCancelled() { return false; } - @Override public boolean isDone() { return true; } - @Override public V get() { return this.value; } - @Override public V get(long timeout, TimeUnit unit) { return this.value; } diff --git a/spring-context/src/main/java/org/springframework/scheduling/annotation/ScheduledAnnotationBeanPostProcessor.java b/spring-context/src/main/java/org/springframework/scheduling/annotation/ScheduledAnnotationBeanPostProcessor.java index 74b6bc6216..f5f236d2f9 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/annotation/ScheduledAnnotationBeanPostProcessor.java +++ b/spring-context/src/main/java/org/springframework/scheduling/annotation/ScheduledAnnotationBeanPostProcessor.java @@ -89,31 +89,25 @@ public class ScheduledAnnotationBeanPostProcessor this.scheduler = scheduler; } - @Override public void setEmbeddedValueResolver(StringValueResolver resolver) { this.embeddedValueResolver = resolver; } - @Override public void setApplicationContext(ApplicationContext applicationContext) { this.applicationContext = applicationContext; } - @Override public int getOrder() { return LOWEST_PRECEDENCE; } - @Override public Object postProcessBeforeInitialization(Object bean, String beanName) { return bean; } - @Override public Object postProcessAfterInitialization(final Object bean, String beanName) { final Class targetClass = AopUtils.getTargetClass(bean); ReflectionUtils.doWithMethods(targetClass, new MethodCallback() { - @Override public void doWith(Method method) throws IllegalArgumentException, IllegalAccessException { Scheduled annotation = AnnotationUtils.getAnnotation(method, Scheduled.class); if (annotation != null) { @@ -170,7 +164,6 @@ public class ScheduledAnnotationBeanPostProcessor return bean; } - @Override public void onApplicationEvent(ContextRefreshedEvent event) { if (event.getApplicationContext() != this.applicationContext) { return; @@ -210,7 +203,6 @@ public class ScheduledAnnotationBeanPostProcessor this.registrar.afterPropertiesSet(); } - @Override public void destroy() throws Exception { if (this.registrar != null) { this.registrar.destroy(); diff --git a/spring-context/src/main/java/org/springframework/scheduling/backportconcurrent/ConcurrentTaskExecutor.java b/spring-context/src/main/java/org/springframework/scheduling/backportconcurrent/ConcurrentTaskExecutor.java index 7277bc9362..d467243131 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/backportconcurrent/ConcurrentTaskExecutor.java +++ b/spring-context/src/main/java/org/springframework/scheduling/backportconcurrent/ConcurrentTaskExecutor.java @@ -102,7 +102,6 @@ public class ConcurrentTaskExecutor implements SchedulingTaskExecutor, Executor * Delegates to the specified JSR-166 backport concurrent executor. * @see edu.emory.mathcs.backport.java.util.concurrent.Executor#execute(Runnable) */ - @Override public void execute(Runnable task) { try { this.concurrentExecutor.execute(task); @@ -113,19 +112,16 @@ public class ConcurrentTaskExecutor implements SchedulingTaskExecutor, Executor } } - @Override public void execute(Runnable task, long startTimeout) { execute(task); } - @Override public Future submit(Runnable task) { FutureTask future = new FutureTask(task, null); execute(future); return future; } - @Override public Future submit(Callable task) { FutureTask future = new FutureTask(task); execute(future); @@ -135,7 +131,6 @@ public class ConcurrentTaskExecutor implements SchedulingTaskExecutor, Executor /** * This task executor prefers short-lived work units. */ - @Override public boolean prefersShortLivedTasks() { return true; } diff --git a/spring-context/src/main/java/org/springframework/scheduling/backportconcurrent/CustomizableThreadFactory.java b/spring-context/src/main/java/org/springframework/scheduling/backportconcurrent/CustomizableThreadFactory.java index 79a2652550..8cfb86f2b3 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/backportconcurrent/CustomizableThreadFactory.java +++ b/spring-context/src/main/java/org/springframework/scheduling/backportconcurrent/CustomizableThreadFactory.java @@ -54,7 +54,6 @@ public class CustomizableThreadFactory extends CustomizableThreadCreator impleme } - @Override public Thread newThread(Runnable runnable) { return createThread(runnable); } diff --git a/spring-context/src/main/java/org/springframework/scheduling/backportconcurrent/ThreadPoolTaskExecutor.java b/spring-context/src/main/java/org/springframework/scheduling/backportconcurrent/ThreadPoolTaskExecutor.java index 821dabc32d..ca237fe1af 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/backportconcurrent/ThreadPoolTaskExecutor.java +++ b/spring-context/src/main/java/org/springframework/scheduling/backportconcurrent/ThreadPoolTaskExecutor.java @@ -238,7 +238,6 @@ public class ThreadPoolTaskExecutor extends CustomizableThreadFactory this.threadNamePrefixSet = true; } - @Override public void setBeanName(String name) { this.beanName = name; } @@ -248,7 +247,6 @@ public class ThreadPoolTaskExecutor extends CustomizableThreadFactory * Calls {@code initialize()} after the container applied all property values. * @see #initialize() */ - @Override public void afterPropertiesSet() { initialize(); } @@ -308,7 +306,6 @@ public class ThreadPoolTaskExecutor extends CustomizableThreadFactory * @see edu.emory.mathcs.backport.java.util.concurrent.Executor#execute(Runnable) * @see org.springframework.core.task.TaskExecutor#execute(Runnable) */ - @Override public void execute(Runnable task) { Executor executor = getThreadPoolExecutor(); try { @@ -319,19 +316,16 @@ public class ThreadPoolTaskExecutor extends CustomizableThreadFactory } } - @Override public void execute(Runnable task, long startTimeout) { execute(task); } - @Override public Future submit(Runnable task) { FutureTask future = new FutureTask(task, null); execute(future); return future; } - @Override public Future submit(Callable task) { FutureTask future = new FutureTask(task); execute(future); @@ -341,7 +335,6 @@ public class ThreadPoolTaskExecutor extends CustomizableThreadFactory /** * This task executor prefers short-lived work units. */ - @Override public boolean prefersShortLivedTasks() { return true; } @@ -369,7 +362,6 @@ public class ThreadPoolTaskExecutor extends CustomizableThreadFactory * the task executor instance. * @see #shutdown() */ - @Override public void destroy() { shutdown(); } diff --git a/spring-context/src/main/java/org/springframework/scheduling/concurrent/ConcurrentTaskExecutor.java b/spring-context/src/main/java/org/springframework/scheduling/concurrent/ConcurrentTaskExecutor.java index 3427652bfd..ea5bc9ca89 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/concurrent/ConcurrentTaskExecutor.java +++ b/spring-context/src/main/java/org/springframework/scheduling/concurrent/ConcurrentTaskExecutor.java @@ -87,22 +87,18 @@ public class ConcurrentTaskExecutor implements SchedulingTaskExecutor { } - @Override public void execute(Runnable task) { this.adaptedExecutor.execute(task); } - @Override public void execute(Runnable task, long startTimeout) { this.adaptedExecutor.execute(task, startTimeout); } - @Override public Future submit(Runnable task) { return this.adaptedExecutor.submit(task); } - @Override public Future submit(Callable task) { return this.adaptedExecutor.submit(task); } @@ -110,7 +106,6 @@ public class ConcurrentTaskExecutor implements SchedulingTaskExecutor { /** * This task executor prefers short-lived work units. */ - @Override public boolean prefersShortLivedTasks() { return true; } diff --git a/spring-context/src/main/java/org/springframework/scheduling/concurrent/ConcurrentTaskScheduler.java b/spring-context/src/main/java/org/springframework/scheduling/concurrent/ConcurrentTaskScheduler.java index 97fc81496a..b972db0601 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/concurrent/ConcurrentTaskScheduler.java +++ b/spring-context/src/main/java/org/springframework/scheduling/concurrent/ConcurrentTaskScheduler.java @@ -116,7 +116,6 @@ public class ConcurrentTaskScheduler extends ConcurrentTaskExecutor implements T } - @Override public ScheduledFuture schedule(Runnable task, Trigger trigger) { try { ErrorHandler errorHandler = @@ -128,7 +127,6 @@ public class ConcurrentTaskScheduler extends ConcurrentTaskExecutor implements T } } - @Override public ScheduledFuture schedule(Runnable task, Date startTime) { long initialDelay = startTime.getTime() - System.currentTimeMillis(); try { @@ -140,7 +138,6 @@ public class ConcurrentTaskScheduler extends ConcurrentTaskExecutor implements T } } - @Override public ScheduledFuture scheduleAtFixedRate(Runnable task, Date startTime, long period) { long initialDelay = startTime.getTime() - System.currentTimeMillis(); try { @@ -152,7 +149,6 @@ public class ConcurrentTaskScheduler extends ConcurrentTaskExecutor implements T } } - @Override public ScheduledFuture scheduleAtFixedRate(Runnable task, long period) { try { return this.scheduledExecutor.scheduleAtFixedRate( @@ -163,7 +159,6 @@ public class ConcurrentTaskScheduler extends ConcurrentTaskExecutor implements T } } - @Override public ScheduledFuture scheduleWithFixedDelay(Runnable task, Date startTime, long delay) { long initialDelay = startTime.getTime() - System.currentTimeMillis(); try { @@ -175,7 +170,6 @@ public class ConcurrentTaskScheduler extends ConcurrentTaskExecutor implements T } } - @Override public ScheduledFuture scheduleWithFixedDelay(Runnable task, long delay) { try { return this.scheduledExecutor.scheduleWithFixedDelay( diff --git a/spring-context/src/main/java/org/springframework/scheduling/concurrent/CustomizableThreadFactory.java b/spring-context/src/main/java/org/springframework/scheduling/concurrent/CustomizableThreadFactory.java index 090eac7b50..7ac8d4790e 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/concurrent/CustomizableThreadFactory.java +++ b/spring-context/src/main/java/org/springframework/scheduling/concurrent/CustomizableThreadFactory.java @@ -51,7 +51,6 @@ public class CustomizableThreadFactory extends CustomizableThreadCreator impleme } - @Override public Thread newThread(Runnable runnable) { return createThread(runnable); } diff --git a/spring-context/src/main/java/org/springframework/scheduling/concurrent/ExecutorConfigurationSupport.java b/spring-context/src/main/java/org/springframework/scheduling/concurrent/ExecutorConfigurationSupport.java index c237883e4e..964872e1d6 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/concurrent/ExecutorConfigurationSupport.java +++ b/spring-context/src/main/java/org/springframework/scheduling/concurrent/ExecutorConfigurationSupport.java @@ -95,7 +95,6 @@ public abstract class ExecutorConfigurationSupport extends CustomizableThreadFac this.waitForTasksToCompleteOnShutdown = waitForJobsToCompleteOnShutdown; } - @Override public void setBeanName(String name) { this.beanName = name; } @@ -105,7 +104,6 @@ public abstract class ExecutorConfigurationSupport extends CustomizableThreadFac * Calls {@code initialize()} after the container applied all property values. * @see #initialize() */ - @Override public void afterPropertiesSet() { initialize(); } @@ -140,7 +138,6 @@ public abstract class ExecutorConfigurationSupport extends CustomizableThreadFac * the task executor instance. * @see #shutdown() */ - @Override public void destroy() { shutdown(); } diff --git a/spring-context/src/main/java/org/springframework/scheduling/concurrent/ForkJoinPoolFactoryBean.java b/spring-context/src/main/java/org/springframework/scheduling/concurrent/ForkJoinPoolFactoryBean.java index 5c184f313e..fe30fd108b 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/concurrent/ForkJoinPoolFactoryBean.java +++ b/spring-context/src/main/java/org/springframework/scheduling/concurrent/ForkJoinPoolFactoryBean.java @@ -82,30 +82,25 @@ public class ForkJoinPoolFactoryBean implements FactoryBean, Initi this.asyncMode = asyncMode; } - @Override public void afterPropertiesSet() { this.forkJoinPool = new ForkJoinPool(this.parallelism, this.threadFactory, this.uncaughtExceptionHandler, this.asyncMode); } - @Override public ForkJoinPool getObject() { return this.forkJoinPool; } - @Override public Class getObjectType() { return ForkJoinPool.class; } - @Override public boolean isSingleton() { return true; } - @Override public void destroy() { this.forkJoinPool.shutdown(); } diff --git a/spring-context/src/main/java/org/springframework/scheduling/concurrent/ReschedulingRunnable.java b/spring-context/src/main/java/org/springframework/scheduling/concurrent/ReschedulingRunnable.java index ff199f1609..fba41f0778 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/concurrent/ReschedulingRunnable.java +++ b/spring-context/src/main/java/org/springframework/scheduling/concurrent/ReschedulingRunnable.java @@ -89,28 +89,24 @@ class ReschedulingRunnable extends DelegatingErrorHandlingRunnable implements Sc } - @Override public boolean cancel(boolean mayInterruptIfRunning) { synchronized (this.triggerContextMonitor) { return this.currentFuture.cancel(mayInterruptIfRunning); } } - @Override public boolean isCancelled() { synchronized (this.triggerContextMonitor) { return this.currentFuture.isCancelled(); } } - @Override public boolean isDone() { synchronized (this.triggerContextMonitor) { return this.currentFuture.isDone(); } } - @Override public Object get() throws InterruptedException, ExecutionException { ScheduledFuture curr; synchronized (this.triggerContextMonitor) { @@ -119,7 +115,6 @@ class ReschedulingRunnable extends DelegatingErrorHandlingRunnable implements Sc return curr.get(); } - @Override public Object get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException { ScheduledFuture curr; synchronized (this.triggerContextMonitor) { @@ -128,7 +123,6 @@ class ReschedulingRunnable extends DelegatingErrorHandlingRunnable implements Sc return curr.get(timeout, unit); } - @Override public long getDelay(TimeUnit unit) { ScheduledFuture curr; synchronized (this.triggerContextMonitor) { @@ -137,7 +131,6 @@ class ReschedulingRunnable extends DelegatingErrorHandlingRunnable implements Sc return curr.getDelay(unit); } - @Override public int compareTo(Delayed other) { if (this == other) { return 0; diff --git a/spring-context/src/main/java/org/springframework/scheduling/concurrent/ScheduledExecutorFactoryBean.java b/spring-context/src/main/java/org/springframework/scheduling/concurrent/ScheduledExecutorFactoryBean.java index 4b5e4b6a25..40d48ad295 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/concurrent/ScheduledExecutorFactoryBean.java +++ b/spring-context/src/main/java/org/springframework/scheduling/concurrent/ScheduledExecutorFactoryBean.java @@ -122,7 +122,6 @@ public class ScheduledExecutorFactoryBean extends ExecutorConfigurationSupport } - @Override protected ExecutorService initializeExecutor( ThreadFactory threadFactory, RejectedExecutionHandler rejectedExecutionHandler) { @@ -199,17 +198,14 @@ public class ScheduledExecutorFactoryBean extends ExecutorConfigurationSupport } - @Override public ScheduledExecutorService getObject() { return this.exposedExecutor; } - @Override public Class getObjectType() { return (this.exposedExecutor != null ? this.exposedExecutor.getClass() : ScheduledExecutorService.class); } - @Override public boolean isSingleton() { return true; } diff --git a/spring-context/src/main/java/org/springframework/scheduling/concurrent/ThreadPoolExecutorFactoryBean.java b/spring-context/src/main/java/org/springframework/scheduling/concurrent/ThreadPoolExecutorFactoryBean.java index 4c4c92e6ee..19cd880bbb 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/concurrent/ThreadPoolExecutorFactoryBean.java +++ b/spring-context/src/main/java/org/springframework/scheduling/concurrent/ThreadPoolExecutorFactoryBean.java @@ -133,7 +133,6 @@ public class ThreadPoolExecutorFactoryBean extends ExecutorConfigurationSupport } - @Override protected ExecutorService initializeExecutor( ThreadFactory threadFactory, RejectedExecutionHandler rejectedExecutionHandler) { @@ -171,17 +170,14 @@ public class ThreadPoolExecutorFactoryBean extends ExecutorConfigurationSupport } - @Override public ExecutorService getObject() throws Exception { return this.exposedExecutor; } - @Override public Class getObjectType() { return (this.exposedExecutor != null ? this.exposedExecutor.getClass() : ExecutorService.class); } - @Override public boolean isSingleton() { return true; } diff --git a/spring-context/src/main/java/org/springframework/scheduling/concurrent/ThreadPoolTaskExecutor.java b/spring-context/src/main/java/org/springframework/scheduling/concurrent/ThreadPoolTaskExecutor.java index 6674768af7..31dc69d553 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/concurrent/ThreadPoolTaskExecutor.java +++ b/spring-context/src/main/java/org/springframework/scheduling/concurrent/ThreadPoolTaskExecutor.java @@ -176,7 +176,6 @@ public class ThreadPoolTaskExecutor extends ExecutorConfigurationSupport impleme } - @Override protected ExecutorService initializeExecutor( ThreadFactory threadFactory, RejectedExecutionHandler rejectedExecutionHandler) { @@ -237,7 +236,6 @@ public class ThreadPoolTaskExecutor extends ExecutorConfigurationSupport impleme } - @Override public void execute(Runnable task) { Executor executor = getThreadPoolExecutor(); try { @@ -248,12 +246,10 @@ public class ThreadPoolTaskExecutor extends ExecutorConfigurationSupport impleme } } - @Override public void execute(Runnable task, long startTimeout) { execute(task); } - @Override public Future submit(Runnable task) { ExecutorService executor = getThreadPoolExecutor(); try { @@ -264,7 +260,6 @@ public class ThreadPoolTaskExecutor extends ExecutorConfigurationSupport impleme } } - @Override public Future submit(Callable task) { ExecutorService executor = getThreadPoolExecutor(); try { @@ -278,7 +273,6 @@ public class ThreadPoolTaskExecutor extends ExecutorConfigurationSupport impleme /** * This task executor prefers short-lived work units. */ - @Override public boolean prefersShortLivedTasks() { return true; } diff --git a/spring-context/src/main/java/org/springframework/scheduling/concurrent/ThreadPoolTaskScheduler.java b/spring-context/src/main/java/org/springframework/scheduling/concurrent/ThreadPoolTaskScheduler.java index 01c05d6bc4..e8961e05e3 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/concurrent/ThreadPoolTaskScheduler.java +++ b/spring-context/src/main/java/org/springframework/scheduling/concurrent/ThreadPoolTaskScheduler.java @@ -76,7 +76,6 @@ public class ThreadPoolTaskScheduler extends ExecutorConfigurationSupport this.errorHandler = errorHandler; } - @Override protected ExecutorService initializeExecutor( ThreadFactory threadFactory, RejectedExecutionHandler rejectedExecutionHandler) { @@ -114,7 +113,6 @@ public class ThreadPoolTaskScheduler extends ExecutorConfigurationSupport // SchedulingTaskExecutor implementation - @Override public void execute(Runnable task) { Executor executor = getScheduledExecutor(); try { @@ -125,12 +123,10 @@ public class ThreadPoolTaskScheduler extends ExecutorConfigurationSupport } } - @Override public void execute(Runnable task, long startTimeout) { execute(task); } - @Override public Future submit(Runnable task) { ExecutorService executor = getScheduledExecutor(); try { @@ -141,7 +137,6 @@ public class ThreadPoolTaskScheduler extends ExecutorConfigurationSupport } } - @Override public Future submit(Callable task) { ExecutorService executor = getScheduledExecutor(); try { @@ -155,7 +150,6 @@ public class ThreadPoolTaskScheduler extends ExecutorConfigurationSupport } } - @Override public boolean prefersShortLivedTasks() { return true; } @@ -163,7 +157,6 @@ public class ThreadPoolTaskScheduler extends ExecutorConfigurationSupport // TaskScheduler implementation - @Override public ScheduledFuture schedule(Runnable task, Trigger trigger) { ScheduledExecutorService executor = getScheduledExecutor(); try { @@ -176,7 +169,6 @@ public class ThreadPoolTaskScheduler extends ExecutorConfigurationSupport } } - @Override public ScheduledFuture schedule(Runnable task, Date startTime) { ScheduledExecutorService executor = getScheduledExecutor(); long initialDelay = startTime.getTime() - System.currentTimeMillis(); @@ -188,7 +180,6 @@ public class ThreadPoolTaskScheduler extends ExecutorConfigurationSupport } } - @Override public ScheduledFuture scheduleAtFixedRate(Runnable task, Date startTime, long period) { ScheduledExecutorService executor = getScheduledExecutor(); long initialDelay = startTime.getTime() - System.currentTimeMillis(); @@ -200,7 +191,6 @@ public class ThreadPoolTaskScheduler extends ExecutorConfigurationSupport } } - @Override public ScheduledFuture scheduleAtFixedRate(Runnable task, long period) { ScheduledExecutorService executor = getScheduledExecutor(); try { @@ -211,7 +201,6 @@ public class ThreadPoolTaskScheduler extends ExecutorConfigurationSupport } } - @Override public ScheduledFuture scheduleWithFixedDelay(Runnable task, Date startTime, long delay) { ScheduledExecutorService executor = getScheduledExecutor(); long initialDelay = startTime.getTime() - System.currentTimeMillis(); @@ -223,7 +212,6 @@ public class ThreadPoolTaskScheduler extends ExecutorConfigurationSupport } } - @Override public ScheduledFuture scheduleWithFixedDelay(Runnable task, long delay) { ScheduledExecutorService executor = getScheduledExecutor(); try { @@ -250,7 +238,6 @@ public class ThreadPoolTaskScheduler extends ExecutorConfigurationSupport this.errorHandler = errorHandler; } - @Override public V call() throws Exception { try { return delegate.call(); diff --git a/spring-context/src/main/java/org/springframework/scheduling/config/AnnotationDrivenBeanDefinitionParser.java b/spring-context/src/main/java/org/springframework/scheduling/config/AnnotationDrivenBeanDefinitionParser.java index 7900b9988e..39b86694d2 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/config/AnnotationDrivenBeanDefinitionParser.java +++ b/spring-context/src/main/java/org/springframework/scheduling/config/AnnotationDrivenBeanDefinitionParser.java @@ -69,7 +69,6 @@ public class AnnotationDrivenBeanDefinitionParser implements BeanDefinitionParse AnnotationConfigUtils.SCHEDULED_ANNOTATION_PROCESSOR_BEAN_NAME; - @Override public BeanDefinition parse(Element element, ParserContext parserContext) { Object source = parserContext.extractSource(element); diff --git a/spring-context/src/main/java/org/springframework/scheduling/config/ScheduledTaskRegistrar.java b/spring-context/src/main/java/org/springframework/scheduling/config/ScheduledTaskRegistrar.java index 8198caeb67..592fd033c1 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/config/ScheduledTaskRegistrar.java +++ b/spring-context/src/main/java/org/springframework/scheduling/config/ScheduledTaskRegistrar.java @@ -278,7 +278,6 @@ public class ScheduledTaskRegistrar implements InitializingBean, DisposableBean * Schedule all registered tasks against the underlying {@linkplain * #setTaskScheduler(TaskScheduler) task scheduler}. */ - @Override public void afterPropertiesSet() { long now = System.currentTimeMillis(); @@ -326,7 +325,6 @@ public class ScheduledTaskRegistrar implements InitializingBean, DisposableBean } } - @Override public void destroy() { for (ScheduledFuture future : this.scheduledFutures) { future.cancel(true); diff --git a/spring-context/src/main/java/org/springframework/scheduling/config/TaskExecutorFactoryBean.java b/spring-context/src/main/java/org/springframework/scheduling/config/TaskExecutorFactoryBean.java index d41e8703cd..b8d5d33d3d 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/config/TaskExecutorFactoryBean.java +++ b/spring-context/src/main/java/org/springframework/scheduling/config/TaskExecutorFactoryBean.java @@ -67,13 +67,11 @@ public class TaskExecutorFactoryBean implements this.keepAliveSeconds = keepAliveSeconds; } - @Override public void setBeanName(String beanName) { this.beanName = beanName; } - @Override public void afterPropertiesSet() throws Exception { Class executorClass = (shouldUseBackport() ? getClass().getClassLoader().loadClass("org.springframework.scheduling.backportconcurrent.ThreadPoolTaskExecutor") : @@ -147,12 +145,10 @@ public class TaskExecutorFactoryBean implements } - @Override public TaskExecutor getObject() { return this.target; } - @Override public Class getObjectType() { if (this.target != null) { return this.target.getClass(); @@ -160,13 +156,11 @@ public class TaskExecutorFactoryBean implements return (!shouldUseBackport() ? ThreadPoolTaskExecutor.class : TaskExecutor.class); } - @Override public boolean isSingleton() { return true; } - @Override public void destroy() throws Exception { if (this.target instanceof DisposableBean) { ((DisposableBean) this.target).destroy(); diff --git a/spring-context/src/main/java/org/springframework/scheduling/config/TaskNamespaceHandler.java b/spring-context/src/main/java/org/springframework/scheduling/config/TaskNamespaceHandler.java index 4d86209219..6ba1d5a552 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/config/TaskNamespaceHandler.java +++ b/spring-context/src/main/java/org/springframework/scheduling/config/TaskNamespaceHandler.java @@ -26,7 +26,6 @@ import org.springframework.beans.factory.xml.NamespaceHandlerSupport; */ public class TaskNamespaceHandler extends NamespaceHandlerSupport { - @Override public void init() { this.registerBeanDefinitionParser("annotation-driven", new AnnotationDrivenBeanDefinitionParser()); this.registerBeanDefinitionParser("executor", new ExecutorBeanDefinitionParser()); diff --git a/spring-context/src/main/java/org/springframework/scheduling/support/CronTrigger.java b/spring-context/src/main/java/org/springframework/scheduling/support/CronTrigger.java index 40e5c1792f..eca37982e6 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/support/CronTrigger.java +++ b/spring-context/src/main/java/org/springframework/scheduling/support/CronTrigger.java @@ -55,7 +55,6 @@ public class CronTrigger implements Trigger { } - @Override public Date nextExecutionTime(TriggerContext triggerContext) { Date date = triggerContext.lastCompletionTime(); if (date != null) { diff --git a/spring-context/src/main/java/org/springframework/scheduling/support/DelegatingErrorHandlingRunnable.java b/spring-context/src/main/java/org/springframework/scheduling/support/DelegatingErrorHandlingRunnable.java index 1bbb2c8493..69dda4327a 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/support/DelegatingErrorHandlingRunnable.java +++ b/spring-context/src/main/java/org/springframework/scheduling/support/DelegatingErrorHandlingRunnable.java @@ -48,7 +48,6 @@ public class DelegatingErrorHandlingRunnable implements Runnable { this.errorHandler = errorHandler; } - @Override public void run() { try { this.delegate.run(); diff --git a/spring-context/src/main/java/org/springframework/scheduling/support/MethodInvokingRunnable.java b/spring-context/src/main/java/org/springframework/scheduling/support/MethodInvokingRunnable.java index d118eca1b0..ffe79a1fce 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/support/MethodInvokingRunnable.java +++ b/spring-context/src/main/java/org/springframework/scheduling/support/MethodInvokingRunnable.java @@ -46,7 +46,6 @@ public class MethodInvokingRunnable extends ArgumentConvertingMethodInvoker private ClassLoader beanClassLoader = ClassUtils.getDefaultClassLoader(); - @Override public void setBeanClassLoader(ClassLoader classLoader) { this.beanClassLoader = classLoader; } @@ -56,13 +55,11 @@ public class MethodInvokingRunnable extends ArgumentConvertingMethodInvoker return ClassUtils.forName(className, this.beanClassLoader); } - @Override public void afterPropertiesSet() throws ClassNotFoundException, NoSuchMethodException { prepare(); } - @Override public void run() { try { invoke(); diff --git a/spring-context/src/main/java/org/springframework/scheduling/support/PeriodicTrigger.java b/spring-context/src/main/java/org/springframework/scheduling/support/PeriodicTrigger.java index f2e5a4fb0d..b494e4c5ff 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/support/PeriodicTrigger.java +++ b/spring-context/src/main/java/org/springframework/scheduling/support/PeriodicTrigger.java @@ -94,7 +94,6 @@ public class PeriodicTrigger implements Trigger { /** * Returns the time after which a task should run again. */ - @Override public Date nextExecutionTime(TriggerContext triggerContext) { if (triggerContext.lastScheduledExecutionTime() == null) { return new Date(System.currentTimeMillis() + this.initialDelay); diff --git a/spring-context/src/main/java/org/springframework/scheduling/support/ScheduledMethodRunnable.java b/spring-context/src/main/java/org/springframework/scheduling/support/ScheduledMethodRunnable.java index 63beb9b180..6b0ee62a89 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/support/ScheduledMethodRunnable.java +++ b/spring-context/src/main/java/org/springframework/scheduling/support/ScheduledMethodRunnable.java @@ -58,7 +58,6 @@ public class ScheduledMethodRunnable implements Runnable { } - @Override public void run() { try { ReflectionUtils.makeAccessible(this.method); diff --git a/spring-context/src/main/java/org/springframework/scheduling/support/SimpleTriggerContext.java b/spring-context/src/main/java/org/springframework/scheduling/support/SimpleTriggerContext.java index 75be34ae6c..69539b2d63 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/support/SimpleTriggerContext.java +++ b/spring-context/src/main/java/org/springframework/scheduling/support/SimpleTriggerContext.java @@ -48,17 +48,14 @@ public class SimpleTriggerContext implements TriggerContext { } - @Override public Date lastScheduledExecutionTime() { return this.lastScheduledExecutionTime; } - @Override public Date lastActualExecutionTime() { return this.lastActualExecutionTime; } - @Override public Date lastCompletionTime() { return this.lastCompletionTime; } diff --git a/spring-context/src/main/java/org/springframework/scheduling/support/TaskUtils.java b/spring-context/src/main/java/org/springframework/scheduling/support/TaskUtils.java index 6f2dd2c18c..81c16bc9a5 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/support/TaskUtils.java +++ b/spring-context/src/main/java/org/springframework/scheduling/support/TaskUtils.java @@ -90,7 +90,6 @@ public abstract class TaskUtils { private final Log logger = LogFactory.getLog(LoggingErrorHandler.class); - @Override public void handleError(Throwable t) { if (logger.isErrorEnabled()) { logger.error("Unexpected error occurred in scheduled task.", t); @@ -105,7 +104,6 @@ public abstract class TaskUtils { */ static class PropagatingErrorHandler extends LoggingErrorHandler { - @Override public void handleError(Throwable t) { super.handleError(t); ReflectionUtils.rethrowRuntimeException(t); diff --git a/spring-context/src/main/java/org/springframework/scheduling/timer/MethodInvokingTimerTaskFactoryBean.java b/spring-context/src/main/java/org/springframework/scheduling/timer/MethodInvokingTimerTaskFactoryBean.java index 1b9c978c38..389e9a76b9 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/timer/MethodInvokingTimerTaskFactoryBean.java +++ b/spring-context/src/main/java/org/springframework/scheduling/timer/MethodInvokingTimerTaskFactoryBean.java @@ -53,17 +53,14 @@ public class MethodInvokingTimerTaskFactoryBean extends MethodInvokingRunnable i } - @Override public TimerTask getObject() { return this.timerTask; } - @Override public Class getObjectType() { return TimerTask.class; } - @Override public boolean isSingleton() { return true; } diff --git a/spring-context/src/main/java/org/springframework/scheduling/timer/TimerFactoryBean.java b/spring-context/src/main/java/org/springframework/scheduling/timer/TimerFactoryBean.java index 18faa7926f..c0de9b4eb9 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/timer/TimerFactoryBean.java +++ b/spring-context/src/main/java/org/springframework/scheduling/timer/TimerFactoryBean.java @@ -88,13 +88,11 @@ public class TimerFactoryBean implements FactoryBean, BeanNameAware, Init this.daemon = daemon; } - @Override public void setBeanName(String beanName) { this.beanName = beanName; } - @Override public void afterPropertiesSet() { logger.info("Initializing Timer"); this.timer = createTimer(this.beanName, this.daemon); @@ -146,17 +144,14 @@ public class TimerFactoryBean implements FactoryBean, BeanNameAware, Init } - @Override public Timer getObject() { return this.timer; } - @Override public Class getObjectType() { return Timer.class; } - @Override public boolean isSingleton() { return true; } @@ -166,7 +161,6 @@ public class TimerFactoryBean implements FactoryBean, BeanNameAware, Init * Cancel the Timer on bean factory shutdown, stopping all scheduled tasks. * @see java.util.Timer#cancel() */ - @Override public void destroy() { logger.info("Cancelling Timer"); this.timer.cancel(); diff --git a/spring-context/src/main/java/org/springframework/scheduling/timer/TimerTaskExecutor.java b/spring-context/src/main/java/org/springframework/scheduling/timer/TimerTaskExecutor.java index af24b3ba18..03979dc45a 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/timer/TimerTaskExecutor.java +++ b/spring-context/src/main/java/org/springframework/scheduling/timer/TimerTaskExecutor.java @@ -96,13 +96,11 @@ public class TimerTaskExecutor implements SchedulingTaskExecutor, BeanNameAware, this.delay = delay; } - @Override public void setBeanName(String beanName) { this.beanName = beanName; } - @Override public void afterPropertiesSet() { if (this.timer == null) { logger.info("Initializing Timer"); @@ -143,25 +141,21 @@ public class TimerTaskExecutor implements SchedulingTaskExecutor, BeanNameAware, * wrapping it in a {@link DelegatingTimerTask}. * @param task the task to be executed */ - @Override public void execute(Runnable task) { getTimer().schedule(new DelegatingTimerTask(task), this.delay); } - @Override public void execute(Runnable task, long startTimeout) { long actualDelay = (startTimeout < this.delay ? startTimeout : this.delay); getTimer().schedule(new DelegatingTimerTask(task), actualDelay); } - @Override public Future submit(Runnable task) { FutureTask future = new FutureTask(task, null); execute(future); return future; } - @Override public Future submit(Callable task) { FutureTask future = new FutureTask(task); execute(future); @@ -171,7 +165,6 @@ public class TimerTaskExecutor implements SchedulingTaskExecutor, BeanNameAware, /** * This task executor prefers short-lived work units. */ - @Override public boolean prefersShortLivedTasks() { return true; } @@ -181,7 +174,6 @@ public class TimerTaskExecutor implements SchedulingTaskExecutor, BeanNameAware, * Cancel the {@link Timer} on bean factory shutdown, stopping all scheduled tasks. * @see java.util.Timer#cancel() */ - @Override public void destroy() { if (this.timerInternal) { logger.info("Cancelling Timer"); diff --git a/spring-context/src/main/java/org/springframework/scripting/bsh/BshScriptFactory.java b/spring-context/src/main/java/org/springframework/scripting/bsh/BshScriptFactory.java index f22a9a50a8..2d94a16cb8 100644 --- a/spring-context/src/main/java/org/springframework/scripting/bsh/BshScriptFactory.java +++ b/spring-context/src/main/java/org/springframework/scripting/bsh/BshScriptFactory.java @@ -84,18 +84,15 @@ public class BshScriptFactory implements ScriptFactory, BeanClassLoaderAware { this.scriptInterfaces = scriptInterfaces; } - @Override public void setBeanClassLoader(ClassLoader classLoader) { this.beanClassLoader = classLoader; } - @Override public String getScriptSourceLocator() { return this.scriptSourceLocator; } - @Override public Class[] getScriptInterfaces() { return this.scriptInterfaces; } @@ -103,7 +100,6 @@ public class BshScriptFactory implements ScriptFactory, BeanClassLoaderAware { /** * BeanShell scripts do require a config interface. */ - @Override public boolean requiresConfigInterface() { return true; } @@ -112,7 +108,6 @@ public class BshScriptFactory implements ScriptFactory, BeanClassLoaderAware { * Load and parse the BeanShell script via {@link BshScriptUtils}. * @see BshScriptUtils#createBshObject(String, Class[], ClassLoader) */ - @Override public Object getScriptedObject(ScriptSource scriptSource, Class[] actualInterfaces) throws IOException, ScriptCompilationException { @@ -164,7 +159,6 @@ public class BshScriptFactory implements ScriptFactory, BeanClassLoaderAware { } } - @Override public Class getScriptedObjectType(ScriptSource scriptSource) throws IOException, ScriptCompilationException { @@ -183,7 +177,6 @@ public class BshScriptFactory implements ScriptFactory, BeanClassLoaderAware { } } - @Override public boolean requiresScriptedObjectRefresh(ScriptSource scriptSource) { synchronized (this.scriptClassMonitor) { return (scriptSource.isModified() || this.wasModifiedForTypeCheck); diff --git a/spring-context/src/main/java/org/springframework/scripting/bsh/BshScriptUtils.java b/spring-context/src/main/java/org/springframework/scripting/bsh/BshScriptUtils.java index 1ad320493c..d71298e29c 100644 --- a/spring-context/src/main/java/org/springframework/scripting/bsh/BshScriptUtils.java +++ b/spring-context/src/main/java/org/springframework/scripting/bsh/BshScriptUtils.java @@ -173,7 +173,6 @@ public abstract class BshScriptUtils { this.xt = xt; } - @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { if (ReflectionUtils.isEqualsMethod(method)) { return (isProxyForSameBshObject(args[0])); diff --git a/spring-context/src/main/java/org/springframework/scripting/config/LangNamespaceHandler.java b/spring-context/src/main/java/org/springframework/scripting/config/LangNamespaceHandler.java index b7888faa78..e66455a8d6 100644 --- a/spring-context/src/main/java/org/springframework/scripting/config/LangNamespaceHandler.java +++ b/spring-context/src/main/java/org/springframework/scripting/config/LangNamespaceHandler.java @@ -39,7 +39,6 @@ import org.springframework.beans.factory.xml.NamespaceHandlerSupport; */ public class LangNamespaceHandler extends NamespaceHandlerSupport { - @Override public void init() { registerScriptBeanDefinitionParser("groovy", "org.springframework.scripting.groovy.GroovyScriptFactory"); registerScriptBeanDefinitionParser("jruby", "org.springframework.scripting.jruby.JRubyScriptFactory"); diff --git a/spring-context/src/main/java/org/springframework/scripting/config/ScriptingDefaultsParser.java b/spring-context/src/main/java/org/springframework/scripting/config/ScriptingDefaultsParser.java index b545262486..d0766b95f4 100644 --- a/spring-context/src/main/java/org/springframework/scripting/config/ScriptingDefaultsParser.java +++ b/spring-context/src/main/java/org/springframework/scripting/config/ScriptingDefaultsParser.java @@ -35,7 +35,6 @@ public class ScriptingDefaultsParser implements BeanDefinitionParser { private static final String PROXY_TARGET_CLASS_ATTRIBUTE = "proxy-target-class"; - @Override public BeanDefinition parse(Element element, ParserContext parserContext) { BeanDefinition bd = LangNamespaceUtils.registerScriptFactoryPostProcessorIfNecessary(parserContext.getRegistry()); diff --git a/spring-context/src/main/java/org/springframework/scripting/groovy/GroovyScriptFactory.java b/spring-context/src/main/java/org/springframework/scripting/groovy/GroovyScriptFactory.java index 85bebc5731..e40871defb 100644 --- a/spring-context/src/main/java/org/springframework/scripting/groovy/GroovyScriptFactory.java +++ b/spring-context/src/main/java/org/springframework/scripting/groovy/GroovyScriptFactory.java @@ -99,14 +99,12 @@ public class GroovyScriptFactory implements ScriptFactory, BeanFactoryAware, Bea } - @Override public void setBeanFactory(BeanFactory beanFactory) throws BeansException { if (beanFactory instanceof ConfigurableListableBeanFactory) { ((ConfigurableListableBeanFactory) beanFactory).ignoreDependencyType(MetaClass.class); } } - @Override public void setBeanClassLoader(ClassLoader classLoader) { this.groovyClassLoader = new GroovyClassLoader(classLoader); } @@ -124,7 +122,6 @@ public class GroovyScriptFactory implements ScriptFactory, BeanFactoryAware, Bea } - @Override public String getScriptSourceLocator() { return this.scriptSourceLocator; } @@ -134,7 +131,6 @@ public class GroovyScriptFactory implements ScriptFactory, BeanFactoryAware, Bea * hence we don't need to explicitly expose interfaces here. * @return {@code null} always */ - @Override public Class[] getScriptInterfaces() { return null; } @@ -143,7 +139,6 @@ public class GroovyScriptFactory implements ScriptFactory, BeanFactoryAware, Bea * Groovy scripts do not need a config interface, * since they expose their setters as public methods. */ - @Override public boolean requiresConfigInterface() { return false; } @@ -153,7 +148,6 @@ public class GroovyScriptFactory implements ScriptFactory, BeanFactoryAware, Bea * Loads and parses the Groovy script via the GroovyClassLoader. * @see groovy.lang.GroovyClassLoader */ - @Override public Object getScriptedObject(ScriptSource scriptSource, Class[] actualInterfaces) throws IOException, ScriptCompilationException { @@ -195,7 +189,6 @@ public class GroovyScriptFactory implements ScriptFactory, BeanFactoryAware, Bea } } - @Override public Class getScriptedObjectType(ScriptSource scriptSource) throws IOException, ScriptCompilationException { @@ -225,7 +218,6 @@ public class GroovyScriptFactory implements ScriptFactory, BeanFactoryAware, Bea } } - @Override public boolean requiresScriptedObjectRefresh(ScriptSource scriptSource) { synchronized (this.scriptClassMonitor) { return (scriptSource.isModified() || this.wasModifiedForTypeCheck); diff --git a/spring-context/src/main/java/org/springframework/scripting/jruby/JRubyScriptFactory.java b/spring-context/src/main/java/org/springframework/scripting/jruby/JRubyScriptFactory.java index d501a5e8a0..498033617d 100644 --- a/spring-context/src/main/java/org/springframework/scripting/jruby/JRubyScriptFactory.java +++ b/spring-context/src/main/java/org/springframework/scripting/jruby/JRubyScriptFactory.java @@ -67,18 +67,15 @@ public class JRubyScriptFactory implements ScriptFactory, BeanClassLoaderAware { } - @Override public void setBeanClassLoader(ClassLoader classLoader) { this.beanClassLoader = classLoader; } - @Override public String getScriptSourceLocator() { return this.scriptSourceLocator; } - @Override public Class[] getScriptInterfaces() { return this.scriptInterfaces; } @@ -86,7 +83,6 @@ public class JRubyScriptFactory implements ScriptFactory, BeanClassLoaderAware { /** * JRuby scripts do require a config interface. */ - @Override public boolean requiresConfigInterface() { return true; } @@ -95,7 +91,6 @@ public class JRubyScriptFactory implements ScriptFactory, BeanClassLoaderAware { * Load and parse the JRuby script via JRubyScriptUtils. * @see JRubyScriptUtils#createJRubyObject(String, Class[], ClassLoader) */ - @Override public Object getScriptedObject(ScriptSource scriptSource, Class[] actualInterfaces) throws IOException, ScriptCompilationException { try { @@ -113,14 +108,12 @@ public class JRubyScriptFactory implements ScriptFactory, BeanClassLoaderAware { } } - @Override public Class getScriptedObjectType(ScriptSource scriptSource) throws IOException, ScriptCompilationException { return null; } - @Override public boolean requiresScriptedObjectRefresh(ScriptSource scriptSource) { return scriptSource.isModified(); } diff --git a/spring-context/src/main/java/org/springframework/scripting/jruby/JRubyScriptUtils.java b/spring-context/src/main/java/org/springframework/scripting/jruby/JRubyScriptUtils.java index 1aecc365a8..2271d1b53d 100644 --- a/spring-context/src/main/java/org/springframework/scripting/jruby/JRubyScriptUtils.java +++ b/spring-context/src/main/java/org/springframework/scripting/jruby/JRubyScriptUtils.java @@ -161,7 +161,6 @@ public abstract class JRubyScriptUtils { this.ruby = ruby; } - @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { if (ReflectionUtils.isEqualsMethod(method)) { return (isProxyForSameRubyObject(args[0])); diff --git a/spring-context/src/main/java/org/springframework/scripting/support/ResourceScriptSource.java b/spring-context/src/main/java/org/springframework/scripting/support/ResourceScriptSource.java index ea4ee583d2..23be717eac 100644 --- a/spring-context/src/main/java/org/springframework/scripting/support/ResourceScriptSource.java +++ b/spring-context/src/main/java/org/springframework/scripting/support/ResourceScriptSource.java @@ -74,7 +74,6 @@ public class ResourceScriptSource implements ScriptSource { return this.resource; } - @Override public String getScriptAsString() throws IOException { synchronized (this.lastModifiedMonitor) { this.lastModified = retrieveLastModifiedTime(); @@ -87,7 +86,6 @@ public class ResourceScriptSource implements ScriptSource { return FileCopyUtils.copyToString(reader); } - @Override public boolean isModified() { synchronized (this.lastModifiedMonitor) { return (this.lastModified < 0 || retrieveLastModifiedTime() > this.lastModified); @@ -110,7 +108,6 @@ public class ResourceScriptSource implements ScriptSource { } } - @Override public String suggestedClassName() { return StringUtils.stripFilenameExtension(getResource().getFilename()); } diff --git a/spring-context/src/main/java/org/springframework/scripting/support/ScriptFactoryPostProcessor.java b/spring-context/src/main/java/org/springframework/scripting/support/ScriptFactoryPostProcessor.java index 84ea6a9d27..d46917005f 100644 --- a/spring-context/src/main/java/org/springframework/scripting/support/ScriptFactoryPostProcessor.java +++ b/spring-context/src/main/java/org/springframework/scripting/support/ScriptFactoryPostProcessor.java @@ -200,12 +200,10 @@ public class ScriptFactoryPostProcessor extends InstantiationAwareBeanPostProces this.defaultProxyTargetClass = defaultProxyTargetClass; } - @Override public void setBeanClassLoader(ClassLoader classLoader) { this.beanClassLoader = classLoader; } - @Override public void setBeanFactory(BeanFactory beanFactory) { if (!(beanFactory instanceof ConfigurableBeanFactory)) { throw new IllegalStateException("ScriptFactoryPostProcessor doesn't work with a BeanFactory " @@ -228,12 +226,10 @@ public class ScriptFactoryPostProcessor extends InstantiationAwareBeanPostProces } } - @Override public void setResourceLoader(ResourceLoader resourceLoader) { this.resourceLoader = resourceLoader; } - @Override public int getOrder() { return Integer.MIN_VALUE; } @@ -574,7 +570,6 @@ public class ScriptFactoryPostProcessor extends InstantiationAwareBeanPostProces /** * Destroy the inner bean factory (used for scripts) on shutdown. */ - @Override public void destroy() { this.scriptBeanFactory.destroySingletons(); } diff --git a/spring-context/src/main/java/org/springframework/scripting/support/StaticScriptSource.java b/spring-context/src/main/java/org/springframework/scripting/support/StaticScriptSource.java index dbd937a0f0..5afede47a8 100644 --- a/spring-context/src/main/java/org/springframework/scripting/support/StaticScriptSource.java +++ b/spring-context/src/main/java/org/springframework/scripting/support/StaticScriptSource.java @@ -68,18 +68,15 @@ public class StaticScriptSource implements ScriptSource { } - @Override public synchronized String getScriptAsString() { this.modified = false; return this.script; } - @Override public synchronized boolean isModified() { return this.modified; } - @Override public String suggestedClassName() { return this.className; } diff --git a/spring-context/src/main/java/org/springframework/ui/ExtendedModelMap.java b/spring-context/src/main/java/org/springframework/ui/ExtendedModelMap.java index c7b6ffbb14..b2710d4bde 100644 --- a/spring-context/src/main/java/org/springframework/ui/ExtendedModelMap.java +++ b/spring-context/src/main/java/org/springframework/ui/ExtendedModelMap.java @@ -59,7 +59,6 @@ public class ExtendedModelMap extends ModelMap implements Model { return this; } - @Override public Map asMap() { return this; } diff --git a/spring-context/src/main/java/org/springframework/ui/context/support/DelegatingThemeSource.java b/spring-context/src/main/java/org/springframework/ui/context/support/DelegatingThemeSource.java index 290754c719..d884bf5761 100644 --- a/spring-context/src/main/java/org/springframework/ui/context/support/DelegatingThemeSource.java +++ b/spring-context/src/main/java/org/springframework/ui/context/support/DelegatingThemeSource.java @@ -36,18 +36,15 @@ public class DelegatingThemeSource implements HierarchicalThemeSource { private ThemeSource parentThemeSource; - @Override public void setParentThemeSource(ThemeSource parentThemeSource) { this.parentThemeSource = parentThemeSource; } - @Override public ThemeSource getParentThemeSource() { return parentThemeSource; } - @Override public Theme getTheme(String themeName) { if (this.parentThemeSource != null) { return this.parentThemeSource.getTheme(themeName); diff --git a/spring-context/src/main/java/org/springframework/ui/context/support/ResourceBundleThemeSource.java b/spring-context/src/main/java/org/springframework/ui/context/support/ResourceBundleThemeSource.java index c595af8cf2..a0c195df32 100644 --- a/spring-context/src/main/java/org/springframework/ui/context/support/ResourceBundleThemeSource.java +++ b/spring-context/src/main/java/org/springframework/ui/context/support/ResourceBundleThemeSource.java @@ -53,7 +53,6 @@ public class ResourceBundleThemeSource implements HierarchicalThemeSource { private final Map themeCache = new HashMap(); - @Override public void setParentThemeSource(ThemeSource parent) { this.parentThemeSource = parent; @@ -66,7 +65,6 @@ public class ResourceBundleThemeSource implements HierarchicalThemeSource { } } - @Override public ThemeSource getParentThemeSource() { return this.parentThemeSource; } @@ -95,7 +93,6 @@ public class ResourceBundleThemeSource implements HierarchicalThemeSource { * @see #setBasenamePrefix * @see #createMessageSource */ - @Override public Theme getTheme(String themeName) { if (themeName == null) { return null; diff --git a/spring-context/src/main/java/org/springframework/ui/context/support/SimpleTheme.java b/spring-context/src/main/java/org/springframework/ui/context/support/SimpleTheme.java index b83b69523d..16c47413d7 100644 --- a/spring-context/src/main/java/org/springframework/ui/context/support/SimpleTheme.java +++ b/spring-context/src/main/java/org/springframework/ui/context/support/SimpleTheme.java @@ -47,12 +47,10 @@ public class SimpleTheme implements Theme { } - @Override public final String getName() { return this.name; } - @Override public final MessageSource getMessageSource() { return this.messageSource; } diff --git a/spring-context/src/main/java/org/springframework/validation/AbstractBindingResult.java b/spring-context/src/main/java/org/springframework/validation/AbstractBindingResult.java index 5d33eb37ec..65ead97598 100644 --- a/spring-context/src/main/java/org/springframework/validation/AbstractBindingResult.java +++ b/spring-context/src/main/java/org/springframework/validation/AbstractBindingResult.java @@ -84,18 +84,15 @@ public abstract class AbstractBindingResult extends AbstractErrors implements Bi // Implementation of the Errors interface //--------------------------------------------------------------------- - @Override public String getObjectName() { return this.objectName; } - @Override public void reject(String errorCode, Object[] errorArgs, String defaultMessage) { addError(new ObjectError(getObjectName(), resolveMessageCodes(errorCode), errorArgs, defaultMessage)); } - @Override public void rejectValue(String field, String errorCode, Object[] errorArgs, String defaultMessage) { if ("".equals(getNestedPath()) && !StringUtils.hasLength(field)) { // We're at the top of the nested object hierarchy, @@ -112,12 +109,10 @@ public abstract class AbstractBindingResult extends AbstractErrors implements Bi addError(fe); } - @Override public void addError(ObjectError error) { this.errors.add(error); } - @Override public void addAllErrors(Errors errors) { if (!errors.getObjectName().equals(getObjectName())) { throw new IllegalArgumentException("Errors object needs to have same object name"); @@ -125,12 +120,10 @@ public abstract class AbstractBindingResult extends AbstractErrors implements Bi this.errors.addAll(errors.getAllErrors()); } - @Override public String[] resolveMessageCodes(String errorCode) { return getMessageCodesResolver().resolveMessageCodes(errorCode, getObjectName()); } - @Override public String[] resolveMessageCodes(String errorCode, String field) { Class fieldType = getFieldType(field); return getMessageCodesResolver().resolveMessageCodes( @@ -153,7 +146,6 @@ public abstract class AbstractBindingResult extends AbstractErrors implements Bi return Collections.unmodifiableList(this.errors); } - @Override public List getGlobalErrors() { List result = new LinkedList(); for (ObjectError objectError : this.errors) { @@ -174,7 +166,6 @@ public abstract class AbstractBindingResult extends AbstractErrors implements Bi return null; } - @Override public List getFieldErrors() { List result = new LinkedList(); for (ObjectError objectError : this.errors) { @@ -221,7 +212,6 @@ public abstract class AbstractBindingResult extends AbstractErrors implements Bi return null; } - @Override public Object getFieldValue(String field) { FieldError fieldError = getFieldError(field); // Use rejected value in case of error, current bean property value else. @@ -272,7 +262,6 @@ public abstract class AbstractBindingResult extends AbstractErrors implements Bi * @see org.springframework.web.servlet.tags.BindTag * @see org.springframework.web.servlet.mvc.SimpleFormController */ - @Override public Map getModel() { Map model = new LinkedHashMap(2); // Mapping from name to target object. @@ -282,7 +271,6 @@ public abstract class AbstractBindingResult extends AbstractErrors implements Bi return model; } - @Override public Object getRawFieldValue(String field) { return getActualFieldValue(fixedField(field)); } @@ -292,7 +280,6 @@ public abstract class AbstractBindingResult extends AbstractErrors implements Bi * {@link #getPropertyEditorRegistry() PropertyEditorRegistry}'s * editor lookup facility, if available. */ - @Override public PropertyEditor findEditor(String field, Class valueType) { PropertyEditorRegistry editorRegistry = getPropertyEditorRegistry(); if (editorRegistry != null) { @@ -310,7 +297,6 @@ public abstract class AbstractBindingResult extends AbstractErrors implements Bi /** * This implementation returns {@code null}. */ - @Override public PropertyEditorRegistry getPropertyEditorRegistry() { return null; } @@ -321,7 +307,6 @@ public abstract class AbstractBindingResult extends AbstractErrors implements Bi * detected to target a disallowed field. * @see DataBinder#setAllowedFields */ - @Override public void recordSuppressedField(String field) { this.suppressedFields.add(field); } @@ -332,7 +317,6 @@ public abstract class AbstractBindingResult extends AbstractErrors implements Bi * disallowed fields. * @see DataBinder#setAllowedFields */ - @Override public String[] getSuppressedFields() { return StringUtils.toStringArray(this.suppressedFields); } @@ -365,7 +349,6 @@ public abstract class AbstractBindingResult extends AbstractErrors implements Bi /** * Return the wrapped target object. */ - @Override public abstract Object getTarget(); /** diff --git a/spring-context/src/main/java/org/springframework/validation/AbstractErrors.java b/spring-context/src/main/java/org/springframework/validation/AbstractErrors.java index 18c566644c..3ab515bc89 100644 --- a/spring-context/src/main/java/org/springframework/validation/AbstractErrors.java +++ b/spring-context/src/main/java/org/springframework/validation/AbstractErrors.java @@ -41,24 +41,20 @@ public abstract class AbstractErrors implements Errors, Serializable { private final Stack nestedPathStack = new Stack(); - @Override public void setNestedPath(String nestedPath) { doSetNestedPath(nestedPath); this.nestedPathStack.clear(); } - @Override public String getNestedPath() { return this.nestedPath; } - @Override public void pushNestedPath(String subPath) { this.nestedPathStack.push(getNestedPath()); doSetNestedPath(getNestedPath() + subPath); } - @Override public void popNestedPath() throws IllegalArgumentException { try { String formerNestedPath = this.nestedPathStack.pop(); @@ -110,38 +106,31 @@ public abstract class AbstractErrors implements Errors, Serializable { } - @Override public void reject(String errorCode) { reject(errorCode, null, null); } - @Override public void reject(String errorCode, String defaultMessage) { reject(errorCode, null, defaultMessage); } - @Override public void rejectValue(String field, String errorCode) { rejectValue(field, errorCode, null, null); } - @Override public void rejectValue(String field, String errorCode, String defaultMessage) { rejectValue(field, errorCode, null, defaultMessage); } - @Override public boolean hasErrors() { return !getAllErrors().isEmpty(); } - @Override public int getErrorCount() { return getAllErrors().size(); } - @Override public List getAllErrors() { List result = new LinkedList(); result.addAll(getGlobalErrors()); @@ -149,49 +138,40 @@ public abstract class AbstractErrors implements Errors, Serializable { return Collections.unmodifiableList(result); } - @Override public boolean hasGlobalErrors() { return (getGlobalErrorCount() > 0); } - @Override public int getGlobalErrorCount() { return getGlobalErrors().size(); } - @Override public ObjectError getGlobalError() { List globalErrors = getGlobalErrors(); return (!globalErrors.isEmpty() ? globalErrors.get(0) : null); } - @Override public boolean hasFieldErrors() { return (getFieldErrorCount() > 0); } - @Override public int getFieldErrorCount() { return getFieldErrors().size(); } - @Override public FieldError getFieldError() { List fieldErrors = getFieldErrors(); return (!fieldErrors.isEmpty() ? fieldErrors.get(0) : null); } - @Override public boolean hasFieldErrors(String field) { return (getFieldErrorCount(field) > 0); } - @Override public int getFieldErrorCount(String field) { return getFieldErrors(field).size(); } - @Override public List getFieldErrors(String field) { List fieldErrors = getFieldErrors(); List result = new LinkedList(); @@ -204,14 +184,12 @@ public abstract class AbstractErrors implements Errors, Serializable { return Collections.unmodifiableList(result); } - @Override public FieldError getFieldError(String field) { List fieldErrors = getFieldErrors(field); return (!fieldErrors.isEmpty() ? fieldErrors.get(0) : null); } - @Override public Class getFieldType(String field) { Object value = getFieldValue(field); if (value != null) { diff --git a/spring-context/src/main/java/org/springframework/validation/BindException.java b/spring-context/src/main/java/org/springframework/validation/BindException.java index fc3e8e00fa..e7896996b3 100644 --- a/spring-context/src/main/java/org/springframework/validation/BindException.java +++ b/spring-context/src/main/java/org/springframework/validation/BindException.java @@ -77,200 +77,161 @@ public class BindException extends Exception implements BindingResult { } - @Override public String getObjectName() { return this.bindingResult.getObjectName(); } - @Override public void setNestedPath(String nestedPath) { this.bindingResult.setNestedPath(nestedPath); } - @Override public String getNestedPath() { return this.bindingResult.getNestedPath(); } - @Override public void pushNestedPath(String subPath) { this.bindingResult.pushNestedPath(subPath); } - @Override public void popNestedPath() throws IllegalStateException { this.bindingResult.popNestedPath(); } - @Override public void reject(String errorCode) { this.bindingResult.reject(errorCode); } - @Override public void reject(String errorCode, String defaultMessage) { this.bindingResult.reject(errorCode, defaultMessage); } - @Override public void reject(String errorCode, Object[] errorArgs, String defaultMessage) { this.bindingResult.reject(errorCode, errorArgs, defaultMessage); } - @Override public void rejectValue(String field, String errorCode) { this.bindingResult.rejectValue(field, errorCode); } - @Override public void rejectValue(String field, String errorCode, String defaultMessage) { this.bindingResult.rejectValue(field, errorCode, defaultMessage); } - @Override public void rejectValue(String field, String errorCode, Object[] errorArgs, String defaultMessage) { this.bindingResult.rejectValue(field, errorCode, errorArgs, defaultMessage); } - @Override public void addAllErrors(Errors errors) { this.bindingResult.addAllErrors(errors); } - @Override public boolean hasErrors() { return this.bindingResult.hasErrors(); } - @Override public int getErrorCount() { return this.bindingResult.getErrorCount(); } - @Override public List getAllErrors() { return this.bindingResult.getAllErrors(); } - @Override public boolean hasGlobalErrors() { return this.bindingResult.hasGlobalErrors(); } - @Override public int getGlobalErrorCount() { return this.bindingResult.getGlobalErrorCount(); } - @Override public List getGlobalErrors() { return this.bindingResult.getGlobalErrors(); } - @Override public ObjectError getGlobalError() { return this.bindingResult.getGlobalError(); } - @Override public boolean hasFieldErrors() { return this.bindingResult.hasFieldErrors(); } - @Override public int getFieldErrorCount() { return this.bindingResult.getFieldErrorCount(); } - @Override public List getFieldErrors() { return this.bindingResult.getFieldErrors(); } - @Override public FieldError getFieldError() { return this.bindingResult.getFieldError(); } - @Override public boolean hasFieldErrors(String field) { return this.bindingResult.hasFieldErrors(field); } - @Override public int getFieldErrorCount(String field) { return this.bindingResult.getFieldErrorCount(field); } - @Override public List getFieldErrors(String field) { return this.bindingResult.getFieldErrors(field); } - @Override public FieldError getFieldError(String field) { return this.bindingResult.getFieldError(field); } - @Override public Object getFieldValue(String field) { return this.bindingResult.getFieldValue(field); } - @Override public Class getFieldType(String field) { return this.bindingResult.getFieldType(field); } - @Override public Object getTarget() { return this.bindingResult.getTarget(); } - @Override public Map getModel() { return this.bindingResult.getModel(); } - @Override public Object getRawFieldValue(String field) { return this.bindingResult.getRawFieldValue(field); } - @Override @SuppressWarnings("rawtypes") public PropertyEditor findEditor(String field, Class valueType) { return this.bindingResult.findEditor(field, valueType); } - @Override public PropertyEditorRegistry getPropertyEditorRegistry() { return this.bindingResult.getPropertyEditorRegistry(); } - @Override public void addError(ObjectError error) { this.bindingResult.addError(error); } - @Override public String[] resolveMessageCodes(String errorCode) { return this.bindingResult.resolveMessageCodes(errorCode); } - @Override public String[] resolveMessageCodes(String errorCode, String field) { return this.bindingResult.resolveMessageCodes(errorCode, field); } - @Override public void recordSuppressedField(String field) { this.bindingResult.recordSuppressedField(field); } - @Override public String[] getSuppressedFields() { return this.bindingResult.getSuppressedFields(); } diff --git a/spring-context/src/main/java/org/springframework/validation/DataBinder.java b/spring-context/src/main/java/org/springframework/validation/DataBinder.java index 791668470a..a9d5d83587 100644 --- a/spring-context/src/main/java/org/springframework/validation/DataBinder.java +++ b/spring-context/src/main/java/org/springframework/validation/DataBinder.java @@ -532,34 +532,28 @@ public class DataBinder implements PropertyEditorRegistry, TypeConverter { return this.conversionService; } - @Override public void registerCustomEditor(Class requiredType, PropertyEditor propertyEditor) { getPropertyEditorRegistry().registerCustomEditor(requiredType, propertyEditor); } - @Override public void registerCustomEditor(Class requiredType, String field, PropertyEditor propertyEditor) { getPropertyEditorRegistry().registerCustomEditor(requiredType, field, propertyEditor); } - @Override public PropertyEditor findCustomEditor(Class requiredType, String propertyPath) { return getPropertyEditorRegistry().findCustomEditor(requiredType, propertyPath); } - @Override public T convertIfNecessary(Object value, Class requiredType) throws TypeMismatchException { return getTypeConverter().convertIfNecessary(value, requiredType); } - @Override public T convertIfNecessary(Object value, Class requiredType, MethodParameter methodParam) throws TypeMismatchException { return getTypeConverter().convertIfNecessary(value, requiredType, methodParam); } - @Override public T convertIfNecessary(Object value, Class requiredType, Field field) throws TypeMismatchException { diff --git a/spring-context/src/main/java/org/springframework/validation/DefaultBindingErrorProcessor.java b/spring-context/src/main/java/org/springframework/validation/DefaultBindingErrorProcessor.java index e1ae7d4b5d..08fc3b97e5 100644 --- a/spring-context/src/main/java/org/springframework/validation/DefaultBindingErrorProcessor.java +++ b/spring-context/src/main/java/org/springframework/validation/DefaultBindingErrorProcessor.java @@ -52,7 +52,6 @@ public class DefaultBindingErrorProcessor implements BindingErrorProcessor { public static final String MISSING_FIELD_ERROR_CODE = "required"; - @Override public void processMissingFieldError(String missingField, BindingResult bindingResult) { // Create field error with code "required". String fixedField = bindingResult.getNestedPath() + missingField; @@ -63,7 +62,6 @@ public class DefaultBindingErrorProcessor implements BindingErrorProcessor { codes, arguments, "Field '" + fixedField + "' is required")); } - @Override public void processPropertyAccessException(PropertyAccessException ex, BindingResult bindingResult) { // Create field error with the exceptions's code, e.g. "typeMismatch". String field = ex.getPropertyName(); diff --git a/spring-context/src/main/java/org/springframework/validation/DefaultMessageCodesResolver.java b/spring-context/src/main/java/org/springframework/validation/DefaultMessageCodesResolver.java index 4973f1e480..4dc62f449f 100644 --- a/spring-context/src/main/java/org/springframework/validation/DefaultMessageCodesResolver.java +++ b/spring-context/src/main/java/org/springframework/validation/DefaultMessageCodesResolver.java @@ -131,7 +131,6 @@ public class DefaultMessageCodesResolver implements MessageCodesResolver, Serial } - @Override public String[] resolveMessageCodes(String errorCode, String objectName) { return resolveMessageCodes(errorCode, objectName, "", null); } @@ -145,7 +144,6 @@ public class DefaultMessageCodesResolver implements MessageCodesResolver, Serial * details on the generated codes. * @return the list of codes */ - @Override public String[] resolveMessageCodes(String errorCode, String objectName, String field, Class fieldType) { Set codeList = new LinkedHashSet(); List fieldList = new ArrayList(); @@ -222,7 +220,6 @@ public class DefaultMessageCodesResolver implements MessageCodesResolver, Serial * {@code errorCode + "." + object name + "." + field} */ PREFIX_ERROR_CODE { - @Override public String format(String errorCode, String objectName, String field) { return toDelimitedString(errorCode, objectName, field); } @@ -233,7 +230,6 @@ public class DefaultMessageCodesResolver implements MessageCodesResolver, Serial * {@code object name + "." + field + "." + errorCode} */ POSTFIX_ERROR_CODE { - @Override public String format(String errorCode, String objectName, String field) { return toDelimitedString(objectName, field, errorCode); } diff --git a/spring-context/src/main/java/org/springframework/validation/beanvalidation/BeanValidationPostProcessor.java b/spring-context/src/main/java/org/springframework/validation/beanvalidation/BeanValidationPostProcessor.java index bac3469b82..a886af7ec0 100644 --- a/spring-context/src/main/java/org/springframework/validation/beanvalidation/BeanValidationPostProcessor.java +++ b/spring-context/src/main/java/org/springframework/validation/beanvalidation/BeanValidationPostProcessor.java @@ -72,7 +72,6 @@ public class BeanValidationPostProcessor implements BeanPostProcessor, Initializ this.afterInitialization = afterInitialization; } - @Override public void afterPropertiesSet() { if (this.validator == null) { this.validator = Validation.buildDefaultValidatorFactory().getValidator(); @@ -80,7 +79,6 @@ public class BeanValidationPostProcessor implements BeanPostProcessor, Initializ } - @Override public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { if (!this.afterInitialization) { doValidate(bean); @@ -88,7 +86,6 @@ public class BeanValidationPostProcessor implements BeanPostProcessor, Initializ return bean; } - @Override public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { if (this.afterInitialization) { doValidate(bean); diff --git a/spring-context/src/main/java/org/springframework/validation/beanvalidation/CustomValidatorBean.java b/spring-context/src/main/java/org/springframework/validation/beanvalidation/CustomValidatorBean.java index bf7d220795..0c5ff8f383 100644 --- a/spring-context/src/main/java/org/springframework/validation/beanvalidation/CustomValidatorBean.java +++ b/spring-context/src/main/java/org/springframework/validation/beanvalidation/CustomValidatorBean.java @@ -65,7 +65,6 @@ public class CustomValidatorBean extends SpringValidatorAdapter implements Valid } - @Override public void afterPropertiesSet() { if (this.validatorFactory == null) { this.validatorFactory = Validation.buildDefaultValidatorFactory(); diff --git a/spring-context/src/main/java/org/springframework/validation/beanvalidation/LocalValidatorFactoryBean.java b/spring-context/src/main/java/org/springframework/validation/beanvalidation/LocalValidatorFactoryBean.java index 48e3372dd3..1cc392278f 100644 --- a/spring-context/src/main/java/org/springframework/validation/beanvalidation/LocalValidatorFactoryBean.java +++ b/spring-context/src/main/java/org/springframework/validation/beanvalidation/LocalValidatorFactoryBean.java @@ -171,13 +171,11 @@ public class LocalValidatorFactoryBean extends SpringValidatorAdapter return this.validationPropertyMap; } - @Override public void setApplicationContext(ApplicationContext applicationContext) { this.applicationContext = applicationContext; } - @Override @SuppressWarnings("unchecked") public void afterPropertiesSet() { @SuppressWarnings("rawtypes") @@ -224,27 +222,22 @@ public class LocalValidatorFactoryBean extends SpringValidatorAdapter } - @Override public Validator getValidator() { return this.validatorFactory.getValidator(); } - @Override public ValidatorContext usingContext() { return this.validatorFactory.usingContext(); } - @Override public MessageInterpolator getMessageInterpolator() { return this.validatorFactory.getMessageInterpolator(); } - @Override public TraversableResolver getTraversableResolver() { return this.validatorFactory.getTraversableResolver(); } - @Override public ConstraintValidatorFactory getConstraintValidatorFactory() { return this.validatorFactory.getConstraintValidatorFactory(); } diff --git a/spring-context/src/main/java/org/springframework/validation/beanvalidation/LocaleContextMessageInterpolator.java b/spring-context/src/main/java/org/springframework/validation/beanvalidation/LocaleContextMessageInterpolator.java index 492d635acc..2bb8afdfaa 100644 --- a/spring-context/src/main/java/org/springframework/validation/beanvalidation/LocaleContextMessageInterpolator.java +++ b/spring-context/src/main/java/org/springframework/validation/beanvalidation/LocaleContextMessageInterpolator.java @@ -45,12 +45,10 @@ public class LocaleContextMessageInterpolator implements MessageInterpolator { } - @Override public String interpolate(String message, Context context) { return this.targetInterpolator.interpolate(message, context, LocaleContextHolder.getLocale()); } - @Override public String interpolate(String message, Context context, Locale locale) { return this.targetInterpolator.interpolate(message, context, locale); } diff --git a/spring-context/src/main/java/org/springframework/validation/beanvalidation/MessageSourceResourceBundleLocator.java b/spring-context/src/main/java/org/springframework/validation/beanvalidation/MessageSourceResourceBundleLocator.java index b6ba34bdda..9b9dac21b5 100644 --- a/spring-context/src/main/java/org/springframework/validation/beanvalidation/MessageSourceResourceBundleLocator.java +++ b/spring-context/src/main/java/org/springframework/validation/beanvalidation/MessageSourceResourceBundleLocator.java @@ -48,7 +48,6 @@ public class MessageSourceResourceBundleLocator implements ResourceBundleLocator this.messageSource = messageSource; } - @Override public ResourceBundle getResourceBundle(Locale locale) { return new MessageSourceResourceBundle(this.messageSource, locale); } diff --git a/spring-context/src/main/java/org/springframework/validation/beanvalidation/MethodValidationInterceptor.java b/spring-context/src/main/java/org/springframework/validation/beanvalidation/MethodValidationInterceptor.java index b2e06ed05c..58cd161175 100644 --- a/spring-context/src/main/java/org/springframework/validation/beanvalidation/MethodValidationInterceptor.java +++ b/spring-context/src/main/java/org/springframework/validation/beanvalidation/MethodValidationInterceptor.java @@ -83,7 +83,6 @@ public class MethodValidationInterceptor implements MethodInterceptor { } - @Override public Object invoke(MethodInvocation invocation) throws Throwable { Class[] groups = determineValidationGroups(invocation); Set> result = this.validator.validateAllParameters( diff --git a/spring-context/src/main/java/org/springframework/validation/beanvalidation/MethodValidationPostProcessor.java b/spring-context/src/main/java/org/springframework/validation/beanvalidation/MethodValidationPostProcessor.java index de7450ed6f..c8d909bd42 100644 --- a/spring-context/src/main/java/org/springframework/validation/beanvalidation/MethodValidationPostProcessor.java +++ b/spring-context/src/main/java/org/springframework/validation/beanvalidation/MethodValidationPostProcessor.java @@ -96,7 +96,6 @@ public class MethodValidationPostProcessor extends AbstractAdvisingBeanPostProce this.validator = validatorFactory.getValidator(); } - @Override public void afterPropertiesSet() { Pointcut pointcut = new AnnotationMatchingPointcut(this.validatedAnnotationType, true); Advice advice = (this.validator != null ? new MethodValidationInterceptor(this.validator) : diff --git a/spring-context/src/main/java/org/springframework/validation/beanvalidation/SpringConstraintValidatorFactory.java b/spring-context/src/main/java/org/springframework/validation/beanvalidation/SpringConstraintValidatorFactory.java index 2f9dd91531..3c4cff91d2 100644 --- a/spring-context/src/main/java/org/springframework/validation/beanvalidation/SpringConstraintValidatorFactory.java +++ b/spring-context/src/main/java/org/springframework/validation/beanvalidation/SpringConstraintValidatorFactory.java @@ -46,7 +46,6 @@ public class SpringConstraintValidatorFactory implements ConstraintValidatorFact } - @Override public > T getInstance(Class key) { return this.beanFactory.createBean(key); } diff --git a/spring-context/src/main/java/org/springframework/validation/beanvalidation/SpringValidatorAdapter.java b/spring-context/src/main/java/org/springframework/validation/beanvalidation/SpringValidatorAdapter.java index 99e9802234..1a51c37bb9 100644 --- a/spring-context/src/main/java/org/springframework/validation/beanvalidation/SpringValidatorAdapter.java +++ b/spring-context/src/main/java/org/springframework/validation/beanvalidation/SpringValidatorAdapter.java @@ -81,17 +81,14 @@ public class SpringValidatorAdapter implements SmartValidator, javax.validation. // Implementation of Spring Validator interface //--------------------------------------------------------------------- - @Override public boolean supports(Class clazz) { return true; } - @Override public void validate(Object target, Errors errors) { processConstraintViolations(this.targetValidator.validate(target), errors); } - @Override @SuppressWarnings("rawtypes") public void validate(Object target, Errors errors, Object... validationHints) { Set groups = new LinkedHashSet(); @@ -194,29 +191,24 @@ public class SpringValidatorAdapter implements SmartValidator, javax.validation. // Implementation of JSR-303 Validator interface //--------------------------------------------------------------------- - @Override public Set> validate(T object, Class... groups) { return this.targetValidator.validate(object, groups); } - @Override public Set> validateProperty(T object, String propertyName, Class... groups) { return this.targetValidator.validateProperty(object, propertyName, groups); } - @Override public Set> validateValue( Class beanType, String propertyName, Object value, Class... groups) { return this.targetValidator.validateValue(beanType, propertyName, value, groups); } - @Override public BeanDescriptor getConstraintsForClass(Class clazz) { return this.targetValidator.getConstraintsForClass(clazz); } - @Override public T unwrap(Class type) { return this.targetValidator.unwrap(type); } diff --git a/spring-core/src/main/java/org/springframework/core/AttributeAccessorSupport.java b/spring-core/src/main/java/org/springframework/core/AttributeAccessorSupport.java index dbbe1aff51..cf351f42cf 100644 --- a/spring-core/src/main/java/org/springframework/core/AttributeAccessorSupport.java +++ b/spring-core/src/main/java/org/springframework/core/AttributeAccessorSupport.java @@ -39,7 +39,6 @@ public abstract class AttributeAccessorSupport implements AttributeAccessor, Ser private final Map attributes = new LinkedHashMap(0); - @Override public void setAttribute(String name, Object value) { Assert.notNull(name, "Name must not be null"); if (value != null) { @@ -50,25 +49,21 @@ public abstract class AttributeAccessorSupport implements AttributeAccessor, Ser } } - @Override public Object getAttribute(String name) { Assert.notNull(name, "Name must not be null"); return this.attributes.get(name); } - @Override public Object removeAttribute(String name) { Assert.notNull(name, "Name must not be null"); return this.attributes.remove(name); } - @Override public boolean hasAttribute(String name) { Assert.notNull(name, "Name must not be null"); return this.attributes.containsKey(name); } - @Override public String[] attributeNames() { return this.attributes.keySet().toArray(new String[this.attributes.size()]); } diff --git a/spring-core/src/main/java/org/springframework/core/ControlFlowFactory.java b/spring-core/src/main/java/org/springframework/core/ControlFlowFactory.java index 4860b5f4ee..1542d39bed 100644 --- a/spring-core/src/main/java/org/springframework/core/ControlFlowFactory.java +++ b/spring-core/src/main/java/org/springframework/core/ControlFlowFactory.java @@ -61,7 +61,6 @@ public abstract class ControlFlowFactory { /** * Searches for class name match in a StackTraceElement. */ - @Override public boolean under(Class clazz) { Assert.notNull(clazz, "Class must not be null"); String className = clazz.getName(); @@ -77,7 +76,6 @@ public abstract class ControlFlowFactory { * Searches for class name match plus method name match * in a StackTraceElement. */ - @Override public boolean under(Class clazz, String methodName) { Assert.notNull(clazz, "Class must not be null"); Assert.notNull(methodName, "Method name must not be null"); @@ -95,7 +93,6 @@ public abstract class ControlFlowFactory { * Leave it up to the caller to decide what matches. * Caller must understand stack trace format, so there's less abstraction. */ - @Override public boolean underToken(String token) { if (token == null) { return false; diff --git a/spring-core/src/main/java/org/springframework/core/ExceptionDepthComparator.java b/spring-core/src/main/java/org/springframework/core/ExceptionDepthComparator.java index 8336678e26..77289d76b7 100644 --- a/spring-core/src/main/java/org/springframework/core/ExceptionDepthComparator.java +++ b/spring-core/src/main/java/org/springframework/core/ExceptionDepthComparator.java @@ -55,7 +55,6 @@ public class ExceptionDepthComparator implements Comparator o1, Class o2) { int depth1 = getDepth(o1, this.targetException, 0); int depth2 = getDepth(o2, this.targetException, 0); diff --git a/spring-core/src/main/java/org/springframework/core/LocalVariableTableParameterNameDiscoverer.java b/spring-core/src/main/java/org/springframework/core/LocalVariableTableParameterNameDiscoverer.java index 6732f58b52..588472532c 100644 --- a/spring-core/src/main/java/org/springframework/core/LocalVariableTableParameterNameDiscoverer.java +++ b/spring-core/src/main/java/org/springframework/core/LocalVariableTableParameterNameDiscoverer.java @@ -64,7 +64,6 @@ public class LocalVariableTableParameterNameDiscoverer implements ParameterNameD new ConcurrentHashMap, Map>(32); - @Override public String[] getParameterNames(Method method) { Class declaringClass = method.getDeclaringClass(); Map map = this.parameterNamesCache.get(declaringClass); @@ -79,7 +78,6 @@ public class LocalVariableTableParameterNameDiscoverer implements ParameterNameD return null; } - @Override public String[] getParameterNames(Constructor ctor) { Class declaringClass = ctor.getDeclaringClass(); Map map = this.parameterNamesCache.get(declaringClass); diff --git a/spring-core/src/main/java/org/springframework/core/OrderComparator.java b/spring-core/src/main/java/org/springframework/core/OrderComparator.java index 51408c7441..16158ca1ad 100644 --- a/spring-core/src/main/java/org/springframework/core/OrderComparator.java +++ b/spring-core/src/main/java/org/springframework/core/OrderComparator.java @@ -43,7 +43,6 @@ public class OrderComparator implements Comparator { public static final OrderComparator INSTANCE = new OrderComparator(); - @Override public int compare(Object o1, Object o2) { boolean p1 = (o1 instanceof PriorityOrdered); boolean p2 = (o2 instanceof PriorityOrdered); diff --git a/spring-core/src/main/java/org/springframework/core/PrioritizedParameterNameDiscoverer.java b/spring-core/src/main/java/org/springframework/core/PrioritizedParameterNameDiscoverer.java index 8d883eddd3..e65e88cd21 100644 --- a/spring-core/src/main/java/org/springframework/core/PrioritizedParameterNameDiscoverer.java +++ b/spring-core/src/main/java/org/springframework/core/PrioritizedParameterNameDiscoverer.java @@ -48,7 +48,6 @@ public class PrioritizedParameterNameDiscoverer implements ParameterNameDiscover } - @Override public String[] getParameterNames(Method method) { for (ParameterNameDiscoverer pnd : this.parameterNameDiscoverers) { String[] result = pnd.getParameterNames(method); @@ -59,7 +58,6 @@ public class PrioritizedParameterNameDiscoverer implements ParameterNameDiscover return null; } - @Override public String[] getParameterNames(Constructor ctor) { for (ParameterNameDiscoverer pnd : this.parameterNameDiscoverers) { String[] result = pnd.getParameterNames(ctor); diff --git a/spring-core/src/main/java/org/springframework/core/SimpleAliasRegistry.java b/spring-core/src/main/java/org/springframework/core/SimpleAliasRegistry.java index 82fe66159b..24b33f7683 100644 --- a/spring-core/src/main/java/org/springframework/core/SimpleAliasRegistry.java +++ b/spring-core/src/main/java/org/springframework/core/SimpleAliasRegistry.java @@ -41,7 +41,6 @@ public class SimpleAliasRegistry implements AliasRegistry { private final Map aliasMap = new ConcurrentHashMap(16); - @Override public void registerAlias(String name, String alias) { Assert.hasText(name, "'name' must not be empty"); Assert.hasText(alias, "'alias' must not be empty"); @@ -69,7 +68,6 @@ public class SimpleAliasRegistry implements AliasRegistry { return true; } - @Override public void removeAlias(String alias) { String name = this.aliasMap.remove(alias); if (name == null) { @@ -77,12 +75,10 @@ public class SimpleAliasRegistry implements AliasRegistry { } } - @Override public boolean isAlias(String name) { return this.aliasMap.containsKey(name); } - @Override public String[] getAliases(String name) { List result = new ArrayList(); synchronized (this.aliasMap) { diff --git a/spring-core/src/main/java/org/springframework/core/convert/converter/ConvertingComparator.java b/spring-core/src/main/java/org/springframework/core/convert/converter/ConvertingComparator.java index 31c511282f..3e2d741523 100644 --- a/spring-core/src/main/java/org/springframework/core/convert/converter/ConvertingComparator.java +++ b/spring-core/src/main/java/org/springframework/core/convert/converter/ConvertingComparator.java @@ -77,7 +77,6 @@ public class ConvertingComparator implements Comparator { } - @Override public int compare(S o1, S o2) { T c1 = this.converter.convert(o1); T c2 = this.converter.convert(o2); @@ -95,7 +94,6 @@ public class ConvertingComparator implements Comparator { Comparator comparator) { return new ConvertingComparator, K>(comparator, new Converter, K>() { - @Override public K convert(Map.Entry source) { return source.getKey(); } @@ -113,7 +111,6 @@ public class ConvertingComparator implements Comparator { Comparator comparator) { return new ConvertingComparator, V>(comparator, new Converter, V>() { - @Override public V convert(Map.Entry source) { return source.getValue(); } @@ -138,7 +135,6 @@ public class ConvertingComparator implements Comparator { this.targetType = targetType; } - @Override public T convert(S source) { return this.conversionService.convert(source, this.targetType); } diff --git a/spring-core/src/main/java/org/springframework/core/convert/support/ArrayToArrayConverter.java b/spring-core/src/main/java/org/springframework/core/convert/support/ArrayToArrayConverter.java index 0fb2f4de17..2b52d25b17 100644 --- a/spring-core/src/main/java/org/springframework/core/convert/support/ArrayToArrayConverter.java +++ b/spring-core/src/main/java/org/springframework/core/convert/support/ArrayToArrayConverter.java @@ -45,17 +45,14 @@ final class ArrayToArrayConverter implements ConditionalGenericConverter { this.conversionService = conversionService; } - @Override public Set getConvertibleTypes() { return Collections.singleton(new ConvertiblePair(Object[].class, Object[].class)); } - @Override public boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType) { return this.helperConverter.matches(sourceType, targetType); } - @Override public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) { if ((conversionService instanceof GenericConversionService) diff --git a/spring-core/src/main/java/org/springframework/core/convert/support/ArrayToCollectionConverter.java b/spring-core/src/main/java/org/springframework/core/convert/support/ArrayToCollectionConverter.java index 6676e73963..d1c4562147 100644 --- a/spring-core/src/main/java/org/springframework/core/convert/support/ArrayToCollectionConverter.java +++ b/spring-core/src/main/java/org/springframework/core/convert/support/ArrayToCollectionConverter.java @@ -44,18 +44,15 @@ final class ArrayToCollectionConverter implements ConditionalGenericConverter { this.conversionService = conversionService; } - @Override public Set getConvertibleTypes() { return Collections.singleton(new ConvertiblePair(Object[].class, Collection.class)); } - @Override public boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType) { return ConversionUtils.canConvertElements( sourceType.getElementTypeDescriptor(), targetType.getElementTypeDescriptor(), this.conversionService); } - @Override @SuppressWarnings("unchecked") public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) { if (source == null) { diff --git a/spring-core/src/main/java/org/springframework/core/convert/support/ArrayToObjectConverter.java b/spring-core/src/main/java/org/springframework/core/convert/support/ArrayToObjectConverter.java index 78d2f93548..90874058a0 100644 --- a/spring-core/src/main/java/org/springframework/core/convert/support/ArrayToObjectConverter.java +++ b/spring-core/src/main/java/org/springframework/core/convert/support/ArrayToObjectConverter.java @@ -38,17 +38,14 @@ final class ArrayToObjectConverter implements ConditionalGenericConverter { this.conversionService = conversionService; } - @Override public Set getConvertibleTypes() { return Collections.singleton(new ConvertiblePair(Object[].class, Object.class)); } - @Override public boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType) { return ConversionUtils.canConvertElements(sourceType.getElementTypeDescriptor(), targetType, this.conversionService); } - @Override public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) { if (source == null) { return null; diff --git a/spring-core/src/main/java/org/springframework/core/convert/support/ArrayToStringConverter.java b/spring-core/src/main/java/org/springframework/core/convert/support/ArrayToStringConverter.java index 85326e4b60..f795e8ed45 100644 --- a/spring-core/src/main/java/org/springframework/core/convert/support/ArrayToStringConverter.java +++ b/spring-core/src/main/java/org/springframework/core/convert/support/ArrayToStringConverter.java @@ -40,17 +40,14 @@ final class ArrayToStringConverter implements ConditionalGenericConverter { this.helperConverter = new CollectionToStringConverter(conversionService); } - @Override public Set getConvertibleTypes() { return Collections.singleton(new ConvertiblePair(Object[].class, String.class)); } - @Override public boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType) { return this.helperConverter.matches(sourceType, targetType); } - @Override public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) { return this.helperConverter.convert(Arrays.asList(ObjectUtils.toObjectArray(source)), sourceType, targetType); } diff --git a/spring-core/src/main/java/org/springframework/core/convert/support/CharacterToNumberFactory.java b/spring-core/src/main/java/org/springframework/core/convert/support/CharacterToNumberFactory.java index 179823f32c..c061a877f3 100644 --- a/spring-core/src/main/java/org/springframework/core/convert/support/CharacterToNumberFactory.java +++ b/spring-core/src/main/java/org/springframework/core/convert/support/CharacterToNumberFactory.java @@ -40,7 +40,6 @@ import org.springframework.util.NumberUtils; */ final class CharacterToNumberFactory implements ConverterFactory { - @Override public Converter getConverter(Class targetType) { return new CharacterToNumber(targetType); } @@ -53,7 +52,6 @@ final class CharacterToNumberFactory implements ConverterFactory getConvertibleTypes() { return Collections.singleton(new ConvertiblePair(Collection.class, Object[].class)); } - @Override public boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType) { return ConversionUtils.canConvertElements(sourceType.getElementTypeDescriptor(), targetType.getElementTypeDescriptor(), this.conversionService); } - @Override public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) { if (source == null) { return null; diff --git a/spring-core/src/main/java/org/springframework/core/convert/support/CollectionToCollectionConverter.java b/spring-core/src/main/java/org/springframework/core/convert/support/CollectionToCollectionConverter.java index c07b057a4b..2c3e1722f4 100644 --- a/spring-core/src/main/java/org/springframework/core/convert/support/CollectionToCollectionConverter.java +++ b/spring-core/src/main/java/org/springframework/core/convert/support/CollectionToCollectionConverter.java @@ -44,18 +44,15 @@ final class CollectionToCollectionConverter implements ConditionalGenericConvert this.conversionService = conversionService; } - @Override public Set getConvertibleTypes() { return Collections.singleton(new ConvertiblePair(Collection.class, Collection.class)); } - @Override public boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType) { return ConversionUtils.canConvertElements( sourceType.getElementTypeDescriptor(), targetType.getElementTypeDescriptor(), this.conversionService); } - @Override @SuppressWarnings("unchecked") public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) { if (source == null) { diff --git a/spring-core/src/main/java/org/springframework/core/convert/support/CollectionToObjectConverter.java b/spring-core/src/main/java/org/springframework/core/convert/support/CollectionToObjectConverter.java index bcc51e2f95..f22527a7b9 100644 --- a/spring-core/src/main/java/org/springframework/core/convert/support/CollectionToObjectConverter.java +++ b/spring-core/src/main/java/org/springframework/core/convert/support/CollectionToObjectConverter.java @@ -38,17 +38,14 @@ final class CollectionToObjectConverter implements ConditionalGenericConverter { this.conversionService = conversionService; } - @Override public Set getConvertibleTypes() { return Collections.singleton(new ConvertiblePair(Collection.class, Object.class)); } - @Override public boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType) { return ConversionUtils.canConvertElements(sourceType.getElementTypeDescriptor(), targetType, this.conversionService); } - @Override public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) { if (source == null) { return null; diff --git a/spring-core/src/main/java/org/springframework/core/convert/support/CollectionToStringConverter.java b/spring-core/src/main/java/org/springframework/core/convert/support/CollectionToStringConverter.java index 7537c1c3e0..ba1894f388 100644 --- a/spring-core/src/main/java/org/springframework/core/convert/support/CollectionToStringConverter.java +++ b/spring-core/src/main/java/org/springframework/core/convert/support/CollectionToStringConverter.java @@ -40,17 +40,14 @@ final class CollectionToStringConverter implements ConditionalGenericConverter { this.conversionService = conversionService; } - @Override public Set getConvertibleTypes() { return Collections.singleton(new ConvertiblePair(Collection.class, String.class)); } - @Override public boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType) { return ConversionUtils.canConvertElements(sourceType.getElementTypeDescriptor(), targetType, this.conversionService); } - @Override public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) { if (source == null) { return null; diff --git a/spring-core/src/main/java/org/springframework/core/convert/support/EnumToStringConverter.java b/spring-core/src/main/java/org/springframework/core/convert/support/EnumToStringConverter.java index bfd1762d96..e391b75bb3 100644 --- a/spring-core/src/main/java/org/springframework/core/convert/support/EnumToStringConverter.java +++ b/spring-core/src/main/java/org/springframework/core/convert/support/EnumToStringConverter.java @@ -37,7 +37,6 @@ final class EnumToStringConverter implements Converter, String>, Conditi this.conversionService = conversionService; } - @Override public boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType) { for (Class interfaceType : ClassUtils.getAllInterfacesForClass(sourceType.getType())) { if (conversionService.canConvert(TypeDescriptor.valueOf(interfaceType), targetType)) { @@ -47,7 +46,6 @@ final class EnumToStringConverter implements Converter, String>, Conditi return true; } - @Override public String convert(Enum source) { return source.name(); } diff --git a/spring-core/src/main/java/org/springframework/core/convert/support/FallbackObjectToStringConverter.java b/spring-core/src/main/java/org/springframework/core/convert/support/FallbackObjectToStringConverter.java index 767a0acb46..071ad3b647 100644 --- a/spring-core/src/main/java/org/springframework/core/convert/support/FallbackObjectToStringConverter.java +++ b/spring-core/src/main/java/org/springframework/core/convert/support/FallbackObjectToStringConverter.java @@ -35,12 +35,10 @@ import org.springframework.core.convert.converter.ConditionalGenericConverter; */ final class FallbackObjectToStringConverter implements ConditionalGenericConverter { - @Override public Set getConvertibleTypes() { return Collections.singleton(new ConvertiblePair(Object.class, String.class)); } - @Override public boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType) { Class sourceClass = sourceType.getObjectType(); if (String.class.equals(sourceClass)) { @@ -50,7 +48,6 @@ final class FallbackObjectToStringConverter implements ConditionalGenericConvert ObjectToObjectConverter.hasValueOfMethodOrConstructor(sourceClass, String.class); } - @Override public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) { return (source != null ? source.toString() : null); } diff --git a/spring-core/src/main/java/org/springframework/core/convert/support/GenericConversionService.java b/spring-core/src/main/java/org/springframework/core/convert/support/GenericConversionService.java index c20f852af7..148dbee97d 100644 --- a/spring-core/src/main/java/org/springframework/core/convert/support/GenericConversionService.java +++ b/spring-core/src/main/java/org/springframework/core/convert/support/GenericConversionService.java @@ -79,7 +79,6 @@ public class GenericConversionService implements ConfigurableConversionService { // implementing ConverterRegistry - @Override public void addConverter(Converter converter) { GenericConverter.ConvertiblePair typeInfo = getRequiredTypeInfo(converter, Converter.class); Assert.notNull(typeInfo, "Unable to the determine sourceType and targetType " + @@ -87,19 +86,16 @@ public class GenericConversionService implements ConfigurableConversionService { addConverter(new ConverterAdapter(typeInfo, converter)); } - @Override public void addConverter(Class sourceType, Class targetType, Converter converter) { GenericConverter.ConvertiblePair typeInfo = new GenericConverter.ConvertiblePair(sourceType, targetType); addConverter(new ConverterAdapter(typeInfo, converter)); } - @Override public void addConverter(GenericConverter converter) { this.converters.add(converter); invalidateCache(); } - @Override public void addConverterFactory(ConverterFactory converterFactory) { GenericConverter.ConvertiblePair typeInfo = getRequiredTypeInfo(converterFactory, ConverterFactory.class); if (typeInfo == null) { @@ -110,7 +106,6 @@ public class GenericConversionService implements ConfigurableConversionService { addConverter(new ConverterFactoryAdapter(typeInfo, converterFactory)); } - @Override public void removeConvertible(Class sourceType, Class targetType) { this.converters.remove(sourceType, targetType); invalidateCache(); @@ -118,7 +113,6 @@ public class GenericConversionService implements ConfigurableConversionService { // implementing ConversionService - @Override public boolean canConvert(Class sourceType, Class targetType) { Assert.notNull(targetType, "The targetType to convert to cannot be null"); return canConvert(sourceType != null ? @@ -126,7 +120,6 @@ public class GenericConversionService implements ConfigurableConversionService { TypeDescriptor.valueOf(targetType)); } - @Override public boolean canConvert(TypeDescriptor sourceType, TypeDescriptor targetType) { Assert.notNull(targetType,"The targetType to convert to cannot be null"); if (sourceType == null) { @@ -155,14 +148,12 @@ public class GenericConversionService implements ConfigurableConversionService { return (converter == NO_OP_CONVERTER); } - @Override @SuppressWarnings("unchecked") public T convert(Object source, Class targetType) { Assert.notNull(targetType,"The targetType to convert to cannot be null"); return (T) convert(source, TypeDescriptor.forObject(source), TypeDescriptor.valueOf(targetType)); } - @Override public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) { Assert.notNull(targetType,"The targetType to convert to cannot be null"); if (sourceType == null) { @@ -317,12 +308,10 @@ public class GenericConversionService implements ConfigurableConversionService { } - @Override public Set getConvertibleTypes() { return Collections.singleton(this.typeInfo); } - @Override public boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType) { if(!this.typeInfo.getTargetType().equals(targetType.getObjectType())) { return false; @@ -333,7 +322,6 @@ public class GenericConversionService implements ConfigurableConversionService { return true; } - @Override public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) { if (source == null) { return convertNullSource(sourceType, targetType); @@ -366,12 +354,10 @@ public class GenericConversionService implements ConfigurableConversionService { } - @Override public Set getConvertibleTypes() { return Collections.singleton(this.typeInfo); } - @Override public boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType) { boolean matches = true; if (this.converterFactory instanceof ConditionalConverter) { @@ -386,7 +372,6 @@ public class GenericConversionService implements ConfigurableConversionService { return matches; } - @Override public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) { if (source == null) { return convertNullSource(sourceType, targetType); @@ -632,12 +617,10 @@ public class GenericConversionService implements ConfigurableConversionService { } - @Override public Set getConvertibleTypes() { return null; } - @Override public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) { return source; diff --git a/spring-core/src/main/java/org/springframework/core/convert/support/IdToEntityConverter.java b/spring-core/src/main/java/org/springframework/core/convert/support/IdToEntityConverter.java index e80bd599cd..653712660b 100644 --- a/spring-core/src/main/java/org/springframework/core/convert/support/IdToEntityConverter.java +++ b/spring-core/src/main/java/org/springframework/core/convert/support/IdToEntityConverter.java @@ -45,18 +45,15 @@ final class IdToEntityConverter implements ConditionalGenericConverter { this.conversionService = conversionService; } - @Override public Set getConvertibleTypes() { return Collections.singleton(new ConvertiblePair(Object.class, Object.class)); } - @Override public boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType) { Method finder = getFinder(targetType.getType()); return finder != null && this.conversionService.canConvert(sourceType, TypeDescriptor.valueOf(finder.getParameterTypes()[0])); } - @Override public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) { if (source == null) { return null; diff --git a/spring-core/src/main/java/org/springframework/core/convert/support/MapToMapConverter.java b/spring-core/src/main/java/org/springframework/core/convert/support/MapToMapConverter.java index eadacf3071..c2dc4bfc20 100644 --- a/spring-core/src/main/java/org/springframework/core/convert/support/MapToMapConverter.java +++ b/spring-core/src/main/java/org/springframework/core/convert/support/MapToMapConverter.java @@ -46,17 +46,14 @@ final class MapToMapConverter implements ConditionalGenericConverter { this.conversionService = conversionService; } - @Override public Set getConvertibleTypes() { return Collections.singleton(new ConvertiblePair(Map.class, Map.class)); } - @Override public boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType) { return canConvertKey(sourceType, targetType) && canConvertValue(sourceType, targetType); } - @Override @SuppressWarnings("unchecked") public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) { if (source == null) { diff --git a/spring-core/src/main/java/org/springframework/core/convert/support/NumberToCharacterConverter.java b/spring-core/src/main/java/org/springframework/core/convert/support/NumberToCharacterConverter.java index d79435d06f..812c320b09 100644 --- a/spring-core/src/main/java/org/springframework/core/convert/support/NumberToCharacterConverter.java +++ b/spring-core/src/main/java/org/springframework/core/convert/support/NumberToCharacterConverter.java @@ -34,7 +34,6 @@ import org.springframework.core.convert.converter.Converter; */ final class NumberToCharacterConverter implements Converter { - @Override public Character convert(Number source) { return (char) source.shortValue(); } diff --git a/spring-core/src/main/java/org/springframework/core/convert/support/NumberToNumberConverterFactory.java b/spring-core/src/main/java/org/springframework/core/convert/support/NumberToNumberConverterFactory.java index b98af70e31..240880d67f 100644 --- a/spring-core/src/main/java/org/springframework/core/convert/support/NumberToNumberConverterFactory.java +++ b/spring-core/src/main/java/org/springframework/core/convert/support/NumberToNumberConverterFactory.java @@ -43,12 +43,10 @@ import org.springframework.util.NumberUtils; final class NumberToNumberConverterFactory implements ConverterFactory, ConditionalConverter { - @Override public Converter getConverter(Class targetType) { return new NumberToNumber(targetType); } - @Override public boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType) { return !sourceType.equals(targetType); } @@ -61,7 +59,6 @@ final class NumberToNumberConverterFactory implements ConverterFactory getConvertibleTypes() { return Collections.singleton(new ConvertiblePair(Object.class, Object[].class)); } - @Override public boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType) { return ConversionUtils.canConvertElements(sourceType, targetType.getElementTypeDescriptor(), this.conversionService); } - @Override public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) { if (source == null) { return null; diff --git a/spring-core/src/main/java/org/springframework/core/convert/support/ObjectToCollectionConverter.java b/spring-core/src/main/java/org/springframework/core/convert/support/ObjectToCollectionConverter.java index 02a389eb66..c010131816 100644 --- a/spring-core/src/main/java/org/springframework/core/convert/support/ObjectToCollectionConverter.java +++ b/spring-core/src/main/java/org/springframework/core/convert/support/ObjectToCollectionConverter.java @@ -41,17 +41,14 @@ final class ObjectToCollectionConverter implements ConditionalGenericConverter { this.conversionService = conversionService; } - @Override public Set getConvertibleTypes() { return Collections.singleton(new ConvertiblePair(Object.class, Collection.class)); } - @Override public boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType) { return ConversionUtils.canConvertElements(sourceType, targetType.getElementTypeDescriptor(), this.conversionService); } - @Override @SuppressWarnings("unchecked") public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) { if (source == null) { diff --git a/spring-core/src/main/java/org/springframework/core/convert/support/ObjectToObjectConverter.java b/spring-core/src/main/java/org/springframework/core/convert/support/ObjectToObjectConverter.java index e1273221b8..0448e5824f 100644 --- a/spring-core/src/main/java/org/springframework/core/convert/support/ObjectToObjectConverter.java +++ b/spring-core/src/main/java/org/springframework/core/convert/support/ObjectToObjectConverter.java @@ -43,12 +43,10 @@ import org.springframework.util.ReflectionUtils; */ final class ObjectToObjectConverter implements ConditionalGenericConverter { - @Override public Set getConvertibleTypes() { return Collections.singleton(new ConvertiblePair(Object.class, Object.class)); } - @Override public boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType) { if (sourceType.getType().equals(targetType.getType())) { // no conversion required @@ -57,7 +55,6 @@ final class ObjectToObjectConverter implements ConditionalGenericConverter { return hasValueOfMethodOrConstructor(targetType.getType(), sourceType.getType()); } - @Override public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) { if (source == null) { return null; diff --git a/spring-core/src/main/java/org/springframework/core/convert/support/ObjectToStringConverter.java b/spring-core/src/main/java/org/springframework/core/convert/support/ObjectToStringConverter.java index f9c3c8174e..1c939010c3 100644 --- a/spring-core/src/main/java/org/springframework/core/convert/support/ObjectToStringConverter.java +++ b/spring-core/src/main/java/org/springframework/core/convert/support/ObjectToStringConverter.java @@ -25,7 +25,6 @@ import org.springframework.core.convert.converter.Converter; */ final class ObjectToStringConverter implements Converter { - @Override public String convert(Object source) { return source.toString(); } diff --git a/spring-core/src/main/java/org/springframework/core/convert/support/PropertiesToStringConverter.java b/spring-core/src/main/java/org/springframework/core/convert/support/PropertiesToStringConverter.java index 5417a62659..630af5c307 100644 --- a/spring-core/src/main/java/org/springframework/core/convert/support/PropertiesToStringConverter.java +++ b/spring-core/src/main/java/org/springframework/core/convert/support/PropertiesToStringConverter.java @@ -31,7 +31,6 @@ import org.springframework.core.convert.converter.Converter; */ final class PropertiesToStringConverter implements Converter { - @Override public String convert(Properties source) { try { ByteArrayOutputStream os = new ByteArrayOutputStream(); diff --git a/spring-core/src/main/java/org/springframework/core/convert/support/StringToArrayConverter.java b/spring-core/src/main/java/org/springframework/core/convert/support/StringToArrayConverter.java index af209148c8..cb9601a13a 100644 --- a/spring-core/src/main/java/org/springframework/core/convert/support/StringToArrayConverter.java +++ b/spring-core/src/main/java/org/springframework/core/convert/support/StringToArrayConverter.java @@ -40,17 +40,14 @@ final class StringToArrayConverter implements ConditionalGenericConverter { this.conversionService = conversionService; } - @Override public Set getConvertibleTypes() { return Collections.singleton(new ConvertiblePair(String.class, Object[].class)); } - @Override public boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType) { return this.conversionService.canConvert(sourceType, targetType.getElementTypeDescriptor()); } - @Override public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) { if (source == null) { return null; diff --git a/spring-core/src/main/java/org/springframework/core/convert/support/StringToBooleanConverter.java b/spring-core/src/main/java/org/springframework/core/convert/support/StringToBooleanConverter.java index 1d8bc61ef7..15089df14d 100644 --- a/spring-core/src/main/java/org/springframework/core/convert/support/StringToBooleanConverter.java +++ b/spring-core/src/main/java/org/springframework/core/convert/support/StringToBooleanConverter.java @@ -46,7 +46,6 @@ final class StringToBooleanConverter implements Converter { falseValues.add("0"); } - @Override public Boolean convert(String source) { String value = source.trim(); if ("".equals(value)) { diff --git a/spring-core/src/main/java/org/springframework/core/convert/support/StringToCharacterConverter.java b/spring-core/src/main/java/org/springframework/core/convert/support/StringToCharacterConverter.java index 7a076d335c..3fa97ec7eb 100644 --- a/spring-core/src/main/java/org/springframework/core/convert/support/StringToCharacterConverter.java +++ b/spring-core/src/main/java/org/springframework/core/convert/support/StringToCharacterConverter.java @@ -26,7 +26,6 @@ import org.springframework.core.convert.converter.Converter; */ final class StringToCharacterConverter implements Converter { - @Override public Character convert(String source) { if (source.length() == 0) { return null; diff --git a/spring-core/src/main/java/org/springframework/core/convert/support/StringToCollectionConverter.java b/spring-core/src/main/java/org/springframework/core/convert/support/StringToCollectionConverter.java index 7d91ee8ab0..aa6acbbd5c 100644 --- a/spring-core/src/main/java/org/springframework/core/convert/support/StringToCollectionConverter.java +++ b/spring-core/src/main/java/org/springframework/core/convert/support/StringToCollectionConverter.java @@ -41,12 +41,10 @@ final class StringToCollectionConverter implements ConditionalGenericConverter { this.conversionService = conversionService; } - @Override public Set getConvertibleTypes() { return Collections.singleton(new ConvertiblePair(String.class, Collection.class)); } - @Override public boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType) { if (targetType.getElementTypeDescriptor() != null) { return this.conversionService.canConvert(sourceType, targetType.getElementTypeDescriptor()); @@ -55,7 +53,6 @@ final class StringToCollectionConverter implements ConditionalGenericConverter { } } - @Override @SuppressWarnings("unchecked") public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) { if (source == null) { diff --git a/spring-core/src/main/java/org/springframework/core/convert/support/StringToEnumConverterFactory.java b/spring-core/src/main/java/org/springframework/core/convert/support/StringToEnumConverterFactory.java index 064801aea4..09eb9dfce6 100644 --- a/spring-core/src/main/java/org/springframework/core/convert/support/StringToEnumConverterFactory.java +++ b/spring-core/src/main/java/org/springframework/core/convert/support/StringToEnumConverterFactory.java @@ -28,7 +28,6 @@ import org.springframework.core.convert.converter.ConverterFactory; @SuppressWarnings({ "unchecked", "rawtypes" }) final class StringToEnumConverterFactory implements ConverterFactory { - @Override public Converter getConverter(Class targetType) { return new StringToEnum(targetType); } @@ -41,7 +40,6 @@ final class StringToEnumConverterFactory implements ConverterFactory { - @Override public Locale convert(String source) { return StringUtils.parseLocaleString(source); } diff --git a/spring-core/src/main/java/org/springframework/core/convert/support/StringToNumberConverterFactory.java b/spring-core/src/main/java/org/springframework/core/convert/support/StringToNumberConverterFactory.java index 506dcec929..6fa470e0dd 100644 --- a/spring-core/src/main/java/org/springframework/core/convert/support/StringToNumberConverterFactory.java +++ b/spring-core/src/main/java/org/springframework/core/convert/support/StringToNumberConverterFactory.java @@ -40,7 +40,6 @@ import org.springframework.util.NumberUtils; */ final class StringToNumberConverterFactory implements ConverterFactory { - @Override public Converter getConverter(Class targetType) { return new StringToNumber(targetType); } @@ -53,7 +52,6 @@ final class StringToNumberConverterFactory implements ConverterFactory { - @Override public Properties convert(String source) { try { Properties props = new Properties(); diff --git a/spring-core/src/main/java/org/springframework/core/convert/support/StringToUUIDConverter.java b/spring-core/src/main/java/org/springframework/core/convert/support/StringToUUIDConverter.java index b97335a83b..6478d47845 100644 --- a/spring-core/src/main/java/org/springframework/core/convert/support/StringToUUIDConverter.java +++ b/spring-core/src/main/java/org/springframework/core/convert/support/StringToUUIDConverter.java @@ -29,7 +29,6 @@ import org.springframework.util.StringUtils; */ final class StringToUUIDConverter implements Converter { - @Override public UUID convert(String source) { if(StringUtils.hasLength(source)) { return UUID.fromString(source.trim()); diff --git a/spring-core/src/main/java/org/springframework/core/enums/AbstractCachingLabeledEnumResolver.java b/spring-core/src/main/java/org/springframework/core/enums/AbstractCachingLabeledEnumResolver.java index 94c3e969b9..4a278f92eb 100644 --- a/spring-core/src/main/java/org/springframework/core/enums/AbstractCachingLabeledEnumResolver.java +++ b/spring-core/src/main/java/org/springframework/core/enums/AbstractCachingLabeledEnumResolver.java @@ -50,18 +50,15 @@ public abstract class AbstractCachingLabeledEnumResolver implements LabeledEnumR private final LabeledEnumCache labeledEnumCache = new LabeledEnumCache(); - @Override public Set getLabeledEnumSet(Class type) throws IllegalArgumentException { return new TreeSet(getLabeledEnumMap(type).values()); } - @Override public Map getLabeledEnumMap(Class type) throws IllegalArgumentException { Assert.notNull(type, "No type specified"); return this.labeledEnumCache.get(type); } - @Override public LabeledEnum getLabeledEnumByCode(Class type, Comparable code) throws IllegalArgumentException { Assert.notNull(code, "No enum code specified"); Map typeEnums = getLabeledEnumMap(type); @@ -75,7 +72,6 @@ public abstract class AbstractCachingLabeledEnumResolver implements LabeledEnumR return codedEnum; } - @Override public LabeledEnum getLabeledEnumByLabel(Class type, String label) throws IllegalArgumentException { Map typeEnums = getLabeledEnumMap(type); for (LabeledEnum value : typeEnums.values()) { diff --git a/spring-core/src/main/java/org/springframework/core/enums/AbstractGenericLabeledEnum.java b/spring-core/src/main/java/org/springframework/core/enums/AbstractGenericLabeledEnum.java index 329d01721a..cee9535cee 100644 --- a/spring-core/src/main/java/org/springframework/core/enums/AbstractGenericLabeledEnum.java +++ b/spring-core/src/main/java/org/springframework/core/enums/AbstractGenericLabeledEnum.java @@ -43,7 +43,6 @@ public abstract class AbstractGenericLabeledEnum extends AbstractLabeledEnum { } - @Override public String getLabel() { if (this.label != null) { return label; diff --git a/spring-core/src/main/java/org/springframework/core/enums/AbstractLabeledEnum.java b/spring-core/src/main/java/org/springframework/core/enums/AbstractLabeledEnum.java index dedc90eaef..3c2860f74b 100644 --- a/spring-core/src/main/java/org/springframework/core/enums/AbstractLabeledEnum.java +++ b/spring-core/src/main/java/org/springframework/core/enums/AbstractLabeledEnum.java @@ -35,14 +35,12 @@ public abstract class AbstractLabeledEnum implements LabeledEnum { protected AbstractLabeledEnum() { } - @Override public Class getType() { // Could be coded as getClass().isAnonymousClass() on JDK 1.5 boolean isAnonymous = (getClass().getDeclaringClass() == null && getClass().getName().indexOf('$') != -1); return (isAnonymous ? getClass().getSuperclass() : getClass()); } - @Override public int compareTo(Object obj) { if (!(obj instanceof LabeledEnum)) { throw new ClassCastException("You may only compare LabeledEnums"); diff --git a/spring-core/src/main/java/org/springframework/core/enums/LabeledEnum.java b/spring-core/src/main/java/org/springframework/core/enums/LabeledEnum.java index 4e45ee35e2..dc2325bfac 100644 --- a/spring-core/src/main/java/org/springframework/core/enums/LabeledEnum.java +++ b/spring-core/src/main/java/org/springframework/core/enums/LabeledEnum.java @@ -67,7 +67,6 @@ public interface LabeledEnum extends Comparable, Serializable { * Shared Comparator instance that sorts enumerations by {@code CODE_ORDER}. */ Comparator CODE_ORDER = new Comparator() { - @Override public int compare(Object o1, Object o2) { Comparable c1 = ((LabeledEnum) o1).getCode(); Comparable c2 = ((LabeledEnum) o2).getCode(); @@ -79,7 +78,6 @@ public interface LabeledEnum extends Comparable, Serializable { * Shared Comparator instance that sorts enumerations by {@code LABEL_ORDER}. */ Comparator LABEL_ORDER = new Comparator() { - @Override public int compare(Object o1, Object o2) { LabeledEnum e1 = (LabeledEnum) o1; LabeledEnum e2 = (LabeledEnum) o2; diff --git a/spring-core/src/main/java/org/springframework/core/enums/LetterCodedLabeledEnum.java b/spring-core/src/main/java/org/springframework/core/enums/LetterCodedLabeledEnum.java index 5cee8e480b..cb70971aab 100644 --- a/spring-core/src/main/java/org/springframework/core/enums/LetterCodedLabeledEnum.java +++ b/spring-core/src/main/java/org/springframework/core/enums/LetterCodedLabeledEnum.java @@ -52,7 +52,6 @@ public class LetterCodedLabeledEnum extends AbstractGenericLabeledEnum { } - @Override public Comparable getCode() { return code; } diff --git a/spring-core/src/main/java/org/springframework/core/enums/ShortCodedLabeledEnum.java b/spring-core/src/main/java/org/springframework/core/enums/ShortCodedLabeledEnum.java index 1e1fd291cd..27a78d1c66 100644 --- a/spring-core/src/main/java/org/springframework/core/enums/ShortCodedLabeledEnum.java +++ b/spring-core/src/main/java/org/springframework/core/enums/ShortCodedLabeledEnum.java @@ -49,7 +49,6 @@ public class ShortCodedLabeledEnum extends AbstractGenericLabeledEnum { } - @Override public Comparable getCode() { return code; } diff --git a/spring-core/src/main/java/org/springframework/core/enums/StaticLabeledEnum.java b/spring-core/src/main/java/org/springframework/core/enums/StaticLabeledEnum.java index 85d04f7276..e6440cc3b6 100644 --- a/spring-core/src/main/java/org/springframework/core/enums/StaticLabeledEnum.java +++ b/spring-core/src/main/java/org/springframework/core/enums/StaticLabeledEnum.java @@ -73,12 +73,10 @@ public abstract class StaticLabeledEnum extends AbstractLabeledEnum { } } - @Override public Comparable getCode() { return code; } - @Override public String getLabel() { return label; } diff --git a/spring-core/src/main/java/org/springframework/core/enums/StringCodedLabeledEnum.java b/spring-core/src/main/java/org/springframework/core/enums/StringCodedLabeledEnum.java index 296c8e8054..d0a936effd 100644 --- a/spring-core/src/main/java/org/springframework/core/enums/StringCodedLabeledEnum.java +++ b/spring-core/src/main/java/org/springframework/core/enums/StringCodedLabeledEnum.java @@ -53,7 +53,6 @@ public class StringCodedLabeledEnum extends AbstractGenericLabeledEnum { } - @Override public Comparable getCode() { return this.code; } diff --git a/spring-core/src/main/java/org/springframework/core/env/AbstractEnvironment.java b/spring-core/src/main/java/org/springframework/core/env/AbstractEnvironment.java index 1079167915..f8741fb6ea 100644 --- a/spring-core/src/main/java/org/springframework/core/env/AbstractEnvironment.java +++ b/spring-core/src/main/java/org/springframework/core/env/AbstractEnvironment.java @@ -214,7 +214,6 @@ public abstract class AbstractEnvironment implements ConfigurableEnvironment { // Implementation of ConfigurableEnvironment interface //--------------------------------------------------------------------- - @Override public String[] getActiveProfiles() { return StringUtils.toStringArray(doGetActiveProfiles()); } @@ -237,7 +236,6 @@ public abstract class AbstractEnvironment implements ConfigurableEnvironment { return this.activeProfiles; } - @Override public void setActiveProfiles(String... profiles) { Assert.notNull(profiles, "Profile array must not be null"); this.activeProfiles.clear(); @@ -247,7 +245,6 @@ public abstract class AbstractEnvironment implements ConfigurableEnvironment { } } - @Override public void addActiveProfile(String profile) { if (this.logger.isDebugEnabled()) { this.logger.debug(format("Activating profile '%s'", profile)); @@ -258,7 +255,6 @@ public abstract class AbstractEnvironment implements ConfigurableEnvironment { } - @Override public String[] getDefaultProfiles() { return StringUtils.toStringArray(doGetDefaultProfiles()); } @@ -292,7 +288,6 @@ public abstract class AbstractEnvironment implements ConfigurableEnvironment { * @see #AbstractEnvironment() * @see #getReservedDefaultProfiles() */ - @Override public void setDefaultProfiles(String... profiles) { Assert.notNull(profiles, "Profile array must not be null"); this.defaultProfiles.clear(); @@ -302,7 +297,6 @@ public abstract class AbstractEnvironment implements ConfigurableEnvironment { } } - @Override public boolean acceptsProfiles(String... profiles) { Assert.notEmpty(profiles, "Must specify at least one profile"); for (String profile : profiles) { @@ -343,12 +337,10 @@ public abstract class AbstractEnvironment implements ConfigurableEnvironment { "Invalid profile [" + profile + "]: must not begin with the ! operator"); } - @Override public MutablePropertySources getPropertySources() { return this.propertySources; } - @Override @SuppressWarnings("unchecked") public Map getSystemEnvironment() { Map systemEnvironment; @@ -377,7 +369,6 @@ public abstract class AbstractEnvironment implements ConfigurableEnvironment { return (Map) systemEnvironment; } - @Override @SuppressWarnings({"unchecked", "rawtypes"}) public Map getSystemProperties() { Map systemProperties; @@ -406,7 +397,6 @@ public abstract class AbstractEnvironment implements ConfigurableEnvironment { return systemProperties; } - @Override public void merge(ConfigurableEnvironment parent) { for (PropertySource ps : parent.getPropertySources()) { if (!this.propertySources.contains(ps.getName())) { @@ -429,92 +419,74 @@ public abstract class AbstractEnvironment implements ConfigurableEnvironment { // Implementation of ConfigurablePropertyResolver interface //--------------------------------------------------------------------- - @Override public boolean containsProperty(String key) { return this.propertyResolver.containsProperty(key); } - @Override public String getProperty(String key) { return this.propertyResolver.getProperty(key); } - @Override public String getProperty(String key, String defaultValue) { return this.propertyResolver.getProperty(key, defaultValue); } - @Override public T getProperty(String key, Class targetType) { return this.propertyResolver.getProperty(key, targetType); } - @Override public T getProperty(String key, Class targetType, T defaultValue) { return this.propertyResolver.getProperty(key, targetType, defaultValue); }; - @Override public Class getPropertyAsClass(String key, Class targetType) { return this.propertyResolver.getPropertyAsClass(key, targetType); } - @Override public String getRequiredProperty(String key) throws IllegalStateException { return this.propertyResolver.getRequiredProperty(key); } - @Override public T getRequiredProperty(String key, Class targetType) throws IllegalStateException { return this.propertyResolver.getRequiredProperty(key, targetType); } - @Override public void setRequiredProperties(String... requiredProperties) { this.propertyResolver.setRequiredProperties(requiredProperties); } - @Override public void validateRequiredProperties() throws MissingRequiredPropertiesException { this.propertyResolver.validateRequiredProperties(); } - @Override public String resolvePlaceholders(String text) { return this.propertyResolver.resolvePlaceholders(text); } - @Override public String resolveRequiredPlaceholders(String text) throws IllegalArgumentException { return this.propertyResolver.resolveRequiredPlaceholders(text); } - @Override public void setIgnoreUnresolvableNestedPlaceholders(boolean ignoreUnresolvableNestedPlaceholders) { this.propertyResolver.setIgnoreUnresolvableNestedPlaceholders(ignoreUnresolvableNestedPlaceholders); } - @Override public void setConversionService(ConfigurableConversionService conversionService) { this.propertyResolver.setConversionService(conversionService); } - @Override public ConfigurableConversionService getConversionService() { return this.propertyResolver.getConversionService(); } - @Override public void setPlaceholderPrefix(String placeholderPrefix) { this.propertyResolver.setPlaceholderPrefix(placeholderPrefix); } - @Override public void setPlaceholderSuffix(String placeholderSuffix) { this.propertyResolver.setPlaceholderSuffix(placeholderSuffix); } - @Override public void setValueSeparator(String valueSeparator) { this.propertyResolver.setValueSeparator(valueSeparator); } diff --git a/spring-core/src/main/java/org/springframework/core/env/AbstractPropertyResolver.java b/spring-core/src/main/java/org/springframework/core/env/AbstractPropertyResolver.java index 77bf33ab21..9d61649648 100644 --- a/spring-core/src/main/java/org/springframework/core/env/AbstractPropertyResolver.java +++ b/spring-core/src/main/java/org/springframework/core/env/AbstractPropertyResolver.java @@ -53,36 +53,30 @@ public abstract class AbstractPropertyResolver implements ConfigurablePropertyRe private final Set requiredProperties = new LinkedHashSet(); - @Override public ConfigurableConversionService getConversionService() { return this.conversionService; } - @Override public void setConversionService(ConfigurableConversionService conversionService) { this.conversionService = conversionService; } - @Override public String getProperty(String key, String defaultValue) { String value = getProperty(key); return value == null ? defaultValue : value; } - @Override public T getProperty(String key, Class targetType, T defaultValue) { T value = getProperty(key, targetType); return value == null ? defaultValue : value; } - @Override public void setRequiredProperties(String... requiredProperties) { for (String key : requiredProperties) { this.requiredProperties.add(key); } } - @Override public void validateRequiredProperties() { MissingRequiredPropertiesException ex = new MissingRequiredPropertiesException(); for (String key : this.requiredProperties) { @@ -95,7 +89,6 @@ public abstract class AbstractPropertyResolver implements ConfigurablePropertyRe } } - @Override public String getRequiredProperty(String key) throws IllegalStateException { String value = getProperty(key); if (value == null) { @@ -104,7 +97,6 @@ public abstract class AbstractPropertyResolver implements ConfigurablePropertyRe return value; } - @Override public T getRequiredProperty(String key, Class valueType) throws IllegalStateException { T value = getProperty(key, valueType); if (value == null) { @@ -117,7 +109,6 @@ public abstract class AbstractPropertyResolver implements ConfigurablePropertyRe * {@inheritDoc} The default is "${". * @see org.springframework.util.SystemPropertyUtils#PLACEHOLDER_PREFIX */ - @Override public void setPlaceholderPrefix(String placeholderPrefix) { this.placeholderPrefix = placeholderPrefix; } @@ -126,7 +117,6 @@ public abstract class AbstractPropertyResolver implements ConfigurablePropertyRe * {@inheritDoc} The default is "}". * @see org.springframework.util.SystemPropertyUtils#PLACEHOLDER_SUFFIX */ - @Override public void setPlaceholderSuffix(String placeholderSuffix) { this.placeholderSuffix = placeholderSuffix; } @@ -135,12 +125,10 @@ public abstract class AbstractPropertyResolver implements ConfigurablePropertyRe * {@inheritDoc} The default is ":". * @see org.springframework.util.SystemPropertyUtils#VALUE_SEPARATOR */ - @Override public void setValueSeparator(String valueSeparator) { this.valueSeparator = valueSeparator; } - @Override public String resolvePlaceholders(String text) { if (nonStrictHelper == null) { nonStrictHelper = createPlaceholderHelper(true); @@ -148,7 +136,6 @@ public abstract class AbstractPropertyResolver implements ConfigurablePropertyRe return doResolvePlaceholders(text, nonStrictHelper); } - @Override public String resolveRequiredPlaceholders(String text) throws IllegalArgumentException { if (strictHelper == null) { strictHelper = createPlaceholderHelper(false); @@ -161,7 +148,6 @@ public abstract class AbstractPropertyResolver implements ConfigurablePropertyRe *

The default value for this implementation is {@code false}. * @since 3.2 */ - @Override public void setIgnoreUnresolvableNestedPlaceholders(boolean ignoreUnresolvableNestedPlaceholders) { this.ignoreUnresolvableNestedPlaceholders = ignoreUnresolvableNestedPlaceholders; } @@ -186,7 +172,6 @@ public abstract class AbstractPropertyResolver implements ConfigurablePropertyRe private String doResolvePlaceholders(String text, PropertyPlaceholderHelper helper) { return helper.replacePlaceholders(text, new PlaceholderResolver() { - @Override public String resolvePlaceholder(String placeholderName) { return getProperty(placeholderName); } diff --git a/spring-core/src/main/java/org/springframework/core/env/EnumerablePropertySource.java b/spring-core/src/main/java/org/springframework/core/env/EnumerablePropertySource.java index 11039d712c..cea039dd37 100644 --- a/spring-core/src/main/java/org/springframework/core/env/EnumerablePropertySource.java +++ b/spring-core/src/main/java/org/springframework/core/env/EnumerablePropertySource.java @@ -65,7 +65,6 @@ public abstract class EnumerablePropertySource extends PropertySource { * the {@link #getPropertyNames()} array. * @param name the property to find */ - @Override public boolean containsProperty(String name) { Assert.notNull(name, "property name must not be null"); for (String candidate : this.getPropertyNames()) { diff --git a/spring-core/src/main/java/org/springframework/core/env/MutablePropertySources.java b/spring-core/src/main/java/org/springframework/core/env/MutablePropertySources.java index 0a7c14120f..b085d09afd 100644 --- a/spring-core/src/main/java/org/springframework/core/env/MutablePropertySources.java +++ b/spring-core/src/main/java/org/springframework/core/env/MutablePropertySources.java @@ -74,18 +74,15 @@ public class MutablePropertySources implements PropertySources { } - @Override public boolean contains(String name) { return this.propertySourceList.contains(PropertySource.named(name)); } - @Override public PropertySource get(String name) { int index = this.propertySourceList.indexOf(PropertySource.named(name)); return index == -1 ? null : this.propertySourceList.get(index); } - @Override public Iterator> iterator() { return this.propertySourceList.iterator(); } diff --git a/spring-core/src/main/java/org/springframework/core/env/PropertySourcesPropertyResolver.java b/spring-core/src/main/java/org/springframework/core/env/PropertySourcesPropertyResolver.java index 08d482ba03..f761527437 100644 --- a/spring-core/src/main/java/org/springframework/core/env/PropertySourcesPropertyResolver.java +++ b/spring-core/src/main/java/org/springframework/core/env/PropertySourcesPropertyResolver.java @@ -43,7 +43,6 @@ public class PropertySourcesPropertyResolver extends AbstractPropertyResolver { this.propertySources = propertySources; } - @Override public boolean containsProperty(String key) { for (PropertySource propertySource : this.propertySources) { if (propertySource.containsProperty(key)) { @@ -53,7 +52,6 @@ public class PropertySourcesPropertyResolver extends AbstractPropertyResolver { return false; } - @Override public String getProperty(String key) { if (logger.isTraceEnabled()) { logger.trace(format("getProperty(\"%s\") (implicit targetType [String])", key)); @@ -61,7 +59,6 @@ public class PropertySourcesPropertyResolver extends AbstractPropertyResolver { return this.getProperty(key, String.class); } - @Override public T getProperty(String key, Class targetValueType) { boolean debugEnabled = logger.isDebugEnabled(); if (logger.isTraceEnabled()) { @@ -98,7 +95,6 @@ public class PropertySourcesPropertyResolver extends AbstractPropertyResolver { return null; } - @Override public Class getPropertyAsClass(String key, Class targetValueType) { boolean debugEnabled = logger.isDebugEnabled(); if (logger.isTraceEnabled()) { diff --git a/spring-core/src/main/java/org/springframework/core/env/ReadOnlySystemAttributesMap.java b/spring-core/src/main/java/org/springframework/core/env/ReadOnlySystemAttributesMap.java index df59662b18..7f17ddc451 100644 --- a/spring-core/src/main/java/org/springframework/core/env/ReadOnlySystemAttributesMap.java +++ b/spring-core/src/main/java/org/springframework/core/env/ReadOnlySystemAttributesMap.java @@ -35,7 +35,6 @@ import org.springframework.util.Assert; */ abstract class ReadOnlySystemAttributesMap implements Map { - @Override public boolean containsKey(Object key) { return get(key) != null; } @@ -44,7 +43,6 @@ abstract class ReadOnlySystemAttributesMap implements Map { * @param key the name of the system attribute to retrieve * @throws IllegalArgumentException if given key is non-String */ - @Override public String get(Object key) { Assert.isInstanceOf(String.class, key, String.format("expected key [%s] to be of type String, got %s", @@ -53,7 +51,6 @@ abstract class ReadOnlySystemAttributesMap implements Map { return this.getSystemAttribute((String) key); } - @Override public boolean isEmpty() { return false; } @@ -67,47 +64,38 @@ abstract class ReadOnlySystemAttributesMap implements Map { // Unsupported - @Override public int size() { throw new UnsupportedOperationException(); } - @Override public String put(String key, String value) { throw new UnsupportedOperationException(); } - @Override public boolean containsValue(Object value) { throw new UnsupportedOperationException(); } - @Override public String remove(Object key) { throw new UnsupportedOperationException(); } - @Override public void clear() { throw new UnsupportedOperationException(); } - @Override public Set keySet() { throw new UnsupportedOperationException(); } - @Override public void putAll(Map m) { throw new UnsupportedOperationException(); } - @Override public Collection values() { throw new UnsupportedOperationException(); } - @Override public Set> entrySet() { throw new UnsupportedOperationException(); } diff --git a/spring-core/src/main/java/org/springframework/core/io/AbstractResource.java b/spring-core/src/main/java/org/springframework/core/io/AbstractResource.java index 8dd0e7d57a..b035c9ef53 100644 --- a/spring-core/src/main/java/org/springframework/core/io/AbstractResource.java +++ b/spring-core/src/main/java/org/springframework/core/io/AbstractResource.java @@ -46,7 +46,6 @@ public abstract class AbstractResource implements Resource { * falling back to whether an InputStream can be opened. * This will cover both directories and content resources. */ - @Override public boolean exists() { // Try file existence: can we find the file in the file system? try { @@ -68,7 +67,6 @@ public abstract class AbstractResource implements Resource { /** * This implementation always returns {@code true}. */ - @Override public boolean isReadable() { return true; } @@ -76,7 +74,6 @@ public abstract class AbstractResource implements Resource { /** * This implementation always returns {@code false}. */ - @Override public boolean isOpen() { return false; } @@ -85,7 +82,6 @@ public abstract class AbstractResource implements Resource { * This implementation throws a FileNotFoundException, assuming * that the resource cannot be resolved to a URL. */ - @Override public URL getURL() throws IOException { throw new FileNotFoundException(getDescription() + " cannot be resolved to URL"); } @@ -94,7 +90,6 @@ public abstract class AbstractResource implements Resource { * This implementation builds a URI based on the URL returned * by {@link #getURL()}. */ - @Override public URI getURI() throws IOException { URL url = getURL(); try { @@ -109,7 +104,6 @@ public abstract class AbstractResource implements Resource { * This implementation throws a FileNotFoundException, assuming * that the resource cannot be resolved to an absolute file path. */ - @Override public File getFile() throws IOException { throw new FileNotFoundException(getDescription() + " cannot be resolved to absolute file path"); } @@ -121,7 +115,6 @@ public abstract class AbstractResource implements Resource { * @see #getInputStream() * @throws IllegalStateException if {@link #getInputStream()} returns null. */ - @Override public long contentLength() throws IOException { InputStream is = this.getInputStream(); Assert.state(is != null, "resource input stream must not be null"); @@ -148,7 +141,6 @@ public abstract class AbstractResource implements Resource { * if available. * @see #getFileForLastModifiedCheck() */ - @Override public long lastModified() throws IOException { long lastModified = getFileForLastModifiedCheck().lastModified(); if (lastModified == 0L) { @@ -173,7 +165,6 @@ public abstract class AbstractResource implements Resource { * This implementation throws a FileNotFoundException, assuming * that relative resources cannot be created for this resource. */ - @Override public Resource createRelative(String relativePath) throws IOException { throw new FileNotFoundException("Cannot create a relative resource for " + getDescription()); } @@ -182,7 +173,6 @@ public abstract class AbstractResource implements Resource { * This implementation always returns {@code null}, * assuming that this resource type does not have a filename. */ - @Override public String getFilename() { return null; } diff --git a/spring-core/src/main/java/org/springframework/core/io/ByteArrayResource.java b/spring-core/src/main/java/org/springframework/core/io/ByteArrayResource.java index b9709e3808..d195def969 100644 --- a/spring-core/src/main/java/org/springframework/core/io/ByteArrayResource.java +++ b/spring-core/src/main/java/org/springframework/core/io/ByteArrayResource.java @@ -93,7 +93,6 @@ public class ByteArrayResource extends AbstractResource { * underlying byte array. * @see java.io.ByteArrayInputStream */ - @Override public InputStream getInputStream() throws IOException { return new ByteArrayInputStream(this.byteArray); } @@ -101,7 +100,6 @@ public class ByteArrayResource extends AbstractResource { /** * This implementation returns the passed-in description, if any. */ - @Override public String getDescription() { return this.description; } diff --git a/spring-core/src/main/java/org/springframework/core/io/ClassPathResource.java b/spring-core/src/main/java/org/springframework/core/io/ClassPathResource.java index f14f22613a..e881d4034c 100644 --- a/spring-core/src/main/java/org/springframework/core/io/ClassPathResource.java +++ b/spring-core/src/main/java/org/springframework/core/io/ClassPathResource.java @@ -145,7 +145,6 @@ public class ClassPathResource extends AbstractFileResolvingResource { * @see java.lang.ClassLoader#getResourceAsStream(String) * @see java.lang.Class#getResourceAsStream(String) */ - @Override public InputStream getInputStream() throws IOException { InputStream is; if (this.clazz != null) { @@ -204,7 +203,6 @@ public class ClassPathResource extends AbstractFileResolvingResource { /** * This implementation returns a description that includes the class path location. */ - @Override public String getDescription() { StringBuilder builder = new StringBuilder("class path resource ["); diff --git a/spring-core/src/main/java/org/springframework/core/io/ClassRelativeResourceLoader.java b/spring-core/src/main/java/org/springframework/core/io/ClassRelativeResourceLoader.java index bcf88fa127..00f267e443 100644 --- a/spring-core/src/main/java/org/springframework/core/io/ClassRelativeResourceLoader.java +++ b/spring-core/src/main/java/org/springframework/core/io/ClassRelativeResourceLoader.java @@ -43,7 +43,6 @@ public class ClassRelativeResourceLoader extends DefaultResourceLoader { setClassLoader(clazz.getClassLoader()); } - @Override protected Resource getResourceByPath(String path) { return new ClassRelativeContextResource(path, this.clazz); } @@ -62,7 +61,6 @@ public class ClassRelativeResourceLoader extends DefaultResourceLoader { this.clazz = clazz; } - @Override public String getPathWithinContext() { return getPath(); } diff --git a/spring-core/src/main/java/org/springframework/core/io/DefaultResourceLoader.java b/spring-core/src/main/java/org/springframework/core/io/DefaultResourceLoader.java index 09e5e908b0..1a390f04ec 100644 --- a/spring-core/src/main/java/org/springframework/core/io/DefaultResourceLoader.java +++ b/spring-core/src/main/java/org/springframework/core/io/DefaultResourceLoader.java @@ -79,13 +79,11 @@ public class DefaultResourceLoader implements ResourceLoader { * ClassPathResource objects created by this resource loader. * @see ClassPathResource */ - @Override public ClassLoader getClassLoader() { return (this.classLoader != null ? this.classLoader : ClassUtils.getDefaultClassLoader()); } - @Override public Resource getResource(String location) { Assert.notNull(location, "Location must not be null"); if (location.startsWith(CLASSPATH_URL_PREFIX)) { @@ -130,7 +128,6 @@ public class DefaultResourceLoader implements ResourceLoader { super(path, classLoader); } - @Override public String getPathWithinContext() { return getPath(); } diff --git a/spring-core/src/main/java/org/springframework/core/io/DescriptiveResource.java b/spring-core/src/main/java/org/springframework/core/io/DescriptiveResource.java index 7202147922..8385891ea3 100644 --- a/spring-core/src/main/java/org/springframework/core/io/DescriptiveResource.java +++ b/spring-core/src/main/java/org/springframework/core/io/DescriptiveResource.java @@ -54,13 +54,11 @@ public class DescriptiveResource extends AbstractResource { return false; } - @Override public InputStream getInputStream() throws IOException { throw new FileNotFoundException( getDescription() + " cannot be opened because it does not point to a readable resource"); } - @Override public String getDescription() { return this.description; } diff --git a/spring-core/src/main/java/org/springframework/core/io/FileSystemResource.java b/spring-core/src/main/java/org/springframework/core/io/FileSystemResource.java index e47ee5390f..57da655a5d 100644 --- a/spring-core/src/main/java/org/springframework/core/io/FileSystemResource.java +++ b/spring-core/src/main/java/org/springframework/core/io/FileSystemResource.java @@ -109,7 +109,6 @@ public class FileSystemResource extends AbstractResource implements WritableReso * This implementation opens a FileInputStream for the underlying file. * @see java.io.FileInputStream */ - @Override public InputStream getInputStream() throws IOException { return new FileInputStream(this.file); } @@ -173,7 +172,6 @@ public class FileSystemResource extends AbstractResource implements WritableReso * path of the file. * @see java.io.File#getAbsolutePath() */ - @Override public String getDescription() { return "file [" + this.file.getAbsolutePath() + "]"; } @@ -187,7 +185,6 @@ public class FileSystemResource extends AbstractResource implements WritableReso * @see java.io.File#canWrite() * @see java.io.File#isDirectory() */ - @Override public boolean isWritable() { return (this.file.canWrite() && !this.file.isDirectory()); } @@ -196,7 +193,6 @@ public class FileSystemResource extends AbstractResource implements WritableReso * This implementation opens a FileOutputStream for the underlying file. * @see java.io.FileOutputStream */ - @Override public OutputStream getOutputStream() throws IOException { return new FileOutputStream(this.file); } diff --git a/spring-core/src/main/java/org/springframework/core/io/FileSystemResourceLoader.java b/spring-core/src/main/java/org/springframework/core/io/FileSystemResourceLoader.java index 7446b71ff2..b5e00c7f30 100644 --- a/spring-core/src/main/java/org/springframework/core/io/FileSystemResourceLoader.java +++ b/spring-core/src/main/java/org/springframework/core/io/FileSystemResourceLoader.java @@ -65,7 +65,6 @@ public class FileSystemResourceLoader extends DefaultResourceLoader { super(path); } - @Override public String getPathWithinContext() { return getPath(); } diff --git a/spring-core/src/main/java/org/springframework/core/io/InputStreamResource.java b/spring-core/src/main/java/org/springframework/core/io/InputStreamResource.java index 3a37cac97a..d9b2405c99 100644 --- a/spring-core/src/main/java/org/springframework/core/io/InputStreamResource.java +++ b/spring-core/src/main/java/org/springframework/core/io/InputStreamResource.java @@ -88,7 +88,6 @@ public class InputStreamResource extends AbstractResource { * This implementation throws IllegalStateException if attempting to * read the underlying stream multiple times. */ - @Override public InputStream getInputStream() throws IOException, IllegalStateException { if (this.read) { throw new IllegalStateException("InputStream has already been read - " + @@ -101,7 +100,6 @@ public class InputStreamResource extends AbstractResource { /** * This implementation returns the passed-in description, if any. */ - @Override public String getDescription() { return this.description; } diff --git a/spring-core/src/main/java/org/springframework/core/io/UrlResource.java b/spring-core/src/main/java/org/springframework/core/io/UrlResource.java index 0a94c76ba5..5c37b0b448 100644 --- a/spring-core/src/main/java/org/springframework/core/io/UrlResource.java +++ b/spring-core/src/main/java/org/springframework/core/io/UrlResource.java @@ -118,7 +118,6 @@ public class UrlResource extends AbstractFileResolvingResource { * @see java.net.URLConnection#setUseCaches(boolean) * @see java.net.URLConnection#getInputStream() */ - @Override public InputStream getInputStream() throws IOException { URLConnection con = this.url.openConnection(); ResourceUtils.useCachesIfNecessary(con); @@ -197,7 +196,6 @@ public class UrlResource extends AbstractFileResolvingResource { /** * This implementation returns a description that includes the URL. */ - @Override public String getDescription() { return "URL [" + this.url + "]"; } diff --git a/spring-core/src/main/java/org/springframework/core/io/VfsResource.java b/spring-core/src/main/java/org/springframework/core/io/VfsResource.java index 2b492ab0b9..4877d0ad7b 100644 --- a/spring-core/src/main/java/org/springframework/core/io/VfsResource.java +++ b/spring-core/src/main/java/org/springframework/core/io/VfsResource.java @@ -46,7 +46,6 @@ public class VfsResource extends AbstractResource { } - @Override public InputStream getInputStream() throws IOException { return VfsUtils.getInputStream(this.resource); } @@ -115,7 +114,6 @@ public class VfsResource extends AbstractResource { return VfsUtils.getName(this.resource); } - @Override public String getDescription() { return this.resource.toString(); } diff --git a/spring-core/src/main/java/org/springframework/core/io/support/PathMatchingResourcePatternResolver.java b/spring-core/src/main/java/org/springframework/core/io/support/PathMatchingResourcePatternResolver.java index 3b5238da86..9b2f8493b6 100644 --- a/spring-core/src/main/java/org/springframework/core/io/support/PathMatchingResourcePatternResolver.java +++ b/spring-core/src/main/java/org/springframework/core/io/support/PathMatchingResourcePatternResolver.java @@ -231,7 +231,6 @@ public class PathMatchingResourcePatternResolver implements ResourcePatternResol * Return the ClassLoader that this pattern resolver works with * (never {@code null}). */ - @Override public ClassLoader getClassLoader() { return getResourceLoader().getClassLoader(); } @@ -254,12 +253,10 @@ public class PathMatchingResourcePatternResolver implements ResourcePatternResol } - @Override public Resource getResource(String location) { return getResourceLoader().getResource(location); } - @Override public Resource[] getResources(String locationPattern) throws IOException { Assert.notNull(locationPattern, "Location pattern must not be null"); if (locationPattern.startsWith(CLASSPATH_ALL_URL_PREFIX)) { @@ -677,7 +674,6 @@ public class PathMatchingResourcePatternResolver implements ResourcePatternResol this.rootPath = (rootPath.length() == 0 || rootPath.endsWith("/") ? rootPath : rootPath + "/"); } - @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { String methodName = method.getName(); if (Object.class.equals(method.getDeclaringClass())) { diff --git a/spring-core/src/main/java/org/springframework/core/serializer/DefaultDeserializer.java b/spring-core/src/main/java/org/springframework/core/serializer/DefaultDeserializer.java index 66a91b3836..f61f697d2f 100644 --- a/spring-core/src/main/java/org/springframework/core/serializer/DefaultDeserializer.java +++ b/spring-core/src/main/java/org/springframework/core/serializer/DefaultDeserializer.java @@ -34,7 +34,6 @@ public class DefaultDeserializer implements Deserializer { /** * Reads the input stream and deserializes into an object. */ - @Override public Object deserialize(InputStream inputStream) throws IOException { ObjectInputStream objectInputStream = new ObjectInputStream(inputStream); try { diff --git a/spring-core/src/main/java/org/springframework/core/serializer/DefaultSerializer.java b/spring-core/src/main/java/org/springframework/core/serializer/DefaultSerializer.java index 6146ee018c..04fe8bed5a 100644 --- a/spring-core/src/main/java/org/springframework/core/serializer/DefaultSerializer.java +++ b/spring-core/src/main/java/org/springframework/core/serializer/DefaultSerializer.java @@ -34,7 +34,6 @@ public class DefaultSerializer implements Serializer { * Writes the source object to an output stream using Java Serialization. * The source object must implement {@link Serializable}. */ - @Override public void serialize(Object object, OutputStream outputStream) throws IOException { if (!(object instanceof Serializable)) { throw new IllegalArgumentException(getClass().getSimpleName() + " requires a Serializable payload " + diff --git a/spring-core/src/main/java/org/springframework/core/serializer/support/DeserializingConverter.java b/spring-core/src/main/java/org/springframework/core/serializer/support/DeserializingConverter.java index 074acf7bbb..84745294a4 100644 --- a/spring-core/src/main/java/org/springframework/core/serializer/support/DeserializingConverter.java +++ b/spring-core/src/main/java/org/springframework/core/serializer/support/DeserializingConverter.java @@ -52,7 +52,6 @@ public class DeserializingConverter implements Converter { } - @Override public Object convert(byte[] source) { ByteArrayInputStream byteStream = new ByteArrayInputStream(source); try { diff --git a/spring-core/src/main/java/org/springframework/core/serializer/support/SerializingConverter.java b/spring-core/src/main/java/org/springframework/core/serializer/support/SerializingConverter.java index b092cc7bd1..61a7553ac1 100644 --- a/spring-core/src/main/java/org/springframework/core/serializer/support/SerializingConverter.java +++ b/spring-core/src/main/java/org/springframework/core/serializer/support/SerializingConverter.java @@ -55,7 +55,6 @@ public class SerializingConverter implements Converter { /** * Serializes the source object and returns the byte array result. */ - @Override public byte[] convert(Object source) { ByteArrayOutputStream byteStream = new ByteArrayOutputStream(128); try { diff --git a/spring-core/src/main/java/org/springframework/core/style/DefaultToStringStyler.java b/spring-core/src/main/java/org/springframework/core/style/DefaultToStringStyler.java index 97a6ce23ce..f81cb4a82e 100644 --- a/spring-core/src/main/java/org/springframework/core/style/DefaultToStringStyler.java +++ b/spring-core/src/main/java/org/springframework/core/style/DefaultToStringStyler.java @@ -52,7 +52,6 @@ public class DefaultToStringStyler implements ToStringStyler { } - @Override public void styleStart(StringBuilder buffer, Object obj) { if (!obj.getClass().isArray()) { buffer.append('[').append(ClassUtils.getShortName(obj.getClass())); @@ -71,12 +70,10 @@ public class DefaultToStringStyler implements ToStringStyler { buffer.append(ObjectUtils.getIdentityHexString(obj)); } - @Override public void styleEnd(StringBuilder buffer, Object o) { buffer.append(']'); } - @Override public void styleField(StringBuilder buffer, String fieldName, Object value) { styleFieldStart(buffer, fieldName); styleValue(buffer, value); @@ -90,12 +87,10 @@ public class DefaultToStringStyler implements ToStringStyler { protected void styleFieldEnd(StringBuilder buffer, String fieldName) { } - @Override public void styleValue(StringBuilder buffer, Object value) { buffer.append(this.valueStyler.style(value)); } - @Override public void styleFieldSeparator(StringBuilder buffer) { buffer.append(','); } diff --git a/spring-core/src/main/java/org/springframework/core/style/DefaultValueStyler.java b/spring-core/src/main/java/org/springframework/core/style/DefaultValueStyler.java index a0063b2374..2e6251c0f5 100644 --- a/spring-core/src/main/java/org/springframework/core/style/DefaultValueStyler.java +++ b/spring-core/src/main/java/org/springframework/core/style/DefaultValueStyler.java @@ -48,7 +48,6 @@ public class DefaultValueStyler implements ValueStyler { private static final String ARRAY = "array"; - @Override public String style(Object value) { if (value == null) { return NULL; diff --git a/spring-core/src/main/java/org/springframework/core/task/SimpleAsyncTaskExecutor.java b/spring-core/src/main/java/org/springframework/core/task/SimpleAsyncTaskExecutor.java index 21622a29cc..f6b714007e 100644 --- a/spring-core/src/main/java/org/springframework/core/task/SimpleAsyncTaskExecutor.java +++ b/spring-core/src/main/java/org/springframework/core/task/SimpleAsyncTaskExecutor.java @@ -144,7 +144,6 @@ public class SimpleAsyncTaskExecutor extends CustomizableThreadCreator implement * if configured (through the superclass's settings). * @see #doExecute(Runnable) */ - @Override public void execute(Runnable task) { execute(task, TIMEOUT_INDEFINITE); } @@ -158,7 +157,6 @@ public class SimpleAsyncTaskExecutor extends CustomizableThreadCreator implement * @see #TIMEOUT_IMMEDIATE * @see #doExecute(Runnable) */ - @Override public void execute(Runnable task, long startTimeout) { Assert.notNull(task, "Runnable must not be null"); if (isThrottleActive() && startTimeout > TIMEOUT_IMMEDIATE) { @@ -170,14 +168,12 @@ public class SimpleAsyncTaskExecutor extends CustomizableThreadCreator implement } } - @Override public Future submit(Runnable task) { FutureTask future = new FutureTask(task, null); execute(future, TIMEOUT_INDEFINITE); return future; } - @Override public Future submit(Callable task) { FutureTask future = new FutureTask(task); execute(future, TIMEOUT_INDEFINITE); @@ -229,7 +225,6 @@ public class SimpleAsyncTaskExecutor extends CustomizableThreadCreator implement this.target = target; } - @Override public void run() { try { this.target.run(); diff --git a/spring-core/src/main/java/org/springframework/core/task/SyncTaskExecutor.java b/spring-core/src/main/java/org/springframework/core/task/SyncTaskExecutor.java index 64f8c7934e..47bebf4676 100644 --- a/spring-core/src/main/java/org/springframework/core/task/SyncTaskExecutor.java +++ b/spring-core/src/main/java/org/springframework/core/task/SyncTaskExecutor.java @@ -44,7 +44,6 @@ public class SyncTaskExecutor implements TaskExecutor, Serializable { * invocation of it's {@link Runnable#run() run()} method. * @throws IllegalArgumentException if the given {@code task} is {@code null} */ - @Override public void execute(Runnable task) { Assert.notNull(task, "Runnable must not be null"); task.run(); diff --git a/spring-core/src/main/java/org/springframework/core/task/TaskExecutor.java b/spring-core/src/main/java/org/springframework/core/task/TaskExecutor.java index bf8b9f910e..fea960e3c6 100644 --- a/spring-core/src/main/java/org/springframework/core/task/TaskExecutor.java +++ b/spring-core/src/main/java/org/springframework/core/task/TaskExecutor.java @@ -45,7 +45,6 @@ public interface TaskExecutor extends Executor { * @param task the {@code Runnable} to execute (never {@code null}) * @throws TaskRejectedException if the given task was not accepted */ - @Override void execute(Runnable task); } diff --git a/spring-core/src/main/java/org/springframework/core/task/support/ConcurrentExecutorAdapter.java b/spring-core/src/main/java/org/springframework/core/task/support/ConcurrentExecutorAdapter.java index 8f9f09eda5..a99a66b204 100644 --- a/spring-core/src/main/java/org/springframework/core/task/support/ConcurrentExecutorAdapter.java +++ b/spring-core/src/main/java/org/springframework/core/task/support/ConcurrentExecutorAdapter.java @@ -50,7 +50,6 @@ public class ConcurrentExecutorAdapter implements Executor { } - @Override public void execute(Runnable command) { this.taskExecutor.execute(command); } diff --git a/spring-core/src/main/java/org/springframework/core/task/support/ExecutorServiceAdapter.java b/spring-core/src/main/java/org/springframework/core/task/support/ExecutorServiceAdapter.java index 393ecee66d..0c594b93a1 100644 --- a/spring-core/src/main/java/org/springframework/core/task/support/ExecutorServiceAdapter.java +++ b/spring-core/src/main/java/org/springframework/core/task/support/ExecutorServiceAdapter.java @@ -57,35 +57,29 @@ public class ExecutorServiceAdapter extends AbstractExecutorService { } - @Override public void execute(Runnable task) { this.taskExecutor.execute(task); } - @Override public void shutdown() { throw new IllegalStateException( "Manual shutdown not supported - ExecutorServiceAdapter is dependent on an external lifecycle"); } - @Override public List shutdownNow() { throw new IllegalStateException( "Manual shutdown not supported - ExecutorServiceAdapter is dependent on an external lifecycle"); } - @Override public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException { throw new IllegalStateException( "Manual shutdown not supported - ExecutorServiceAdapter is dependent on an external lifecycle"); } - @Override public boolean isShutdown() { return false; } - @Override public boolean isTerminated() { return false; } diff --git a/spring-core/src/main/java/org/springframework/core/task/support/TaskExecutorAdapter.java b/spring-core/src/main/java/org/springframework/core/task/support/TaskExecutorAdapter.java index 9247995065..bd2df283d7 100644 --- a/spring-core/src/main/java/org/springframework/core/task/support/TaskExecutorAdapter.java +++ b/spring-core/src/main/java/org/springframework/core/task/support/TaskExecutorAdapter.java @@ -59,7 +59,6 @@ public class TaskExecutorAdapter implements AsyncTaskExecutor { * Delegates to the specified JDK 1.5 concurrent executor. * @see java.util.concurrent.Executor#execute(Runnable) */ - @Override public void execute(Runnable task) { try { this.concurrentExecutor.execute(task); @@ -70,12 +69,10 @@ public class TaskExecutorAdapter implements AsyncTaskExecutor { } } - @Override public void execute(Runnable task, long startTimeout) { execute(task); } - @Override public Future submit(Runnable task) { try { if (this.concurrentExecutor instanceof ExecutorService) { @@ -93,7 +90,6 @@ public class TaskExecutorAdapter implements AsyncTaskExecutor { } } - @Override public Future submit(Callable task) { try { if (this.concurrentExecutor instanceof ExecutorService) { diff --git a/spring-core/src/main/java/org/springframework/core/type/StandardAnnotationMetadata.java b/spring-core/src/main/java/org/springframework/core/type/StandardAnnotationMetadata.java index a0f5c2a46b..1e5d00a9ca 100644 --- a/spring-core/src/main/java/org/springframework/core/type/StandardAnnotationMetadata.java +++ b/spring-core/src/main/java/org/springframework/core/type/StandardAnnotationMetadata.java @@ -64,7 +64,6 @@ public class StandardAnnotationMetadata extends StandardClassMetadata implements } - @Override public Set getAnnotationTypes() { Set types = new LinkedHashSet(); Annotation[] anns = getIntrospectedClass().getAnnotations(); @@ -74,7 +73,6 @@ public class StandardAnnotationMetadata extends StandardClassMetadata implements return types; } - @Override public Set getMetaAnnotationTypes(String annotationType) { Annotation[] anns = getIntrospectedClass().getAnnotations(); for (Annotation ann : anns) { @@ -93,7 +91,6 @@ public class StandardAnnotationMetadata extends StandardClassMetadata implements return null; } - @Override public boolean hasAnnotation(String annotationType) { Annotation[] anns = getIntrospectedClass().getAnnotations(); for (Annotation ann : anns) { @@ -104,7 +101,6 @@ public class StandardAnnotationMetadata extends StandardClassMetadata implements return false; } - @Override public boolean hasMetaAnnotation(String annotationType) { Annotation[] anns = getIntrospectedClass().getAnnotations(); for (Annotation ann : anns) { @@ -123,7 +119,6 @@ public class StandardAnnotationMetadata extends StandardClassMetadata implements return false; } - @Override public boolean isAnnotated(String annotationType) { Annotation[] anns = getIntrospectedClass().getAnnotations(); for (Annotation ann : anns) { @@ -139,12 +134,10 @@ public class StandardAnnotationMetadata extends StandardClassMetadata implements return false; } - @Override public Map getAnnotationAttributes(String annotationType) { return this.getAnnotationAttributes(annotationType, false); } - @Override public Map getAnnotationAttributes(String annotationType, boolean classValuesAsString) { Annotation[] anns = getIntrospectedClass().getAnnotations(); for (Annotation ann : anns) { @@ -162,7 +155,6 @@ public class StandardAnnotationMetadata extends StandardClassMetadata implements return null; } - @Override public boolean hasAnnotatedMethods(String annotationType) { Method[] methods = getIntrospectedClass().getDeclaredMethods(); for (Method method : methods) { @@ -182,7 +174,6 @@ public class StandardAnnotationMetadata extends StandardClassMetadata implements return false; } - @Override public Set getAnnotatedMethods(String annotationType) { Method[] methods = getIntrospectedClass().getDeclaredMethods(); Set annotatedMethods = new LinkedHashSet(); diff --git a/spring-core/src/main/java/org/springframework/core/type/StandardClassMetadata.java b/spring-core/src/main/java/org/springframework/core/type/StandardClassMetadata.java index 1b62d91c46..4ac99d4d4d 100644 --- a/spring-core/src/main/java/org/springframework/core/type/StandardClassMetadata.java +++ b/spring-core/src/main/java/org/springframework/core/type/StandardClassMetadata.java @@ -50,61 +50,50 @@ public class StandardClassMetadata implements ClassMetadata { } - @Override public String getClassName() { return this.introspectedClass.getName(); } - @Override public boolean isInterface() { return this.introspectedClass.isInterface(); } - @Override public boolean isAbstract() { return Modifier.isAbstract(this.introspectedClass.getModifiers()); } - @Override public boolean isConcrete() { return !(isInterface() || isAbstract()); } - @Override public boolean isFinal() { return Modifier.isFinal(this.introspectedClass.getModifiers()); } - @Override public boolean isIndependent() { return (!hasEnclosingClass() || (this.introspectedClass.getDeclaringClass() != null && Modifier.isStatic(this.introspectedClass.getModifiers()))); } - @Override public boolean hasEnclosingClass() { return (this.introspectedClass.getEnclosingClass() != null); } - @Override public String getEnclosingClassName() { Class enclosingClass = this.introspectedClass.getEnclosingClass(); return (enclosingClass != null ? enclosingClass.getName() : null); } - @Override public boolean hasSuperClass() { return (this.introspectedClass.getSuperclass() != null); } - @Override public String getSuperClassName() { Class superClass = this.introspectedClass.getSuperclass(); return (superClass != null ? superClass.getName() : null); } - @Override public String[] getInterfaceNames() { Class[] ifcs = this.introspectedClass.getInterfaces(); String[] ifcNames = new String[ifcs.length]; @@ -114,7 +103,6 @@ public class StandardClassMetadata implements ClassMetadata { return ifcNames; } - @Override public String[] getMemberClassNames() { LinkedHashSet memberClassNames = new LinkedHashSet(); for (Class nestedClass : this.introspectedClass.getDeclaredClasses()) { diff --git a/spring-core/src/main/java/org/springframework/core/type/StandardMethodMetadata.java b/spring-core/src/main/java/org/springframework/core/type/StandardMethodMetadata.java index 4ba2beed94..c6564c643f 100644 --- a/spring-core/src/main/java/org/springframework/core/type/StandardMethodMetadata.java +++ b/spring-core/src/main/java/org/springframework/core/type/StandardMethodMetadata.java @@ -68,32 +68,26 @@ public class StandardMethodMetadata implements MethodMetadata { } - @Override public String getMethodName() { return this.introspectedMethod.getName(); } - @Override public String getDeclaringClassName() { return this.introspectedMethod.getDeclaringClass().getName(); } - @Override public boolean isStatic() { return Modifier.isStatic(this.introspectedMethod.getModifiers()); } - @Override public boolean isFinal() { return Modifier.isFinal(this.introspectedMethod.getModifiers()); } - @Override public boolean isOverridable() { return (!isStatic() && !isFinal() && !Modifier.isPrivate(this.introspectedMethod.getModifiers())); } - @Override public boolean isAnnotated(String annotationType) { Annotation[] anns = this.introspectedMethod.getAnnotations(); for (Annotation ann : anns) { @@ -109,7 +103,6 @@ public class StandardMethodMetadata implements MethodMetadata { return false; } - @Override public Map getAnnotationAttributes(String annotationType) { Annotation[] anns = this.introspectedMethod.getAnnotations(); for (Annotation ann : anns) { diff --git a/spring-core/src/main/java/org/springframework/core/type/classreading/AnnotationAttributesReadingVisitor.java b/spring-core/src/main/java/org/springframework/core/type/classreading/AnnotationAttributesReadingVisitor.java index a90f8e30ee..cdf49fd6b6 100644 --- a/spring-core/src/main/java/org/springframework/core/type/classreading/AnnotationAttributesReadingVisitor.java +++ b/spring-core/src/main/java/org/springframework/core/type/classreading/AnnotationAttributesReadingVisitor.java @@ -58,12 +58,10 @@ abstract class AbstractRecursiveAnnotationVisitor extends AnnotationVisitor { } - @Override public void visit(String attributeName, Object attributeValue) { this.attributes.put(attributeName, attributeValue); } - @Override public AnnotationVisitor visitAnnotation(String attributeName, String asmTypeDescriptor) { String annotationType = Type.getType(asmTypeDescriptor).getClassName(); AnnotationAttributes nestedAttributes = new AnnotationAttributes(); @@ -71,12 +69,10 @@ abstract class AbstractRecursiveAnnotationVisitor extends AnnotationVisitor { return new RecursiveAnnotationAttributesVisitor(annotationType, nestedAttributes, this.classLoader); } - @Override public AnnotationVisitor visitArray(String attributeName) { return new RecursiveAnnotationArrayVisitor(attributeName, this.attributes, this.classLoader); } - @Override public void visitEnum(String attributeName, String asmTypeDescriptor, String attributeValue) { Object valueToUse = attributeValue; try { @@ -138,7 +134,6 @@ final class RecursiveAnnotationArrayVisitor extends AbstractRecursiveAnnotationV return new RecursiveAnnotationAttributesVisitor(annotationType, nestedAttributes, this.classLoader); } - @Override public void visitEnd() { if (!this.allNestedAttributes.isEmpty()) { this.attributes.put(this.attributeName, this.allNestedAttributes.toArray( @@ -165,7 +160,6 @@ class RecursiveAnnotationAttributesVisitor extends AbstractRecursiveAnnotationVi } - @Override public final void visitEnd() { try { Class annotationClass = this.classLoader.loadClass(this.annotationType); diff --git a/spring-core/src/main/java/org/springframework/core/type/classreading/AnnotationMetadataReadingVisitor.java b/spring-core/src/main/java/org/springframework/core/type/classreading/AnnotationMetadataReadingVisitor.java index bcc982f96e..97a4897f81 100644 --- a/spring-core/src/main/java/org/springframework/core/type/classreading/AnnotationMetadataReadingVisitor.java +++ b/spring-core/src/main/java/org/springframework/core/type/classreading/AnnotationMetadataReadingVisitor.java @@ -74,22 +74,18 @@ final class AnnotationMetadataReadingVisitor extends ClassMetadataReadingVisitor } - @Override public Set getAnnotationTypes() { return this.annotationSet; } - @Override public Set getMetaAnnotationTypes(String annotationType) { return this.metaAnnotationMap.get(annotationType); } - @Override public boolean hasAnnotation(String annotationType) { return this.annotationSet.contains(annotationType); } - @Override public boolean hasMetaAnnotation(String metaAnnotationType) { Collection> allMetaTypes = this.metaAnnotationMap.values(); for (Set metaTypes : allMetaTypes) { @@ -100,17 +96,14 @@ final class AnnotationMetadataReadingVisitor extends ClassMetadataReadingVisitor return false; } - @Override public boolean isAnnotated(String annotationType) { return this.attributeMap.containsKey(annotationType); } - @Override public AnnotationAttributes getAnnotationAttributes(String annotationType) { return getAnnotationAttributes(annotationType, false); } - @Override public AnnotationAttributes getAnnotationAttributes(String annotationType, boolean classValuesAsString) { return getAnnotationAttributes(annotationType, classValuesAsString, false); } @@ -176,12 +169,10 @@ final class AnnotationMetadataReadingVisitor extends ClassMetadataReadingVisitor return result; } - @Override public boolean hasAnnotatedMethods(String annotationType) { return this.methodMetadataMap.containsKey(annotationType); } - @Override public Set getAnnotatedMethods(String annotationType) { List list = this.methodMetadataMap.get(annotationType); if (CollectionUtils.isEmpty(list)) { diff --git a/spring-core/src/main/java/org/springframework/core/type/classreading/ClassMetadataReadingVisitor.java b/spring-core/src/main/java/org/springframework/core/type/classreading/ClassMetadataReadingVisitor.java index 0d78fc2737..45785bc8a3 100644 --- a/spring-core/src/main/java/org/springframework/core/type/classreading/ClassMetadataReadingVisitor.java +++ b/spring-core/src/main/java/org/springframework/core/type/classreading/ClassMetadataReadingVisitor.java @@ -67,7 +67,6 @@ class ClassMetadataReadingVisitor extends ClassVisitor implements ClassMetadata } - @Override public void visit(int version, int access, String name, String signature, String supername, String[] interfaces) { this.className = ClassUtils.convertResourcePathToClassName(name); this.isInterface = ((access & Opcodes.ACC_INTERFACE) != 0); @@ -82,12 +81,10 @@ class ClassMetadataReadingVisitor extends ClassVisitor implements ClassMetadata } } - @Override public void visitOuterClass(String owner, String name, String desc) { this.enclosingClassName = ClassUtils.convertResourcePathToClassName(owner); } - @Override public void visitInnerClass(String name, String outerName, String innerName, int access) { if (outerName != null) { String fqName = ClassUtils.convertResourcePathToClassName(name); @@ -102,96 +99,78 @@ class ClassMetadataReadingVisitor extends ClassVisitor implements ClassMetadata } } - @Override public void visitSource(String source, String debug) { // no-op } - @Override public AnnotationVisitor visitAnnotation(String desc, boolean visible) { // no-op return new EmptyAnnotationVisitor(); } - @Override public void visitAttribute(Attribute attr) { // no-op } - @Override public FieldVisitor visitField(int access, String name, String desc, String signature, Object value) { // no-op return new EmptyFieldVisitor(); } - @Override public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { // no-op return new EmptyMethodVisitor(); } - @Override public void visitEnd() { // no-op } - @Override public String getClassName() { return this.className; } - @Override public boolean isInterface() { return this.isInterface; } - @Override public boolean isAbstract() { return this.isAbstract; } - @Override public boolean isConcrete() { return !(this.isInterface || this.isAbstract); } - @Override public boolean isFinal() { return this.isFinal; } - @Override public boolean isIndependent() { return (this.enclosingClassName == null || this.independentInnerClass); } - @Override public boolean hasEnclosingClass() { return (this.enclosingClassName != null); } - @Override public String getEnclosingClassName() { return this.enclosingClassName; } - @Override public boolean hasSuperClass() { return (this.superClassName != null); } - @Override public String getSuperClassName() { return this.superClassName; } - @Override public String[] getInterfaceNames() { return this.interfaces; } - @Override public String[] getMemberClassNames() { return this.memberClassNames.toArray(new String[this.memberClassNames.size()]); } diff --git a/spring-core/src/main/java/org/springframework/core/type/classreading/MethodMetadataReadingVisitor.java b/spring-core/src/main/java/org/springframework/core/type/classreading/MethodMetadataReadingVisitor.java index 450dabb604..4cae5b5829 100644 --- a/spring-core/src/main/java/org/springframework/core/type/classreading/MethodMetadataReadingVisitor.java +++ b/spring-core/src/main/java/org/springframework/core/type/classreading/MethodMetadataReadingVisitor.java @@ -70,37 +70,30 @@ final class MethodMetadataReadingVisitor extends MethodVisitor implements Method return new AnnotationAttributesReadingVisitor(className, this.attributeMap, null, this.classLoader); } - @Override public String getMethodName() { return this.name; } - @Override public boolean isStatic() { return ((this.access & Opcodes.ACC_STATIC) != 0); } - @Override public boolean isFinal() { return ((this.access & Opcodes.ACC_FINAL) != 0); } - @Override public boolean isOverridable() { return (!isStatic() && !isFinal() && ((this.access & Opcodes.ACC_PRIVATE) == 0)); } - @Override public boolean isAnnotated(String annotationType) { return this.attributeMap.containsKey(annotationType); } - @Override public AnnotationAttributes getAnnotationAttributes(String annotationType) { return this.attributeMap.get(annotationType); } - @Override public String getDeclaringClassName() { return this.declaringClassName; } diff --git a/spring-core/src/main/java/org/springframework/core/type/classreading/SimpleMetadataReader.java b/spring-core/src/main/java/org/springframework/core/type/classreading/SimpleMetadataReader.java index 17964636ef..b2bf4405da 100644 --- a/spring-core/src/main/java/org/springframework/core/type/classreading/SimpleMetadataReader.java +++ b/spring-core/src/main/java/org/springframework/core/type/classreading/SimpleMetadataReader.java @@ -64,17 +64,14 @@ final class SimpleMetadataReader implements MetadataReader { this.resource = resource; } - @Override public Resource getResource() { return this.resource; } - @Override public ClassMetadata getClassMetadata() { return this.classMetadata; } - @Override public AnnotationMetadata getAnnotationMetadata() { return this.annotationMetadata; } diff --git a/spring-core/src/main/java/org/springframework/core/type/classreading/SimpleMetadataReaderFactory.java b/spring-core/src/main/java/org/springframework/core/type/classreading/SimpleMetadataReaderFactory.java index 667bac6882..42f686ead7 100644 --- a/spring-core/src/main/java/org/springframework/core/type/classreading/SimpleMetadataReaderFactory.java +++ b/spring-core/src/main/java/org/springframework/core/type/classreading/SimpleMetadataReaderFactory.java @@ -70,14 +70,12 @@ public class SimpleMetadataReaderFactory implements MetadataReaderFactory { } - @Override public MetadataReader getMetadataReader(String className) throws IOException { String resourcePath = ResourceLoader.CLASSPATH_URL_PREFIX + ClassUtils.convertClassNameToResourcePath(className) + ClassUtils.CLASS_FILE_SUFFIX; return getMetadataReader(this.resourceLoader.getResource(resourcePath)); } - @Override public MetadataReader getMetadataReader(Resource resource) throws IOException { return new SimpleMetadataReader(resource, this.resourceLoader.getClassLoader()); } diff --git a/spring-core/src/main/java/org/springframework/core/type/filter/AbstractClassTestingTypeFilter.java b/spring-core/src/main/java/org/springframework/core/type/filter/AbstractClassTestingTypeFilter.java index a87168b7ad..2b9e8b8c04 100644 --- a/spring-core/src/main/java/org/springframework/core/type/filter/AbstractClassTestingTypeFilter.java +++ b/spring-core/src/main/java/org/springframework/core/type/filter/AbstractClassTestingTypeFilter.java @@ -35,7 +35,6 @@ import org.springframework.core.type.classreading.MetadataReader; */ public abstract class AbstractClassTestingTypeFilter implements TypeFilter { - @Override public final boolean match(MetadataReader metadataReader, MetadataReaderFactory metadataReaderFactory) throws IOException { diff --git a/spring-core/src/main/java/org/springframework/core/type/filter/AbstractTypeHierarchyTraversingFilter.java b/spring-core/src/main/java/org/springframework/core/type/filter/AbstractTypeHierarchyTraversingFilter.java index 1ae2eef2ee..82362b5670 100644 --- a/spring-core/src/main/java/org/springframework/core/type/filter/AbstractTypeHierarchyTraversingFilter.java +++ b/spring-core/src/main/java/org/springframework/core/type/filter/AbstractTypeHierarchyTraversingFilter.java @@ -47,7 +47,6 @@ public abstract class AbstractTypeHierarchyTraversingFilter implements TypeFilte } - @Override public boolean match(MetadataReader metadataReader, MetadataReaderFactory metadataReaderFactory) throws IOException { diff --git a/spring-core/src/main/java/org/springframework/core/type/filter/AspectJTypeFilter.java b/spring-core/src/main/java/org/springframework/core/type/filter/AspectJTypeFilter.java index 2af6411e22..d50215cdc2 100644 --- a/spring-core/src/main/java/org/springframework/core/type/filter/AspectJTypeFilter.java +++ b/spring-core/src/main/java/org/springframework/core/type/filter/AspectJTypeFilter.java @@ -60,7 +60,6 @@ public class AspectJTypeFilter implements TypeFilter { } - @Override public boolean match(MetadataReader metadataReader, MetadataReaderFactory metadataReaderFactory) throws IOException { diff --git a/spring-core/src/main/java/org/springframework/util/AntPathMatcher.java b/spring-core/src/main/java/org/springframework/util/AntPathMatcher.java index 2953f306fe..bbceda14dc 100644 --- a/spring-core/src/main/java/org/springframework/util/AntPathMatcher.java +++ b/spring-core/src/main/java/org/springframework/util/AntPathMatcher.java @@ -67,17 +67,14 @@ public class AntPathMatcher implements PathMatcher { } - @Override public boolean isPattern(String path) { return (path.indexOf('*') != -1 || path.indexOf('?') != -1); } - @Override public boolean match(String pattern, String path) { return doMatch(pattern, path, true, null); } - @Override public boolean matchStart(String pattern, String path) { return doMatch(pattern, path, false, null); } @@ -248,7 +245,6 @@ public class AntPathMatcher implements PathMatcher { *

Assumes that {@link #match} returns {@code true} for '{@code pattern}' and '{@code path}', but * does not enforce this. */ - @Override public String extractPathWithinPattern(String pattern, String path) { String[] patternParts = StringUtils.tokenizeToStringArray(pattern, this.pathSeparator); String[] pathParts = StringUtils.tokenizeToStringArray(path, this.pathSeparator); @@ -279,7 +275,6 @@ public class AntPathMatcher implements PathMatcher { return builder.toString(); } - @Override public Map extractUriTemplateVariables(String pattern, String path) { Map variables = new LinkedHashMap(); boolean result = doMatch(pattern, path, true, variables); @@ -306,7 +301,6 @@ public class AntPathMatcher implements PathMatcher { * @return the combination of the two patterns * @throws IllegalArgumentException when the two patterns cannot be combined */ - @Override public String combine(String pattern1, String pattern2) { if (!StringUtils.hasText(pattern1) && !StringUtils.hasText(pattern2)) { return ""; @@ -385,7 +379,6 @@ public class AntPathMatcher implements PathMatcher { * @param path the full path to use for comparison * @return a comparator capable of sorting patterns in order of explicitness */ - @Override public Comparator getPatternComparator(String path) { return new AntPatternComparator(path); } @@ -399,7 +392,6 @@ public class AntPathMatcher implements PathMatcher { this.path = path; } - @Override public int compare(String pattern1, String pattern2) { if (pattern1 == null && pattern2 == null) { return 0; diff --git a/spring-core/src/main/java/org/springframework/util/AutoPopulatingList.java b/spring-core/src/main/java/org/springframework/util/AutoPopulatingList.java index d58e0acd81..7a2135fb65 100644 --- a/spring-core/src/main/java/org/springframework/util/AutoPopulatingList.java +++ b/spring-core/src/main/java/org/springframework/util/AutoPopulatingList.java @@ -92,37 +92,30 @@ public class AutoPopulatingList implements List, Serializable { } - @Override public void add(int index, E element) { this.backingList.add(index, element); } - @Override public boolean add(E o) { return this.backingList.add(o); } - @Override public boolean addAll(Collection c) { return this.backingList.addAll(c); } - @Override public boolean addAll(int index, Collection c) { return this.backingList.addAll(index, c); } - @Override public void clear() { this.backingList.clear(); } - @Override public boolean contains(Object o) { return this.backingList.contains(o); } - @Override public boolean containsAll(Collection c) { return this.backingList.containsAll(c); } @@ -131,7 +124,6 @@ public class AutoPopulatingList implements List, Serializable { * Get the element at the supplied index, creating it if there is * no element at that index. */ - @Override public E get(int index) { int backingListSize = this.backingList.size(); E element = null; @@ -152,77 +144,62 @@ public class AutoPopulatingList implements List, Serializable { return element; } - @Override public int indexOf(Object o) { return this.backingList.indexOf(o); } - @Override public boolean isEmpty() { return this.backingList.isEmpty(); } - @Override public Iterator iterator() { return this.backingList.iterator(); } - @Override public int lastIndexOf(Object o) { return this.backingList.lastIndexOf(o); } - @Override public ListIterator listIterator() { return this.backingList.listIterator(); } - @Override public ListIterator listIterator(int index) { return this.backingList.listIterator(index); } - @Override public E remove(int index) { return this.backingList.remove(index); } - @Override public boolean remove(Object o) { return this.backingList.remove(o); } - @Override public boolean removeAll(Collection c) { return this.backingList.removeAll(c); } - @Override public boolean retainAll(Collection c) { return this.backingList.retainAll(c); } - @Override public E set(int index, E element) { return this.backingList.set(index, element); } - @Override public int size() { return this.backingList.size(); } - @Override public List subList(int fromIndex, int toIndex) { return this.backingList.subList(fromIndex, toIndex); } - @Override public Object[] toArray() { return this.backingList.toArray(); } - @Override public T[] toArray(T[] a) { return this.backingList.toArray(a); } @@ -282,7 +259,6 @@ public class AutoPopulatingList implements List, Serializable { this.elementClass = elementClass; } - @Override public E createElement(int index) { try { return this.elementClass.newInstance(); diff --git a/spring-core/src/main/java/org/springframework/util/CachingMapDecorator.java b/spring-core/src/main/java/org/springframework/util/CachingMapDecorator.java index 963babc1e0..d1290588fd 100644 --- a/spring-core/src/main/java/org/springframework/util/CachingMapDecorator.java +++ b/spring-core/src/main/java/org/springframework/util/CachingMapDecorator.java @@ -117,22 +117,18 @@ public abstract class CachingMapDecorator implements Map, Serializab } - @Override public int size() { return this.targetMap.size(); } - @Override public boolean isEmpty() { return this.targetMap.isEmpty(); } - @Override public boolean containsKey(Object key) { return this.targetMap.containsKey(key); } - @Override public boolean containsValue(Object value) { Object valueToCheck = (value != null ? value : NULL_VALUE); if (this.synchronize) { @@ -157,7 +153,6 @@ public abstract class CachingMapDecorator implements Map, Serializab return false; } - @Override public V remove(Object key) { return unwrapReturnValue(this.targetMap.remove(key)); } @@ -171,17 +166,14 @@ public abstract class CachingMapDecorator implements Map, Serializab return (returnValue == NULL_VALUE ? null : (V) returnValue); } - @Override public void putAll(Map map) { this.targetMap.putAll(map); } - @Override public void clear() { this.targetMap.clear(); } - @Override public Set keySet() { if (this.synchronize) { synchronized (this.targetMap) { @@ -193,7 +185,6 @@ public abstract class CachingMapDecorator implements Map, Serializab } } - @Override public Collection values() { if (this.synchronize) { synchronized (this.targetMap) { @@ -222,7 +213,6 @@ public abstract class CachingMapDecorator implements Map, Serializab return values; } - @Override public Set> entrySet() { if (this.synchronize) { synchronized (this.targetMap) { @@ -258,7 +248,6 @@ public abstract class CachingMapDecorator implements Map, Serializab * reference. * @see #useWeakValue(Object, Object) */ - @Override public V put(K key, V value) { Object newValue = value; if (value == null) { @@ -291,7 +280,6 @@ public abstract class CachingMapDecorator implements Map, Serializab * Consider overriding this method to synchronize it, if desired. * @see #create(Object) */ - @Override @SuppressWarnings("unchecked") public V get(Object key) { Object value = this.targetMap.get(key); diff --git a/spring-core/src/main/java/org/springframework/util/CollectionUtils.java b/spring-core/src/main/java/org/springframework/util/CollectionUtils.java index a16d5fecd4..5e74473fa9 100644 --- a/spring-core/src/main/java/org/springframework/util/CollectionUtils.java +++ b/spring-core/src/main/java/org/springframework/util/CollectionUtils.java @@ -370,17 +370,14 @@ public abstract class CollectionUtils { this.enumeration = enumeration; } - @Override public boolean hasNext() { return this.enumeration.hasMoreElements(); } - @Override public E next() { return this.enumeration.nextElement(); } - @Override public void remove() throws UnsupportedOperationException { throw new UnsupportedOperationException("Not supported"); } @@ -399,7 +396,6 @@ public abstract class CollectionUtils { this.map = map; } - @Override public void add(K key, V value) { List values = this.map.get(key); if (values == null) { @@ -409,27 +405,23 @@ public abstract class CollectionUtils { values.add(value); } - @Override public V getFirst(K key) { List values = this.map.get(key); return (values != null ? values.get(0) : null); } - @Override public void set(K key, V value) { List values = new LinkedList(); values.add(value); this.map.put(key, values); } - @Override public void setAll(Map values) { for (Entry entry : values.entrySet()) { set(entry.getKey(), entry.getValue()); } } - @Override public Map toSingleValueMap() { LinkedHashMap singleValueMap = new LinkedHashMap(this.map.size()); for (Entry> entry : map.entrySet()) { @@ -438,62 +430,50 @@ public abstract class CollectionUtils { return singleValueMap; } - @Override public int size() { return this.map.size(); } - @Override public boolean isEmpty() { return this.map.isEmpty(); } - @Override public boolean containsKey(Object key) { return this.map.containsKey(key); } - @Override public boolean containsValue(Object value) { return this.map.containsValue(value); } - @Override public List get(Object key) { return this.map.get(key); } - @Override public List put(K key, List value) { return this.map.put(key, value); } - @Override public List remove(Object key) { return this.map.remove(key); } - @Override public void putAll(Map> m) { this.map.putAll(m); } - @Override public void clear() { this.map.clear(); } - @Override public Set keySet() { return this.map.keySet(); } - @Override public Collection> values() { return this.map.values(); } - @Override public Set>> entrySet() { return this.map.entrySet(); } diff --git a/spring-core/src/main/java/org/springframework/util/CompositeIterator.java b/spring-core/src/main/java/org/springframework/util/CompositeIterator.java index 81f0206a74..fe250e36d8 100644 --- a/spring-core/src/main/java/org/springframework/util/CompositeIterator.java +++ b/spring-core/src/main/java/org/springframework/util/CompositeIterator.java @@ -48,7 +48,6 @@ public class CompositeIterator implements Iterator { iterators.add(iterator); } - @Override public boolean hasNext() { inUse = true; for (Iterator> it = iterators.iterator(); it.hasNext();) { @@ -59,7 +58,6 @@ public class CompositeIterator implements Iterator { return false; } - @Override public E next() { inUse = true; for (Iterator> it = iterators.iterator(); it.hasNext();) { @@ -71,7 +69,6 @@ public class CompositeIterator implements Iterator { throw new NoSuchElementException("Exhaused all iterators"); } - @Override public void remove() { throw new UnsupportedOperationException("Remove is not supported"); } diff --git a/spring-core/src/main/java/org/springframework/util/ConcurrentReferenceHashMap.java b/spring-core/src/main/java/org/springframework/util/ConcurrentReferenceHashMap.java index c638f14a5d..3da70f602b 100644 --- a/spring-core/src/main/java/org/springframework/util/ConcurrentReferenceHashMap.java +++ b/spring-core/src/main/java/org/springframework/util/ConcurrentReferenceHashMap.java @@ -249,7 +249,6 @@ public class ConcurrentReferenceHashMap extends AbstractMap implemen return put(key, value, true); } - @Override public V putIfAbsent(K key, V value) { return put(key, value, false); } @@ -285,7 +284,6 @@ public class ConcurrentReferenceHashMap extends AbstractMap implemen }); } - @Override public boolean remove(Object key, final Object value) { return doTask(key, new Task(TaskOption.RESTRUCTURE_AFTER, TaskOption.SKIP_IF_EMPTY) { @Override @@ -299,7 +297,6 @@ public class ConcurrentReferenceHashMap extends AbstractMap implemen }); } - @Override public boolean replace(K key, final V oldValue, final V newValue) { return doTask(key, new Task(TaskOption.RESTRUCTURE_BEFORE, TaskOption.SKIP_IF_EMPTY) { @Override @@ -313,7 +310,6 @@ public class ConcurrentReferenceHashMap extends AbstractMap implemen }); } - @Override public V replace(K key, final V value) { return doTask(key, new Task(TaskOption.RESTRUCTURE_BEFORE, TaskOption.SKIP_IF_EMPTY) { @Override @@ -671,17 +667,14 @@ public class ConcurrentReferenceHashMap extends AbstractMap implemen this.value = value; } - @Override public K getKey() { return this.key; } - @Override public V getValue() { return this.value; } - @Override public V setValue(V value) { V previous = this.value; this.value = value; @@ -843,13 +836,11 @@ public class ConcurrentReferenceHashMap extends AbstractMap implemen moveToNextSegment(); } - @Override public boolean hasNext() { getNextIfNecessary(); return this.next != null; } - @Override public Entry next() { getNextIfNecessary(); if (this.next == null) { @@ -895,7 +886,6 @@ public class ConcurrentReferenceHashMap extends AbstractMap implemen } } - @Override public void remove() { Assert.state(this.last != null); ConcurrentReferenceHashMap.this.remove(this.last.getKey()); @@ -965,17 +955,14 @@ public class ConcurrentReferenceHashMap extends AbstractMap implemen this.nextReference = next; } - @Override public int getHash() { return this.hash; } - @Override public Reference getNext() { return this.nextReference; } - @Override public void release() { enqueue(); clear(); @@ -1000,17 +987,14 @@ public class ConcurrentReferenceHashMap extends AbstractMap implemen this.nextReference = next; } - @Override public int getHash() { return this.hash; } - @Override public Reference getNext() { return this.nextReference; } - @Override public void release() { enqueue(); clear(); diff --git a/spring-core/src/main/java/org/springframework/util/DefaultPropertiesPersister.java b/spring-core/src/main/java/org/springframework/util/DefaultPropertiesPersister.java index 3cceeeace7..19f2698c36 100644 --- a/spring-core/src/main/java/org/springframework/util/DefaultPropertiesPersister.java +++ b/spring-core/src/main/java/org/springframework/util/DefaultPropertiesPersister.java @@ -75,12 +75,10 @@ public class DefaultPropertiesPersister implements PropertiesPersister { ClassUtils.hasMethod(Properties.class, "store", new Class[] {Writer.class, String.class}); - @Override public void load(Properties props, InputStream is) throws IOException { props.load(is); } - @Override public void load(Properties props, Reader reader) throws IOException { if (loadFromReaderAvailable) { // On JDK 1.6+ @@ -159,12 +157,10 @@ public class DefaultPropertiesPersister implements PropertiesPersister { } - @Override public void store(Properties props, OutputStream os, String header) throws IOException { props.store(os, header); } - @Override public void store(Properties props, Writer writer, String header) throws IOException { if (storeToWriterAvailable) { // On JDK 1.6+ @@ -231,7 +227,6 @@ public class DefaultPropertiesPersister implements PropertiesPersister { } - @Override public void loadFromXml(Properties props, InputStream is) throws IOException { try { props.loadFromXML(is); @@ -241,7 +236,6 @@ public class DefaultPropertiesPersister implements PropertiesPersister { } } - @Override public void storeToXml(Properties props, OutputStream os, String header) throws IOException { try { props.storeToXML(os, header); @@ -251,7 +245,6 @@ public class DefaultPropertiesPersister implements PropertiesPersister { } } - @Override public void storeToXml(Properties props, OutputStream os, String header, String encoding) throws IOException { try { props.storeToXML(os, header, encoding); diff --git a/spring-core/src/main/java/org/springframework/util/LinkedMultiValueMap.java b/spring-core/src/main/java/org/springframework/util/LinkedMultiValueMap.java index f980b91c23..0bd2291578 100644 --- a/spring-core/src/main/java/org/springframework/util/LinkedMultiValueMap.java +++ b/spring-core/src/main/java/org/springframework/util/LinkedMultiValueMap.java @@ -70,7 +70,6 @@ public class LinkedMultiValueMap implements MultiValueMap, Serializa // MultiValueMap implementation - @Override public void add(K key, V value) { List values = this.targetMap.get(key); if (values == null) { @@ -80,27 +79,23 @@ public class LinkedMultiValueMap implements MultiValueMap, Serializa values.add(value); } - @Override public V getFirst(K key) { List values = this.targetMap.get(key); return (values != null ? values.get(0) : null); } - @Override public void set(K key, V value) { List values = new LinkedList(); values.add(value); this.targetMap.put(key, values); } - @Override public void setAll(Map values) { for (Entry entry : values.entrySet()) { set(entry.getKey(), entry.getValue()); } } - @Override public Map toSingleValueMap() { LinkedHashMap singleValueMap = new LinkedHashMap(this.targetMap.size()); for (Entry> entry : targetMap.entrySet()) { @@ -112,62 +107,50 @@ public class LinkedMultiValueMap implements MultiValueMap, Serializa // Map implementation - @Override public int size() { return this.targetMap.size(); } - @Override public boolean isEmpty() { return this.targetMap.isEmpty(); } - @Override public boolean containsKey(Object key) { return this.targetMap.containsKey(key); } - @Override public boolean containsValue(Object value) { return this.targetMap.containsValue(value); } - @Override public List get(Object key) { return this.targetMap.get(key); } - @Override public List put(K key, List value) { return this.targetMap.put(key, value); } - @Override public List remove(Object key) { return this.targetMap.remove(key); } - @Override public void putAll(Map> m) { this.targetMap.putAll(m); } - @Override public void clear() { this.targetMap.clear(); } - @Override public Set keySet() { return this.targetMap.keySet(); } - @Override public Collection> values() { return this.targetMap.values(); } - @Override public Set>> entrySet() { return this.targetMap.entrySet(); } diff --git a/spring-core/src/main/java/org/springframework/util/PropertyPlaceholderHelper.java b/spring-core/src/main/java/org/springframework/util/PropertyPlaceholderHelper.java index 99d666e5a5..5728b28604 100644 --- a/spring-core/src/main/java/org/springframework/util/PropertyPlaceholderHelper.java +++ b/spring-core/src/main/java/org/springframework/util/PropertyPlaceholderHelper.java @@ -107,7 +107,6 @@ public class PropertyPlaceholderHelper { public String replacePlaceholders(String value, final Properties properties) { Assert.notNull(properties, "Argument 'properties' must not be null."); return replacePlaceholders(value, new PlaceholderResolver() { - @Override public String resolvePlaceholder(String placeholderName) { return properties.getProperty(placeholderName); } diff --git a/spring-core/src/main/java/org/springframework/util/ReflectionUtils.java b/spring-core/src/main/java/org/springframework/util/ReflectionUtils.java index 0edaeca2d3..87ba421141 100644 --- a/spring-core/src/main/java/org/springframework/util/ReflectionUtils.java +++ b/spring-core/src/main/java/org/springframework/util/ReflectionUtils.java @@ -494,7 +494,6 @@ public abstract class ReflectionUtils { public static Method[] getAllDeclaredMethods(Class leafClass) throws IllegalArgumentException { final List methods = new ArrayList(32); doWithMethods(leafClass, new MethodCallback() { - @Override public void doWith(Method method) { methods.add(method); } @@ -510,7 +509,6 @@ public abstract class ReflectionUtils { public static Method[] getUniqueDeclaredMethods(Class leafClass) throws IllegalArgumentException { final List methods = new ArrayList(32); doWithMethods(leafClass, new MethodCallback() { - @Override public void doWith(Method method) { boolean knownSignature = false; Method methodBeingOverriddenWithCovariantReturnType = null; @@ -599,7 +597,6 @@ public abstract class ReflectionUtils { + "] must be same or subclass as source class [" + src.getClass().getName() + "]"); } doWithFields(src.getClass(), new FieldCallback() { - @Override public void doWith(Field field) throws IllegalArgumentException, IllegalAccessException { makeAccessible(field); Object srcValue = field.get(src); @@ -666,7 +663,6 @@ public abstract class ReflectionUtils { */ public static FieldFilter COPYABLE_FIELDS = new FieldFilter() { - @Override public boolean matches(Field field) { return !(Modifier.isStatic(field.getModifiers()) || Modifier.isFinal(field.getModifiers())); } @@ -678,7 +674,6 @@ public abstract class ReflectionUtils { */ public static MethodFilter NON_BRIDGED_METHODS = new MethodFilter() { - @Override public boolean matches(Method method) { return !method.isBridge(); } @@ -691,7 +686,6 @@ public abstract class ReflectionUtils { */ public static MethodFilter USER_DECLARED_METHODS = new MethodFilter() { - @Override public boolean matches(Method method) { return (!method.isBridge() && method.getDeclaringClass() != Object.class); } diff --git a/spring-core/src/main/java/org/springframework/util/SystemPropertyUtils.java b/spring-core/src/main/java/org/springframework/util/SystemPropertyUtils.java index 72f8712ff0..19ee4478e7 100644 --- a/spring-core/src/main/java/org/springframework/util/SystemPropertyUtils.java +++ b/spring-core/src/main/java/org/springframework/util/SystemPropertyUtils.java @@ -89,7 +89,6 @@ public abstract class SystemPropertyUtils { this.text = text; } - @Override public String resolvePlaceholder(String placeholderName) { try { String propVal = System.getProperty(placeholderName); diff --git a/spring-core/src/main/java/org/springframework/util/WeakReferenceMonitor.java b/spring-core/src/main/java/org/springframework/util/WeakReferenceMonitor.java index 2ce4b7901e..46693c96b1 100644 --- a/spring-core/src/main/java/org/springframework/util/WeakReferenceMonitor.java +++ b/spring-core/src/main/java/org/springframework/util/WeakReferenceMonitor.java @@ -132,7 +132,6 @@ public class WeakReferenceMonitor { */ private static class MonitoringProcess implements Runnable { - @Override public void run() { logger.debug("Starting reference monitor thread"); // Check if there are any tracked entries left. diff --git a/spring-core/src/main/java/org/springframework/util/comparator/BooleanComparator.java b/spring-core/src/main/java/org/springframework/util/comparator/BooleanComparator.java index ec68351e79..6fd0c2294b 100644 --- a/spring-core/src/main/java/org/springframework/util/comparator/BooleanComparator.java +++ b/spring-core/src/main/java/org/springframework/util/comparator/BooleanComparator.java @@ -59,7 +59,6 @@ public final class BooleanComparator implements Comparator, Serializabl } - @Override public int compare(Boolean v1, Boolean v2) { return (v1 ^ v2) ? ((v1 ^ this.trueLow) ? 1 : -1) : 0; } diff --git a/spring-core/src/main/java/org/springframework/util/comparator/ComparableComparator.java b/spring-core/src/main/java/org/springframework/util/comparator/ComparableComparator.java index b8b27418cb..40e4e7af93 100644 --- a/spring-core/src/main/java/org/springframework/util/comparator/ComparableComparator.java +++ b/spring-core/src/main/java/org/springframework/util/comparator/ComparableComparator.java @@ -32,7 +32,6 @@ public class ComparableComparator> implements Comparator @SuppressWarnings("rawtypes") public static final ComparableComparator INSTANCE = new ComparableComparator(); - @Override public int compare(T o1, T o2) { return o1.compareTo(o2); } diff --git a/spring-core/src/main/java/org/springframework/util/comparator/CompoundComparator.java b/spring-core/src/main/java/org/springframework/util/comparator/CompoundComparator.java index 20652a3288..ba56bd54d1 100644 --- a/spring-core/src/main/java/org/springframework/util/comparator/CompoundComparator.java +++ b/spring-core/src/main/java/org/springframework/util/comparator/CompoundComparator.java @@ -162,7 +162,6 @@ public class CompoundComparator implements Comparator, Serializable { return this.comparators.size(); } - @Override public int compare(T o1, T o2) { Assert.state(this.comparators.size() > 0, "No sort definitions have been added to this CompoundComparator to compare"); diff --git a/spring-core/src/main/java/org/springframework/util/comparator/InstanceComparator.java b/spring-core/src/main/java/org/springframework/util/comparator/InstanceComparator.java index b9c6161038..80b8b9b369 100644 --- a/spring-core/src/main/java/org/springframework/util/comparator/InstanceComparator.java +++ b/spring-core/src/main/java/org/springframework/util/comparator/InstanceComparator.java @@ -52,7 +52,6 @@ public class InstanceComparator implements Comparator { } - @Override public int compare(T o1, T o2) { int i1 = getOrder(o1); int i2 = getOrder(o2); diff --git a/spring-core/src/main/java/org/springframework/util/comparator/InvertibleComparator.java b/spring-core/src/main/java/org/springframework/util/comparator/InvertibleComparator.java index 9a9f5f9c19..f78e56ff5d 100644 --- a/spring-core/src/main/java/org/springframework/util/comparator/InvertibleComparator.java +++ b/spring-core/src/main/java/org/springframework/util/comparator/InvertibleComparator.java @@ -84,7 +84,6 @@ public class InvertibleComparator implements Comparator, Serializable { } - @Override public int compare(T o1, T o2) { int result = this.comparator.compare(o1, o2); if (result != 0) { diff --git a/spring-core/src/main/java/org/springframework/util/comparator/NullSafeComparator.java b/spring-core/src/main/java/org/springframework/util/comparator/NullSafeComparator.java index ebff3488c2..1171bdc1d3 100644 --- a/spring-core/src/main/java/org/springframework/util/comparator/NullSafeComparator.java +++ b/spring-core/src/main/java/org/springframework/util/comparator/NullSafeComparator.java @@ -86,7 +86,6 @@ public class NullSafeComparator implements Comparator { } - @Override public int compare(T o1, T o2) { if (o1 == o2) { return 0; diff --git a/spring-core/src/main/java/org/springframework/util/xml/AbstractStaxContentHandler.java b/spring-core/src/main/java/org/springframework/util/xml/AbstractStaxContentHandler.java index f494b88592..46f4d98ebe 100644 --- a/spring-core/src/main/java/org/springframework/util/xml/AbstractStaxContentHandler.java +++ b/spring-core/src/main/java/org/springframework/util/xml/AbstractStaxContentHandler.java @@ -37,7 +37,6 @@ abstract class AbstractStaxContentHandler implements ContentHandler { private boolean namespaceContextChanged = false; - @Override public final void startDocument() throws SAXException { namespaceContext.clear(); namespaceContextChanged = false; @@ -51,7 +50,6 @@ abstract class AbstractStaxContentHandler implements ContentHandler { protected abstract void startDocumentInternal() throws XMLStreamException; - @Override public final void endDocument() throws SAXException { namespaceContext.clear(); namespaceContextChanged = false; @@ -70,7 +68,6 @@ abstract class AbstractStaxContentHandler implements ContentHandler { * * @see SimpleNamespaceContext#bindNamespaceUri(String,String) */ - @Override public final void startPrefixMapping(String prefix, String uri) { namespaceContext.bindNamespaceUri(prefix, uri); namespaceContextChanged = true; @@ -81,13 +78,11 @@ abstract class AbstractStaxContentHandler implements ContentHandler { * * @see SimpleNamespaceContext#removeBinding(String) */ - @Override public final void endPrefixMapping(String prefix) { namespaceContext.removeBinding(prefix); namespaceContextChanged = true; } - @Override public final void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException { try { startElementInternal(toQName(uri, qName), atts, namespaceContextChanged ? namespaceContext : null); @@ -101,7 +96,6 @@ abstract class AbstractStaxContentHandler implements ContentHandler { protected abstract void startElementInternal(QName name, Attributes atts, SimpleNamespaceContext namespaceContext) throws XMLStreamException; - @Override public final void endElement(String uri, String localName, String qName) throws SAXException { try { endElementInternal(toQName(uri, qName), namespaceContextChanged ? namespaceContext : null); @@ -115,7 +109,6 @@ abstract class AbstractStaxContentHandler implements ContentHandler { protected abstract void endElementInternal(QName name, SimpleNamespaceContext namespaceContext) throws XMLStreamException; - @Override public final void characters(char ch[], int start, int length) throws SAXException { try { charactersInternal(ch, start, length); @@ -127,7 +120,6 @@ abstract class AbstractStaxContentHandler implements ContentHandler { protected abstract void charactersInternal(char[] ch, int start, int length) throws XMLStreamException; - @Override public final void ignorableWhitespace(char[] ch, int start, int length) throws SAXException { try { ignorableWhitespaceInternal(ch, start, length); @@ -139,7 +131,6 @@ abstract class AbstractStaxContentHandler implements ContentHandler { protected abstract void ignorableWhitespaceInternal(char[] ch, int start, int length) throws XMLStreamException; - @Override public final void processingInstruction(String target, String data) throws SAXException { try { processingInstructionInternal(target, data); @@ -151,7 +142,6 @@ abstract class AbstractStaxContentHandler implements ContentHandler { protected abstract void processingInstructionInternal(String target, String data) throws XMLStreamException; - @Override public final void skippedEntity(String name) throws SAXException { try { skippedEntityInternal(name); diff --git a/spring-core/src/main/java/org/springframework/util/xml/AbstractStaxXMLReader.java b/spring-core/src/main/java/org/springframework/util/xml/AbstractStaxXMLReader.java index 25dc97b299..feeefd6e8e 100644 --- a/spring-core/src/main/java/org/springframework/util/xml/AbstractStaxXMLReader.java +++ b/spring-core/src/main/java/org/springframework/util/xml/AbstractStaxXMLReader.java @@ -134,7 +134,6 @@ abstract class AbstractStaxXMLReader extends AbstractXMLReader { * @param ignored is ignored * @throws SAXException a SAX exception, possibly wrapping a {@code XMLStreamException} */ - @Override public final void parse(InputSource ignored) throws SAXException { parse(); } @@ -145,7 +144,6 @@ abstract class AbstractStaxXMLReader extends AbstractXMLReader { * @param ignored is ignored * @throws SAXException A SAX exception, possibly wrapping a {@code XMLStreamException} */ - @Override public final void parse(String ignored) throws SAXException { parse(); } @@ -219,22 +217,18 @@ abstract class AbstractStaxXMLReader extends AbstractXMLReader { this.location = location; } - @Override public String getPublicId() { return location.getPublicId(); } - @Override public String getSystemId() { return location.getSystemId(); } - @Override public int getLineNumber() { return location.getLineNumber(); } - @Override public int getColumnNumber() { return location.getColumnNumber(); } diff --git a/spring-core/src/main/java/org/springframework/util/xml/AbstractXMLReader.java b/spring-core/src/main/java/org/springframework/util/xml/AbstractXMLReader.java index 7b24a3c1c2..300f9ff2fc 100644 --- a/spring-core/src/main/java/org/springframework/util/xml/AbstractXMLReader.java +++ b/spring-core/src/main/java/org/springframework/util/xml/AbstractXMLReader.java @@ -48,42 +48,34 @@ abstract class AbstractXMLReader implements XMLReader { private LexicalHandler lexicalHandler; - @Override public ContentHandler getContentHandler() { return contentHandler; } - @Override public void setContentHandler(ContentHandler contentHandler) { this.contentHandler = contentHandler; } - @Override public void setDTDHandler(DTDHandler dtdHandler) { this.dtdHandler = dtdHandler; } - @Override public DTDHandler getDTDHandler() { return dtdHandler; } - @Override public EntityResolver getEntityResolver() { return entityResolver; } - @Override public void setEntityResolver(EntityResolver entityResolver) { this.entityResolver = entityResolver; } - @Override public ErrorHandler getErrorHandler() { return errorHandler; } - @Override public void setErrorHandler(ErrorHandler errorHandler) { this.errorHandler = errorHandler; } @@ -98,7 +90,6 @@ abstract class AbstractXMLReader implements XMLReader { * @throws org.xml.sax.SAXNotRecognizedException * always */ - @Override public boolean getFeature(String name) throws SAXNotRecognizedException, SAXNotSupportedException { throw new SAXNotRecognizedException(name); } @@ -108,7 +99,6 @@ abstract class AbstractXMLReader implements XMLReader { * * @throws SAXNotRecognizedException always */ - @Override public void setFeature(String name, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException { throw new SAXNotRecognizedException(name); } @@ -117,7 +107,6 @@ abstract class AbstractXMLReader implements XMLReader { * Throws a {@code SAXNotRecognizedException} exception when the given property does not signify a lexical * handler. The property name for a lexical handler is {@code http://xml.org/sax/properties/lexical-handler}. */ - @Override public Object getProperty(String name) throws SAXNotRecognizedException, SAXNotSupportedException { if ("http://xml.org/sax/properties/lexical-handler".equals(name)) { return lexicalHandler; @@ -131,7 +120,6 @@ abstract class AbstractXMLReader implements XMLReader { * Throws a {@code SAXNotRecognizedException} exception when the given property does not signify a lexical * handler. The property name for a lexical handler is {@code http://xml.org/sax/properties/lexical-handler}. */ - @Override public void setProperty(String name, Object value) throws SAXNotRecognizedException, SAXNotSupportedException { if ("http://xml.org/sax/properties/lexical-handler".equals(name)) { lexicalHandler = (LexicalHandler) value; diff --git a/spring-core/src/main/java/org/springframework/util/xml/AbstractXMLStreamReader.java b/spring-core/src/main/java/org/springframework/util/xml/AbstractXMLStreamReader.java index 6335ea156f..e8c8a64348 100644 --- a/spring-core/src/main/java/org/springframework/util/xml/AbstractXMLStreamReader.java +++ b/spring-core/src/main/java/org/springframework/util/xml/AbstractXMLStreamReader.java @@ -31,7 +31,6 @@ import org.springframework.util.Assert; */ abstract class AbstractXMLStreamReader implements XMLStreamReader { - @Override public String getElementText() throws XMLStreamException { if (getEventType() != XMLStreamConstants.START_ELEMENT) { throw new XMLStreamException("parser must be on START_ELEMENT to read next text", getLocation()); @@ -62,22 +61,18 @@ abstract class AbstractXMLStreamReader implements XMLStreamReader { return builder.toString(); } - @Override public String getAttributeLocalName(int index) { return getAttributeName(index).getLocalPart(); } - @Override public String getAttributeNamespace(int index) { return getAttributeName(index).getNamespaceURI(); } - @Override public String getAttributePrefix(int index) { return getAttributeName(index).getPrefix(); } - @Override public String getNamespaceURI() { int eventType = getEventType(); if (eventType == XMLStreamConstants.START_ELEMENT || eventType == XMLStreamConstants.END_ELEMENT) { @@ -88,13 +83,11 @@ abstract class AbstractXMLStreamReader implements XMLStreamReader { } } - @Override public String getNamespaceURI(String prefix) { Assert.notNull(prefix, "No prefix given"); return getNamespaceContext().getNamespaceURI(prefix); } - @Override public boolean hasText() { int eventType = getEventType(); return eventType == XMLStreamConstants.SPACE || eventType == XMLStreamConstants.CHARACTERS || @@ -102,7 +95,6 @@ abstract class AbstractXMLStreamReader implements XMLStreamReader { eventType == XMLStreamConstants.ENTITY_REFERENCE; } - @Override public String getPrefix() { int eventType = getEventType(); if (eventType == XMLStreamConstants.START_ELEMENT || eventType == XMLStreamConstants.END_ELEMENT) { @@ -113,33 +105,27 @@ abstract class AbstractXMLStreamReader implements XMLStreamReader { } } - @Override public boolean hasName() { int eventType = getEventType(); return eventType == XMLStreamConstants.START_ELEMENT || eventType == XMLStreamConstants.END_ELEMENT; } - @Override public boolean isWhiteSpace() { return getEventType() == XMLStreamConstants.SPACE; } - @Override public boolean isStartElement() { return getEventType() == XMLStreamConstants.START_ELEMENT; } - @Override public boolean isEndElement() { return getEventType() == XMLStreamConstants.END_ELEMENT; } - @Override public boolean isCharacters() { return getEventType() == XMLStreamConstants.CHARACTERS; } - @Override public int nextTag() throws XMLStreamException { int eventType = next(); while (eventType == XMLStreamConstants.CHARACTERS && isWhiteSpace() || @@ -153,7 +139,6 @@ abstract class AbstractXMLStreamReader implements XMLStreamReader { return eventType; } - @Override public void require(int expectedType, String namespaceURI, String localName) throws XMLStreamException { int eventType = getEventType(); if (eventType != expectedType) { @@ -161,7 +146,6 @@ abstract class AbstractXMLStreamReader implements XMLStreamReader { } } - @Override public String getAttributeValue(String namespaceURI, String localName) { for (int i = 0; i < getAttributeCount(); i++) { QName name = getAttributeName(i); @@ -173,22 +157,18 @@ abstract class AbstractXMLStreamReader implements XMLStreamReader { return null; } - @Override public boolean hasNext() throws XMLStreamException { return getEventType() != END_DOCUMENT; } - @Override public String getLocalName() { return getName().getLocalPart(); } - @Override public char[] getTextCharacters() { return getText().toCharArray(); } - @Override public int getTextCharacters(int sourceStart, char[] target, int targetStart, int length) throws XMLStreamException { char[] source = getTextCharacters(); @@ -197,7 +177,6 @@ abstract class AbstractXMLStreamReader implements XMLStreamReader { return length; } - @Override public int getTextLength() { return getText().length(); } diff --git a/spring-core/src/main/java/org/springframework/util/xml/DomContentHandler.java b/spring-core/src/main/java/org/springframework/util/xml/DomContentHandler.java index 5a8d92aa85..534cb0077b 100644 --- a/spring-core/src/main/java/org/springframework/util/xml/DomContentHandler.java +++ b/spring-core/src/main/java/org/springframework/util/xml/DomContentHandler.java @@ -72,7 +72,6 @@ class DomContentHandler implements ContentHandler { } } - @Override public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { Node parent = getParent(); Element element = document.createElementNS(uri, qName); @@ -88,12 +87,10 @@ class DomContentHandler implements ContentHandler { elements.add(element); } - @Override public void endElement(String uri, String localName, String qName) throws SAXException { elements.remove(elements.size() - 1); } - @Override public void characters(char ch[], int start, int length) throws SAXException { String data = new String(ch, start, length); Node parent = getParent(); @@ -107,7 +104,6 @@ class DomContentHandler implements ContentHandler { } } - @Override public void processingInstruction(String target, String data) throws SAXException { Node parent = getParent(); ProcessingInstruction pi = document.createProcessingInstruction(target, data); @@ -118,31 +114,24 @@ class DomContentHandler implements ContentHandler { * Unsupported */ - @Override public void setDocumentLocator(Locator locator) { } - @Override public void startDocument() throws SAXException { } - @Override public void endDocument() throws SAXException { } - @Override public void startPrefixMapping(String prefix, String uri) throws SAXException { } - @Override public void endPrefixMapping(String prefix) throws SAXException { } - @Override public void ignorableWhitespace(char ch[], int start, int length) throws SAXException { } - @Override public void skippedEntity(String name) throws SAXException { } } diff --git a/spring-core/src/main/java/org/springframework/util/xml/SimpleNamespaceContext.java b/spring-core/src/main/java/org/springframework/util/xml/SimpleNamespaceContext.java index 2908fa9148..c0d966d6eb 100644 --- a/spring-core/src/main/java/org/springframework/util/xml/SimpleNamespaceContext.java +++ b/spring-core/src/main/java/org/springframework/util/xml/SimpleNamespaceContext.java @@ -43,7 +43,6 @@ public class SimpleNamespaceContext implements NamespaceContext { private String defaultNamespaceUri = ""; - @Override public String getNamespaceURI(String prefix) { Assert.notNull(prefix, "prefix is null"); if (XMLConstants.XML_NS_PREFIX.equals(prefix)) { @@ -61,13 +60,11 @@ public class SimpleNamespaceContext implements NamespaceContext { return ""; } - @Override public String getPrefix(String namespaceUri) { List prefixes = getPrefixesInternal(namespaceUri); return prefixes.isEmpty() ? null : (String) prefixes.get(0); } - @Override public Iterator getPrefixes(String namespaceUri) { return getPrefixesInternal(namespaceUri).iterator(); } diff --git a/spring-core/src/main/java/org/springframework/util/xml/SimpleSaxErrorHandler.java b/spring-core/src/main/java/org/springframework/util/xml/SimpleSaxErrorHandler.java index 3d0227db1c..ed06ed8c05 100644 --- a/spring-core/src/main/java/org/springframework/util/xml/SimpleSaxErrorHandler.java +++ b/spring-core/src/main/java/org/springframework/util/xml/SimpleSaxErrorHandler.java @@ -43,17 +43,14 @@ public class SimpleSaxErrorHandler implements ErrorHandler { } - @Override public void warning(SAXParseException ex) throws SAXException { logger.warn("Ignored XML validation warning", ex); } - @Override public void error(SAXParseException ex) throws SAXException { throw ex; } - @Override public void fatalError(SAXParseException ex) throws SAXException { throw ex; } diff --git a/spring-core/src/main/java/org/springframework/util/xml/SimpleTransformErrorListener.java b/spring-core/src/main/java/org/springframework/util/xml/SimpleTransformErrorListener.java index cab7670a92..7fd5dffa10 100644 --- a/spring-core/src/main/java/org/springframework/util/xml/SimpleTransformErrorListener.java +++ b/spring-core/src/main/java/org/springframework/util/xml/SimpleTransformErrorListener.java @@ -43,17 +43,14 @@ public class SimpleTransformErrorListener implements ErrorListener { } - @Override public void warning(TransformerException ex) throws TransformerException { logger.warn("XSLT transformation warning", ex); } - @Override public void error(TransformerException ex) throws TransformerException { logger.error("XSLT transformation error", ex); } - @Override public void fatalError(TransformerException ex) throws TransformerException { throw ex; } diff --git a/spring-core/src/main/java/org/springframework/util/xml/StaxEventContentHandler.java b/spring-core/src/main/java/org/springframework/util/xml/StaxEventContentHandler.java index 54505a587c..686ff1a634 100644 --- a/spring-core/src/main/java/org/springframework/util/xml/StaxEventContentHandler.java +++ b/spring-core/src/main/java/org/springframework/util/xml/StaxEventContentHandler.java @@ -71,7 +71,6 @@ class StaxEventContentHandler extends AbstractStaxContentHandler { this.eventConsumer = consumer; } - @Override public void setDocumentLocator(Locator locator) { if (locator != null) { this.eventFactory.setLocation(new LocatorLocationAdapter(locator)); @@ -169,27 +168,22 @@ class StaxEventContentHandler extends AbstractStaxContentHandler { this.locator = locator; } - @Override public int getLineNumber() { return this.locator.getLineNumber(); } - @Override public int getColumnNumber() { return this.locator.getColumnNumber(); } - @Override public int getCharacterOffset() { return -1; } - @Override public String getPublicId() { return this.locator.getPublicId(); } - @Override public String getSystemId() { return this.locator.getSystemId(); } diff --git a/spring-core/src/main/java/org/springframework/util/xml/StaxEventXMLReader.java b/spring-core/src/main/java/org/springframework/util/xml/StaxEventXMLReader.java index 9607d29f23..0d32a3fc08 100644 --- a/spring-core/src/main/java/org/springframework/util/xml/StaxEventXMLReader.java +++ b/spring-core/src/main/java/org/springframework/util/xml/StaxEventXMLReader.java @@ -170,32 +170,26 @@ class StaxEventXMLReader extends AbstractStaxXMLReader { final Location location = event.getLocation(); getContentHandler().setDocumentLocator(new Locator2() { - @Override public int getColumnNumber() { return location != null ? location.getColumnNumber() : -1; } - @Override public int getLineNumber() { return location != null ? location.getLineNumber() : -1; } - @Override public String getPublicId() { return location != null ? location.getPublicId() : null; } - @Override public String getSystemId() { return location != null ? location.getSystemId() : null; } - @Override public String getXMLVersion() { return xmlVersion; } - @Override public String getEncoding() { return encoding; } diff --git a/spring-core/src/main/java/org/springframework/util/xml/StaxStreamContentHandler.java b/spring-core/src/main/java/org/springframework/util/xml/StaxStreamContentHandler.java index 284f69d0ac..2241e2f2a9 100644 --- a/spring-core/src/main/java/org/springframework/util/xml/StaxStreamContentHandler.java +++ b/spring-core/src/main/java/org/springframework/util/xml/StaxStreamContentHandler.java @@ -49,7 +49,6 @@ class StaxStreamContentHandler extends AbstractStaxContentHandler { this.streamWriter = streamWriter; } - @Override public void setDocumentLocator(Locator locator) { } diff --git a/spring-core/src/main/java/org/springframework/util/xml/StaxStreamXMLReader.java b/spring-core/src/main/java/org/springframework/util/xml/StaxStreamXMLReader.java index 4bba7a6974..bca48d1cdb 100644 --- a/spring-core/src/main/java/org/springframework/util/xml/StaxStreamXMLReader.java +++ b/spring-core/src/main/java/org/springframework/util/xml/StaxStreamXMLReader.java @@ -144,32 +144,26 @@ class StaxStreamXMLReader extends AbstractStaxXMLReader { getContentHandler().setDocumentLocator(new Locator2() { - @Override public int getColumnNumber() { return location != null ? location.getColumnNumber() : -1; } - @Override public int getLineNumber() { return location != null ? location.getLineNumber() : -1; } - @Override public String getPublicId() { return location != null ? location.getPublicId() : null; } - @Override public String getSystemId() { return location != null ? location.getSystemId() : null; } - @Override public String getXMLVersion() { return xmlVersion; } - @Override public String getEncoding() { return encoding; } diff --git a/spring-core/src/main/java/org/springframework/util/xml/XMLEventStreamReader.java b/spring-core/src/main/java/org/springframework/util/xml/XMLEventStreamReader.java index 731d7bc9a2..61267be901 100644 --- a/spring-core/src/main/java/org/springframework/util/xml/XMLEventStreamReader.java +++ b/spring-core/src/main/java/org/springframework/util/xml/XMLEventStreamReader.java @@ -49,7 +49,6 @@ class XMLEventStreamReader extends AbstractXMLStreamReader { event = eventReader.nextEvent(); } - @Override public boolean isStandalone() { if (event.isStartDocument()) { return ((StartDocument) event).isStandalone(); @@ -59,7 +58,6 @@ class XMLEventStreamReader extends AbstractXMLStreamReader { } } - @Override public String getVersion() { if (event.isStartDocument()) { return ((StartDocument) event).getVersion(); @@ -69,12 +67,10 @@ class XMLEventStreamReader extends AbstractXMLStreamReader { } } - @Override public int getTextStart() { return 0; } - @Override public String getText() { if (event.isCharacters()) { return event.asCharacters().getData(); @@ -87,7 +83,6 @@ class XMLEventStreamReader extends AbstractXMLStreamReader { } } - @Override public String getPITarget() { if (event.isProcessingInstruction()) { return ((ProcessingInstruction) event).getTarget(); @@ -97,7 +92,6 @@ class XMLEventStreamReader extends AbstractXMLStreamReader { } } - @Override public String getPIData() { if (event.isProcessingInstruction()) { return ((ProcessingInstruction) event).getData(); @@ -107,7 +101,6 @@ class XMLEventStreamReader extends AbstractXMLStreamReader { } } - @Override public int getNamespaceCount() { Iterator namespaces; if (event.isStartElement()) { @@ -122,7 +115,6 @@ class XMLEventStreamReader extends AbstractXMLStreamReader { return countIterator(namespaces); } - @Override public NamespaceContext getNamespaceContext() { if (event.isStartElement()) { return event.asStartElement().getNamespaceContext(); @@ -132,7 +124,6 @@ class XMLEventStreamReader extends AbstractXMLStreamReader { } } - @Override public QName getName() { if (event.isStartElement()) { return event.asStartElement().getName(); @@ -145,27 +136,22 @@ class XMLEventStreamReader extends AbstractXMLStreamReader { } } - @Override public Location getLocation() { return event.getLocation(); } - @Override public int getEventType() { return event.getEventType(); } - @Override public String getEncoding() { return null; } - @Override public String getCharacterEncodingScheme() { return null; } - @Override public int getAttributeCount() { if (!event.isStartElement()) { throw new IllegalStateException(); @@ -174,53 +160,43 @@ class XMLEventStreamReader extends AbstractXMLStreamReader { return countIterator(attributes); } - @Override public void close() throws XMLStreamException { eventReader.close(); } - @Override public QName getAttributeName(int index) { return getAttribute(index).getName(); } - @Override public String getAttributeType(int index) { return getAttribute(index).getDTDType(); } - @Override public String getAttributeValue(int index) { return getAttribute(index).getValue(); } - @Override public String getNamespacePrefix(int index) { return getNamespace(index).getPrefix(); } - @Override public String getNamespaceURI(int index) { return getNamespace(index).getNamespaceURI(); } - @Override public Object getProperty(String name) throws IllegalArgumentException { return eventReader.getProperty(name); } - @Override public boolean isAttributeSpecified(int index) { return getAttribute(index).isSpecified(); } - @Override public int next() throws XMLStreamException { event = eventReader.nextEvent(); return event.getEventType(); } - @Override public boolean standaloneSet() { if (event.isStartDocument()) { return ((StartDocument) event).standaloneSet(); diff --git a/spring-core/src/main/java/org/springframework/util/xml/XMLEventStreamWriter.java b/spring-core/src/main/java/org/springframework/util/xml/XMLEventStreamWriter.java index 8c9e3ad0fb..37dff4fb81 100644 --- a/spring-core/src/main/java/org/springframework/util/xml/XMLEventStreamWriter.java +++ b/spring-core/src/main/java/org/springframework/util/xml/XMLEventStreamWriter.java @@ -56,80 +56,65 @@ class XMLEventStreamWriter implements XMLStreamWriter { this.eventFactory = eventFactory; } - @Override public NamespaceContext getNamespaceContext() { return eventWriter.getNamespaceContext(); } - @Override public String getPrefix(String uri) throws XMLStreamException { return eventWriter.getPrefix(uri); } - @Override public void setPrefix(String prefix, String uri) throws XMLStreamException { eventWriter.setPrefix(prefix, uri); } - @Override public void setDefaultNamespace(String uri) throws XMLStreamException { eventWriter.setDefaultNamespace(uri); } - @Override public void setNamespaceContext(NamespaceContext context) throws XMLStreamException { eventWriter.setNamespaceContext(context); } - @Override public void writeStartDocument() throws XMLStreamException { eventWriter.add(eventFactory.createStartDocument()); } - @Override public void writeStartDocument(String version) throws XMLStreamException { eventWriter.add(eventFactory.createStartDocument(DEFAULT_ENCODING, version)); } - @Override public void writeStartDocument(String encoding, String version) throws XMLStreamException { eventWriter.add(eventFactory.createStartDocument(encoding, version)); } - @Override public void writeStartElement(String localName) throws XMLStreamException { writeStartElement(eventFactory.createStartElement(new QName(localName), null, null)); } - @Override public void writeStartElement(String namespaceURI, String localName) throws XMLStreamException { writeStartElement(eventFactory.createStartElement(new QName(namespaceURI, localName), null, null)); } - @Override public void writeStartElement(String prefix, String localName, String namespaceURI) throws XMLStreamException { writeStartElement(eventFactory.createStartElement(new QName(namespaceURI, localName, prefix), null, null)); } - @Override public void writeEmptyElement(String localName) throws XMLStreamException { writeStartElement(localName); writeEndElement(); } - @Override public void writeEmptyElement(String namespaceURI, String localName) throws XMLStreamException { writeStartElement(namespaceURI, localName); writeEndElement(); } - @Override public void writeEmptyElement(String prefix, String localName, String namespaceURI) throws XMLStreamException { writeStartElement(prefix, localName, namespaceURI); writeEndElement(); } - @Override public void writeEndElement() throws XMLStreamException { int last = endElements.size() - 1; EndElement lastEndElement = endElements.get(last); @@ -137,88 +122,71 @@ class XMLEventStreamWriter implements XMLStreamWriter { endElements.remove(last); } - @Override public void writeAttribute(String localName, String value) throws XMLStreamException { eventWriter.add(eventFactory.createAttribute(localName, value)); } - @Override public void writeAttribute(String namespaceURI, String localName, String value) throws XMLStreamException { eventWriter.add(eventFactory.createAttribute(new QName(namespaceURI, localName), value)); } - @Override public void writeAttribute(String prefix, String namespaceURI, String localName, String value) throws XMLStreamException { eventWriter.add(eventFactory.createAttribute(prefix, namespaceURI, localName, value)); } - @Override public void writeNamespace(String prefix, String namespaceURI) throws XMLStreamException { writeNamespace(eventFactory.createNamespace(prefix, namespaceURI)); } - @Override public void writeDefaultNamespace(String namespaceURI) throws XMLStreamException { writeNamespace(eventFactory.createNamespace(namespaceURI)); } - @Override public void writeCharacters(String text) throws XMLStreamException { eventWriter.add(eventFactory.createCharacters(text)); } - @Override public void writeCharacters(char[] text, int start, int len) throws XMLStreamException { eventWriter.add(eventFactory.createCharacters(new String(text, start, len))); } - @Override public void writeCData(String data) throws XMLStreamException { eventWriter.add(eventFactory.createCData(data)); } - @Override public void writeComment(String data) throws XMLStreamException { eventWriter.add(eventFactory.createComment(data)); } - @Override public void writeProcessingInstruction(String target) throws XMLStreamException { eventWriter.add(eventFactory.createProcessingInstruction(target, "")); } - @Override public void writeProcessingInstruction(String target, String data) throws XMLStreamException { eventWriter.add(eventFactory.createProcessingInstruction(target, data)); } - @Override public void writeDTD(String dtd) throws XMLStreamException { eventWriter.add(eventFactory.createDTD(dtd)); } - @Override public void writeEntityRef(String name) throws XMLStreamException { eventWriter.add(eventFactory.createEntityReference(name, null)); } - @Override public void writeEndDocument() throws XMLStreamException { eventWriter.add(eventFactory.createEndDocument()); } - @Override public Object getProperty(String name) throws IllegalArgumentException { throw new IllegalArgumentException(); } - @Override public void flush() throws XMLStreamException { eventWriter.flush(); } - @Override public void close() throws XMLStreamException { eventWriter.close(); } diff --git a/spring-expression/src/main/java/org/springframework/expression/ParserContext.java b/spring-expression/src/main/java/org/springframework/expression/ParserContext.java index 1b69a293d7..a1ae657bc3 100644 --- a/spring-expression/src/main/java/org/springframework/expression/ParserContext.java +++ b/spring-expression/src/main/java/org/springframework/expression/ParserContext.java @@ -62,17 +62,14 @@ public interface ParserContext { */ public static final ParserContext TEMPLATE_EXPRESSION = new ParserContext() { - @Override public String getExpressionPrefix() { return "#{"; } - @Override public String getExpressionSuffix() { return "}"; } - @Override public boolean isTemplate() { return true; } diff --git a/spring-expression/src/main/java/org/springframework/expression/common/CompositeStringExpression.java b/spring-expression/src/main/java/org/springframework/expression/common/CompositeStringExpression.java index a24a545479..840ad1b854 100644 --- a/spring-expression/src/main/java/org/springframework/expression/common/CompositeStringExpression.java +++ b/spring-expression/src/main/java/org/springframework/expression/common/CompositeStringExpression.java @@ -50,12 +50,10 @@ public class CompositeStringExpression implements Expression { } - @Override public final String getExpressionString() { return this.expressionString; } - @Override public String getValue() throws EvaluationException { StringBuilder sb = new StringBuilder(); for (Expression expression : this.expressions) { @@ -67,7 +65,6 @@ public class CompositeStringExpression implements Expression { return sb.toString(); } - @Override public String getValue(Object rootObject) throws EvaluationException { StringBuilder sb = new StringBuilder(); for (Expression expression : this.expressions) { @@ -79,7 +76,6 @@ public class CompositeStringExpression implements Expression { return sb.toString(); } - @Override public String getValue(EvaluationContext context) throws EvaluationException { StringBuilder sb = new StringBuilder(); for (Expression expression : this.expressions) { @@ -91,7 +87,6 @@ public class CompositeStringExpression implements Expression { return sb.toString(); } - @Override public String getValue(EvaluationContext context, Object rootObject) throws EvaluationException { StringBuilder sb = new StringBuilder(); for (Expression expression : this.expressions) { @@ -103,44 +98,36 @@ public class CompositeStringExpression implements Expression { return sb.toString(); } - @Override public Class getValueType(EvaluationContext context) { return String.class; } - @Override public Class getValueType() { return String.class; } - @Override public TypeDescriptor getValueTypeDescriptor(EvaluationContext context) { return TypeDescriptor.valueOf(String.class); } - @Override public TypeDescriptor getValueTypeDescriptor() { return TypeDescriptor.valueOf(String.class); } - @Override public void setValue(EvaluationContext context, Object value) throws EvaluationException { throw new EvaluationException(this.expressionString, "Cannot call setValue on a composite expression"); } - @Override public T getValue(EvaluationContext context, Class expectedResultType) throws EvaluationException { Object value = getValue(context); return ExpressionUtils.convert(context, value, expectedResultType); } - @Override public T getValue(Class expectedResultType) throws EvaluationException { Object value = getValue(); return ExpressionUtils.convert(null, value, expectedResultType); } - @Override public boolean isWritable(EvaluationContext context) { return false; } @@ -150,55 +137,45 @@ public class CompositeStringExpression implements Expression { } - @Override public T getValue(Object rootObject, Class desiredResultType) throws EvaluationException { Object value = getValue(rootObject); return ExpressionUtils.convert(null, value, desiredResultType); } - @Override public T getValue(EvaluationContext context, Object rootObject, Class desiredResultType) throws EvaluationException { Object value = getValue(context,rootObject); return ExpressionUtils.convert(context, value, desiredResultType); } - @Override public Class getValueType(Object rootObject) throws EvaluationException { return String.class; } - @Override public Class getValueType(EvaluationContext context, Object rootObject) throws EvaluationException { return String.class; } - @Override public TypeDescriptor getValueTypeDescriptor(Object rootObject) throws EvaluationException { return TypeDescriptor.valueOf(String.class); } - @Override public TypeDescriptor getValueTypeDescriptor(EvaluationContext context, Object rootObject) throws EvaluationException { return TypeDescriptor.valueOf(String.class); } - @Override public boolean isWritable(EvaluationContext context, Object rootObject) throws EvaluationException { return false; } - @Override public void setValue(EvaluationContext context, Object rootObject, Object value) throws EvaluationException { throw new EvaluationException(this.expressionString, "Cannot call setValue on a composite expression"); } - @Override public boolean isWritable(Object rootObject) throws EvaluationException { return false; } - @Override public void setValue(Object rootObject, Object value) throws EvaluationException { throw new EvaluationException(this.expressionString, "Cannot call setValue on a composite expression"); } diff --git a/spring-expression/src/main/java/org/springframework/expression/common/LiteralExpression.java b/spring-expression/src/main/java/org/springframework/expression/common/LiteralExpression.java index ea6742ae07..ae7713c50f 100644 --- a/spring-expression/src/main/java/org/springframework/expression/common/LiteralExpression.java +++ b/spring-expression/src/main/java/org/springframework/expression/common/LiteralExpression.java @@ -41,121 +41,98 @@ public class LiteralExpression implements Expression { } - @Override public final String getExpressionString() { return this.literalValue; } - @Override public String getValue() { return this.literalValue; } - @Override public String getValue(EvaluationContext context) { return this.literalValue; } - @Override public String getValue(Object rootObject) { return this.literalValue; } - @Override public Class getValueType(EvaluationContext context) { return String.class; } - @Override public TypeDescriptor getValueTypeDescriptor(EvaluationContext context) { return TypeDescriptor.valueOf(String.class); } - @Override public TypeDescriptor getValueTypeDescriptor() { return TypeDescriptor.valueOf(String.class); } - @Override public void setValue(EvaluationContext context, Object value) throws EvaluationException { throw new EvaluationException(literalValue, "Cannot call setValue() on a LiteralExpression"); } - @Override public T getValue(EvaluationContext context, Class expectedResultType) throws EvaluationException { Object value = getValue(context); return ExpressionUtils.convert(context, value, expectedResultType); } - @Override public T getValue(Class expectedResultType) throws EvaluationException { Object value = getValue(); return ExpressionUtils.convert(null, value, expectedResultType); } - @Override public boolean isWritable(EvaluationContext context) { return false; } - @Override public Class getValueType() { return String.class; } - @Override public T getValue(Object rootObject, Class desiredResultType) throws EvaluationException { Object value = getValue(rootObject); return ExpressionUtils.convert(null, value, desiredResultType); } - @Override public String getValue(EvaluationContext context, Object rootObject) throws EvaluationException { return this.literalValue; } - @Override public T getValue(EvaluationContext context, Object rootObject, Class desiredResultType) throws EvaluationException { Object value = getValue(context, rootObject); return ExpressionUtils.convert(null, value, desiredResultType); } - @Override public Class getValueType(Object rootObject) throws EvaluationException { return String.class; } - @Override public Class getValueType(EvaluationContext context, Object rootObject) throws EvaluationException { return String.class; } - @Override public TypeDescriptor getValueTypeDescriptor(Object rootObject) throws EvaluationException { return TypeDescriptor.valueOf(String.class); } - @Override public TypeDescriptor getValueTypeDescriptor(EvaluationContext context, Object rootObject) throws EvaluationException { return TypeDescriptor.valueOf(String.class); } - @Override public boolean isWritable(EvaluationContext context, Object rootObject) throws EvaluationException { return false; } - @Override public void setValue(EvaluationContext context, Object rootObject, Object value) throws EvaluationException { throw new EvaluationException(literalValue, "Cannot call setValue() on a LiteralExpression"); } - @Override public boolean isWritable(Object rootObject) throws EvaluationException { return false; } - @Override public void setValue(Object rootObject, Object value) throws EvaluationException { throw new EvaluationException(literalValue, "Cannot call setValue() on a LiteralExpression"); } diff --git a/spring-expression/src/main/java/org/springframework/expression/common/TemplateAwareExpressionParser.java b/spring-expression/src/main/java/org/springframework/expression/common/TemplateAwareExpressionParser.java index 82b6ab07bb..187065fde9 100644 --- a/spring-expression/src/main/java/org/springframework/expression/common/TemplateAwareExpressionParser.java +++ b/spring-expression/src/main/java/org/springframework/expression/common/TemplateAwareExpressionParser.java @@ -40,27 +40,22 @@ public abstract class TemplateAwareExpressionParser implements ExpressionParser * Default ParserContext instance for non-template expressions. */ private static final ParserContext NON_TEMPLATE_PARSER_CONTEXT = new ParserContext() { - @Override public String getExpressionPrefix() { return null; } - @Override public String getExpressionSuffix() { return null; } - @Override public boolean isTemplate() { return false; } }; - @Override public Expression parseExpression(String expressionString) throws ParseException { return parseExpression(expressionString, NON_TEMPLATE_PARSER_CONTEXT); } - @Override public Expression parseExpression(String expressionString, ParserContext context) throws ParseException { if (context == null) { context = NON_TEMPLATE_PARSER_CONTEXT; diff --git a/spring-expression/src/main/java/org/springframework/expression/common/TemplateParserContext.java b/spring-expression/src/main/java/org/springframework/expression/common/TemplateParserContext.java index 768e567b5a..046ed6a901 100644 --- a/spring-expression/src/main/java/org/springframework/expression/common/TemplateParserContext.java +++ b/spring-expression/src/main/java/org/springframework/expression/common/TemplateParserContext.java @@ -50,17 +50,14 @@ public class TemplateParserContext implements ParserContext { } - @Override public final boolean isTemplate() { return true; } - @Override public final String getExpressionPrefix() { return this.expressionPrefix; } - @Override public final String getExpressionSuffix() { return this.expressionSuffix; } diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/InternalParseException.java b/spring-expression/src/main/java/org/springframework/expression/spel/InternalParseException.java index 5a712417eb..8a09bf2b92 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/InternalParseException.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/InternalParseException.java @@ -32,7 +32,6 @@ public class InternalParseException extends RuntimeException { super(cause); } - @Override public SpelParseException getCause() { return (SpelParseException) super.getCause(); } diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/ast/Indexer.java b/spring-expression/src/main/java/org/springframework/expression/spel/ast/Indexer.java index a2b166ab8f..f061326251 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/ast/Indexer.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/ast/Indexer.java @@ -105,19 +105,16 @@ public class Indexer extends SpelNodeImpl { this.typeDescriptor = typeDescriptor; } - @Override public TypedValue getValue() { Object arrayElement = accessArrayElement(this.array, this.idx); return new TypedValue(arrayElement, this.typeDescriptor.elementTypeDescriptor(arrayElement)); } - @Override public void setValue(Object newValue) { setArrayElement(this.typeConverter, this.array, this.idx, newValue, this.typeDescriptor.getElementTypeDescriptor().getType()); } - @Override public boolean isWritable() { return true; } @@ -142,13 +139,11 @@ public class Indexer extends SpelNodeImpl { this.mapEntryTypeDescriptor = mapEntryTypeDescriptor; } - @Override public TypedValue getValue() { Object value = this.map.get(this.key); return new TypedValue(value, this.mapEntryTypeDescriptor.getMapValueTypeDescriptor(value)); } - @Override public void setValue(Object newValue) { if (this.mapEntryTypeDescriptor.getMapValueTypeDescriptor() != null) { newValue = this.typeConverter.convertValue(newValue, TypeDescriptor.forObject(newValue), @@ -157,7 +152,6 @@ public class Indexer extends SpelNodeImpl { this.map.put(this.key, newValue); } - @Override public boolean isWritable() { return true; } @@ -182,7 +176,6 @@ public class Indexer extends SpelNodeImpl { this.td = targetObjectTypeDescriptor; } - @Override public TypedValue getValue() { Class targetObjectRuntimeClass = getObjectClass(targetObject); try { @@ -216,7 +209,6 @@ public class Indexer extends SpelNodeImpl { this.td.toString()); } - @Override public void setValue(Object newValue) { Class contextObjectClass = getObjectClass(targetObject); try { @@ -246,7 +238,6 @@ public class Indexer extends SpelNodeImpl { } } - @Override public boolean isWritable() { return true; } @@ -275,7 +266,6 @@ public class Indexer extends SpelNodeImpl { this.growCollection = growCollection; } - @Override public TypedValue getValue() { if (this.index >= this.collection.size()) { if (this.growCollection) { @@ -300,7 +290,6 @@ public class Indexer extends SpelNodeImpl { throw new IllegalStateException("Failed to find indexed element " + this.index + ": " + this.collection); } - @Override public void setValue(Object newValue) { if (this.index >= this.collection.size()) { if (this.growCollection) { @@ -325,7 +314,6 @@ public class Indexer extends SpelNodeImpl { } } - @Override public boolean isWritable() { return true; } @@ -346,7 +334,6 @@ public class Indexer extends SpelNodeImpl { this.td = td; } - @Override public TypedValue getValue() { if (this.index >= this.target.length()) { throw new SpelEvaluationException(getStartPosition(), SpelMessage.STRING_INDEX_OUT_OF_BOUNDS, @@ -355,13 +342,11 @@ public class Indexer extends SpelNodeImpl { return new TypedValue(String.valueOf(this.target.charAt(this.index))); } - @Override public void setValue(Object newValue) { throw new SpelEvaluationException(getStartPosition(), SpelMessage.INDEXING_NOT_SUPPORTED_FOR_TYPE, this.td.toString()); } - @Override public boolean isWritable() { return true; } diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/ast/MethodReference.java b/spring-expression/src/main/java/org/springframework/expression/spel/ast/MethodReference.java index e1cfa078e2..9c74b9c564 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/ast/MethodReference.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/ast/MethodReference.java @@ -66,7 +66,6 @@ public class MethodReference extends SpelNodeImpl { this.arguments = arguments; } - @Override public TypedValue getValue() { MethodExecutor executorToUse = cachedExecutor; if (executorToUse != null) { @@ -104,12 +103,10 @@ public class MethodReference extends SpelNodeImpl { } } - @Override public void setValue(Object newValue) { throw new IllegalAccessError(); } - @Override public boolean isWritable() { return false; } diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/ast/OpMinus.java b/spring-expression/src/main/java/org/springframework/expression/spel/ast/OpMinus.java index 1afb3b28c4..c8eeb2b0f7 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/ast/OpMinus.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/ast/OpMinus.java @@ -93,7 +93,6 @@ public class OpMinus extends Operator { } return super.toStringAST(); } - @Override public SpelNodeImpl getRightOperand() { if (children.length<2) {return null;} return children[1]; diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/ast/PropertyOrFieldReference.java b/spring-expression/src/main/java/org/springframework/expression/spel/ast/PropertyOrFieldReference.java index 043a57e6fd..99e79ff504 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/ast/PropertyOrFieldReference.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/ast/PropertyOrFieldReference.java @@ -83,17 +83,14 @@ public class PropertyOrFieldReference extends SpelNodeImpl { this.isAutoGrowNullReferences = isAutoGrowNullReferences; } - @Override public TypedValue getValue() { return ref.getValueInternal(contextObject,eContext,isAutoGrowNullReferences); } - @Override public void setValue(Object newValue) { ref.writeProperty(contextObject,eContext, ref.name, newValue); } - @Override public boolean isWritable() { return true; } diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/ast/SpelNodeImpl.java b/spring-expression/src/main/java/org/springframework/expression/spel/ast/SpelNodeImpl.java index 46229f646e..109de5fdc1 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/ast/SpelNodeImpl.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/ast/SpelNodeImpl.java @@ -88,7 +88,6 @@ public abstract class SpelNodeImpl implements SpelNode { return false; } - @Override public final Object getValue(ExpressionState expressionState) throws EvaluationException { if (expressionState != null) { return getValueInternal(expressionState).getValue(); @@ -98,7 +97,6 @@ public abstract class SpelNodeImpl implements SpelNode { } } - @Override public final TypedValue getTypedValue(ExpressionState expressionState) throws EvaluationException { if (expressionState != null) { return getValueInternal(expressionState); @@ -109,27 +107,22 @@ public abstract class SpelNodeImpl implements SpelNode { } // by default Ast nodes are not writable - @Override public boolean isWritable(ExpressionState expressionState) throws EvaluationException { return false; } - @Override public void setValue(ExpressionState expressionState, Object newValue) throws EvaluationException { throw new SpelEvaluationException(getStartPosition(), SpelMessage.SETVALUE_NOT_SUPPORTED, getClass()); } - @Override public SpelNode getChild(int index) { return children[index]; } - @Override public int getChildCount() { return children.length; } - @Override public Class getObjectClass(Object obj) { if (obj == null) { return null; @@ -143,15 +136,12 @@ public abstract class SpelNodeImpl implements SpelNode { public abstract TypedValue getValueInternal(ExpressionState expressionState) throws EvaluationException; - @Override public abstract String toStringAST(); - @Override public int getStartPosition() { return (pos>>16); } - @Override public int getEndPosition() { return (pos&0xffff); } diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/ast/ValueRef.java b/spring-expression/src/main/java/org/springframework/expression/spel/ast/ValueRef.java index c4fa571b85..a373ed3868 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/ast/ValueRef.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/ast/ValueRef.java @@ -40,12 +40,10 @@ public interface ValueRef { static NullValueRef instance = new NullValueRef(); - @Override public TypedValue getValue() { return TypedValue.NULL; } - @Override public void setValue(Object newValue) { // The exception position '0' isn't right but the overhead of creating // instances of this per node (where the node is solely for error reporting) @@ -53,7 +51,6 @@ public interface ValueRef { throw new SpelEvaluationException(0,SpelMessage.NOT_ASSIGNABLE,"null"); } - @Override public boolean isWritable() { return false; } @@ -73,18 +70,15 @@ public interface ValueRef { this.node = node; } - @Override public TypedValue getValue() { return typedValue; } - @Override public void setValue(Object newValue) { throw new SpelEvaluationException( node.pos, SpelMessage.NOT_ASSIGNABLE, node.toStringAST()); } - @Override public boolean isWritable() { return false; } diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/ast/VariableReference.java b/spring-expression/src/main/java/org/springframework/expression/spel/ast/VariableReference.java index 3c33992070..785d317cac 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/ast/VariableReference.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/ast/VariableReference.java @@ -55,17 +55,14 @@ public class VariableReference extends SpelNodeImpl { this.eContext = evaluationContext; } - @Override public TypedValue getValue() { return value; } - @Override public void setValue(Object newValue) { eContext.setVariable(name, newValue); } - @Override public boolean isWritable() { return true; } diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/standard/SpelExpression.java b/spring-expression/src/main/java/org/springframework/expression/spel/standard/SpelExpression.java index dfefb5516d..ac52f98a55 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/standard/SpelExpression.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/standard/SpelExpression.java @@ -62,67 +62,56 @@ public class SpelExpression implements Expression { // implementing Expression - @Override public Object getValue() throws EvaluationException { ExpressionState expressionState = new ExpressionState(getEvaluationContext(), configuration); return ast.getValue(expressionState); } - @Override public Object getValue(Object rootObject) throws EvaluationException { ExpressionState expressionState = new ExpressionState(getEvaluationContext(), toTypedValue(rootObject), configuration); return ast.getValue(expressionState); } - @Override public T getValue(Class expectedResultType) throws EvaluationException { ExpressionState expressionState = new ExpressionState(getEvaluationContext(), configuration); TypedValue typedResultValue = ast.getTypedValue(expressionState); return ExpressionUtils.convertTypedValue(expressionState.getEvaluationContext(), typedResultValue, expectedResultType); } - @Override public T getValue(Object rootObject, Class expectedResultType) throws EvaluationException { ExpressionState expressionState = new ExpressionState(getEvaluationContext(), toTypedValue(rootObject), configuration); TypedValue typedResultValue = ast.getTypedValue(expressionState); return ExpressionUtils.convertTypedValue(expressionState.getEvaluationContext(), typedResultValue, expectedResultType); } - @Override public Object getValue(EvaluationContext context) throws EvaluationException { Assert.notNull(context, "The EvaluationContext is required"); return ast.getValue(new ExpressionState(context, configuration)); } - @Override public Object getValue(EvaluationContext context, Object rootObject) throws EvaluationException { Assert.notNull(context, "The EvaluationContext is required"); return ast.getValue(new ExpressionState(context, toTypedValue(rootObject), configuration)); } - @Override public T getValue(EvaluationContext context, Class expectedResultType) throws EvaluationException { TypedValue typedResultValue = ast.getTypedValue(new ExpressionState(context, configuration)); return ExpressionUtils.convertTypedValue(context, typedResultValue, expectedResultType); } - @Override public T getValue(EvaluationContext context, Object rootObject, Class expectedResultType) throws EvaluationException { TypedValue typedResultValue = ast.getTypedValue(new ExpressionState(context, toTypedValue(rootObject), configuration)); return ExpressionUtils.convertTypedValue(context, typedResultValue, expectedResultType); } - @Override public Class getValueType() throws EvaluationException { return getValueType(getEvaluationContext()); } - @Override public Class getValueType(Object rootObject) throws EvaluationException { return getValueType(getEvaluationContext(), rootObject); } - @Override public Class getValueType(EvaluationContext context) throws EvaluationException { Assert.notNull(context, "The EvaluationContext is required"); ExpressionState eState = new ExpressionState(context, configuration); @@ -130,72 +119,60 @@ public class SpelExpression implements Expression { return typeDescriptor != null ? typeDescriptor.getType() : null; } - @Override public Class getValueType(EvaluationContext context, Object rootObject) throws EvaluationException { ExpressionState eState = new ExpressionState(context, toTypedValue(rootObject), configuration); TypeDescriptor typeDescriptor = ast.getValueInternal(eState).getTypeDescriptor(); return typeDescriptor != null ? typeDescriptor.getType() : null; } - @Override public TypeDescriptor getValueTypeDescriptor() throws EvaluationException { return getValueTypeDescriptor(getEvaluationContext()); } - @Override public TypeDescriptor getValueTypeDescriptor(Object rootObject) throws EvaluationException { ExpressionState eState = new ExpressionState(getEvaluationContext(), toTypedValue(rootObject), configuration); return ast.getValueInternal(eState).getTypeDescriptor(); } - @Override public TypeDescriptor getValueTypeDescriptor(EvaluationContext context) throws EvaluationException { Assert.notNull(context, "The EvaluationContext is required"); ExpressionState eState = new ExpressionState(context, configuration); return ast.getValueInternal(eState).getTypeDescriptor(); } - @Override public TypeDescriptor getValueTypeDescriptor(EvaluationContext context, Object rootObject) throws EvaluationException { Assert.notNull(context, "The EvaluationContext is required"); ExpressionState eState = new ExpressionState(context, toTypedValue(rootObject), configuration); return ast.getValueInternal(eState).getTypeDescriptor(); } - @Override public String getExpressionString() { return expression; } - @Override public boolean isWritable(EvaluationContext context) throws EvaluationException { Assert.notNull(context, "The EvaluationContext is required"); return ast.isWritable(new ExpressionState(context, configuration)); } - @Override public boolean isWritable(Object rootObject) throws EvaluationException { return ast.isWritable(new ExpressionState(getEvaluationContext(), toTypedValue(rootObject), configuration)); } - @Override public boolean isWritable(EvaluationContext context, Object rootObject) throws EvaluationException { Assert.notNull(context, "The EvaluationContext is required"); return ast.isWritable(new ExpressionState(context, toTypedValue(rootObject), configuration)); } - @Override public void setValue(EvaluationContext context, Object value) throws EvaluationException { Assert.notNull(context, "The EvaluationContext is required"); ast.setValue(new ExpressionState(context, configuration), value); } - @Override public void setValue(Object rootObject, Object value) throws EvaluationException { ast.setValue(new ExpressionState(getEvaluationContext(), toTypedValue(rootObject), configuration), value); } - @Override public void setValue(EvaluationContext context, Object rootObject, Object value) throws EvaluationException { Assert.notNull(context, "The EvaluationContext is required"); ast.setValue(new ExpressionState(context, toTypedValue(rootObject), configuration), value); diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectiveConstructorExecutor.java b/spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectiveConstructorExecutor.java index e2601c893b..1f17187c6e 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectiveConstructorExecutor.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectiveConstructorExecutor.java @@ -54,7 +54,6 @@ class ReflectiveConstructorExecutor implements ConstructorExecutor { this.argsRequiringConversion = argsRequiringConversion; } - @Override public TypedValue execute(EvaluationContext context, Object... arguments) throws AccessException { try { if (arguments != null) { diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectiveConstructorResolver.java b/spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectiveConstructorResolver.java index 36d48cbf87..4342941af8 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectiveConstructorResolver.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectiveConstructorResolver.java @@ -49,7 +49,6 @@ public class ReflectiveConstructorResolver implements ConstructorResolver { * registered type converter. * */ - @Override public ConstructorExecutor resolve(EvaluationContext context, String typename, List argumentTypes) throws AccessException { @@ -59,7 +58,6 @@ public class ReflectiveConstructorResolver implements ConstructorResolver { Constructor[] ctors = type.getConstructors(); Arrays.sort(ctors, new Comparator() { - @Override public int compare(Constructor c1, Constructor c2) { int c1pl = c1.getParameterTypes().length; int c2pl = c2.getParameterTypes().length; diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectiveMethodExecutor.java b/spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectiveMethodExecutor.java index 1b4da4b284..fc48314f27 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectiveMethodExecutor.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectiveMethodExecutor.java @@ -55,7 +55,6 @@ class ReflectiveMethodExecutor implements MethodExecutor { } - @Override public TypedValue execute(EvaluationContext context, Object target, Object... arguments) throws AccessException { try { if (arguments != null) { diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectiveMethodResolver.java b/spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectiveMethodResolver.java index 2d0ac51a2b..c086771cbe 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectiveMethodResolver.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectiveMethodResolver.java @@ -86,7 +86,6 @@ public class ReflectiveMethodResolver implements MethodResolver { * according to the registered type converter. * */ - @Override public MethodExecutor resolve(EvaluationContext context, Object targetObject, String name, List argumentTypes) throws AccessException { @@ -112,7 +111,6 @@ public class ReflectiveMethodResolver implements MethodResolver { } Arrays.sort(methods, new Comparator() { - @Override public int compare(Method m1, Method m2) { int m1pl = m1.getParameterTypes().length; int m2pl = m2.getParameterTypes().length; diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectivePropertyAccessor.java b/spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectivePropertyAccessor.java index 013959bf95..6e112b0e01 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectivePropertyAccessor.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectivePropertyAccessor.java @@ -56,12 +56,10 @@ public class ReflectivePropertyAccessor implements PropertyAccessor { /** * @return null which means this is a general purpose accessor */ - @Override public Class[] getSpecificTargetClasses() { return null; } - @Override public boolean canRead(EvaluationContext context, Object target, String name) throws AccessException { if (target == null) { return false; @@ -96,7 +94,6 @@ public class ReflectivePropertyAccessor implements PropertyAccessor { return false; } - @Override public TypedValue read(EvaluationContext context, Object target, String name) throws AccessException { if (target == null) { throw new AccessException("Cannot read property of null target"); @@ -163,7 +160,6 @@ public class ReflectivePropertyAccessor implements PropertyAccessor { throw new AccessException("Neither getter nor field found for property '" + name + "'"); } - @Override public boolean canWrite(EvaluationContext context, Object target, String name) throws AccessException { if (target == null) { return false; @@ -193,7 +189,6 @@ public class ReflectivePropertyAccessor implements PropertyAccessor { return false; } - @Override public void write(EvaluationContext context, Object target, String name, Object newValue) throws AccessException { if (target == null) { throw new AccessException("Cannot write property on null target"); @@ -502,12 +497,10 @@ public class ReflectivePropertyAccessor implements PropertyAccessor { } } - @Override public Class[] getSpecificTargetClasses() { throw new UnsupportedOperationException("Should not be called on an OptimalPropertyAccessor"); } - @Override public boolean canRead(EvaluationContext context, Object target, String name) throws AccessException { if (target == null) { return false; @@ -531,7 +524,6 @@ public class ReflectivePropertyAccessor implements PropertyAccessor { } } - @Override public TypedValue read(EvaluationContext context, Object target, String name) throws AccessException { if (this.member instanceof Method) { try { @@ -560,12 +552,10 @@ public class ReflectivePropertyAccessor implements PropertyAccessor { throw new AccessException("Neither getter nor field found for property '" + name + "'"); } - @Override public boolean canWrite(EvaluationContext context, Object target, String name) { throw new UnsupportedOperationException("Should not be called on an OptimalPropertyAccessor"); } - @Override public void write(EvaluationContext context, Object target, String name, Object newValue) { throw new UnsupportedOperationException("Should not be called on an OptimalPropertyAccessor"); } diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/support/StandardEvaluationContext.java b/spring-expression/src/main/java/org/springframework/expression/spel/support/StandardEvaluationContext.java index ce03b4927c..c4a4425bed 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/support/StandardEvaluationContext.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/support/StandardEvaluationContext.java @@ -89,7 +89,6 @@ public class StandardEvaluationContext implements EvaluationContext { this.rootObject = (rootObject != null ? new TypedValue(rootObject) : TypedValue.NULL); } - @Override public TypedValue getRootObject() { return this.rootObject; } @@ -104,7 +103,6 @@ public class StandardEvaluationContext implements EvaluationContext { return this.constructorResolvers.remove(resolver); } - @Override public List getConstructorResolvers() { ensureConstructorResolversInitialized(); return this.constructorResolvers; @@ -125,7 +123,6 @@ public class StandardEvaluationContext implements EvaluationContext { return this.methodResolvers.remove(methodResolver); } - @Override public List getMethodResolvers() { ensureMethodResolversInitialized(); return this.methodResolvers; @@ -135,7 +132,6 @@ public class StandardEvaluationContext implements EvaluationContext { this.beanResolver = beanResolver; } - @Override public BeanResolver getBeanResolver() { return this.beanResolver; } @@ -154,7 +150,6 @@ public class StandardEvaluationContext implements EvaluationContext { return this.propertyAccessors.remove(accessor); } - @Override public List getPropertyAccessors() { ensurePropertyAccessorsInitialized(); return this.propertyAccessors; @@ -170,7 +165,6 @@ public class StandardEvaluationContext implements EvaluationContext { this.typeLocator = typeLocator; } - @Override public TypeLocator getTypeLocator() { if (this.typeLocator == null) { this.typeLocator = new StandardTypeLocator(); @@ -183,7 +177,6 @@ public class StandardEvaluationContext implements EvaluationContext { this.typeConverter = typeConverter; } - @Override public TypeConverter getTypeConverter() { if (this.typeConverter == null) { this.typeConverter = new StandardTypeConverter(); @@ -196,7 +189,6 @@ public class StandardEvaluationContext implements EvaluationContext { this.typeComparator = typeComparator; } - @Override public TypeComparator getTypeComparator() { return this.typeComparator; } @@ -206,12 +198,10 @@ public class StandardEvaluationContext implements EvaluationContext { this.operatorOverloader = operatorOverloader; } - @Override public OperatorOverloader getOperatorOverloader() { return this.operatorOverloader; } - @Override public void setVariable(String name, Object value) { this.variables.put(name, value); } @@ -224,7 +214,6 @@ public class StandardEvaluationContext implements EvaluationContext { this.variables.put(name, method); } - @Override public Object lookupVariable(String name) { return this.variables.get(name); } diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/support/StandardOperatorOverloader.java b/spring-expression/src/main/java/org/springframework/expression/spel/support/StandardOperatorOverloader.java index c120bf66ed..be2a36e673 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/support/StandardOperatorOverloader.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/support/StandardOperatorOverloader.java @@ -26,13 +26,11 @@ import org.springframework.expression.OperatorOverloader; */ public class StandardOperatorOverloader implements OperatorOverloader { - @Override public boolean overridesOperation(Operation operation, Object leftOperand, Object rightOperand) throws EvaluationException { return false; } - @Override public Object operate(Operation operation, Object leftOperand, Object rightOperand) throws EvaluationException { throw new EvaluationException("No operation overloaded by default"); } diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/support/StandardTypeComparator.java b/spring-expression/src/main/java/org/springframework/expression/spel/support/StandardTypeComparator.java index 92aafb28bc..18f29d148b 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/support/StandardTypeComparator.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/support/StandardTypeComparator.java @@ -29,7 +29,6 @@ import org.springframework.expression.spel.SpelMessage; */ public class StandardTypeComparator implements TypeComparator { - @Override @SuppressWarnings("unchecked") public int compare(Object left, Object right) throws SpelEvaluationException { // If one is null, check if the other is @@ -73,7 +72,6 @@ public class StandardTypeComparator implements TypeComparator { throw new SpelEvaluationException(SpelMessage.NOT_COMPARABLE, left.getClass(), right.getClass()); } - @Override public boolean canCompare(Object left, Object right) { if (left == null || right == null) { return true; diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/support/StandardTypeConverter.java b/spring-expression/src/main/java/org/springframework/expression/spel/support/StandardTypeConverter.java index 0500dde5d5..483dade31e 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/support/StandardTypeConverter.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/support/StandardTypeConverter.java @@ -57,12 +57,10 @@ public class StandardTypeConverter implements TypeConverter { } - @Override public boolean canConvert(TypeDescriptor sourceType, TypeDescriptor targetType) { return this.conversionService.canConvert(sourceType, targetType); } - @Override public Object convertValue(Object value, TypeDescriptor sourceType, TypeDescriptor targetType) { try { return this.conversionService.convert(value, sourceType, targetType); diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/support/StandardTypeLocator.java b/spring-expression/src/main/java/org/springframework/expression/spel/support/StandardTypeLocator.java index 319985fe8a..2a210e3fda 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/support/StandardTypeLocator.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/support/StandardTypeLocator.java @@ -59,7 +59,6 @@ public class StandardTypeLocator implements TypeLocator { * @return the class object for the type * @throws EvaluationException if the type cannot be found */ - @Override public Class findType(String typename) throws EvaluationException { String nameToLookup = typename; try { diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/config/JdbcNamespaceHandler.java b/spring-jdbc/src/main/java/org/springframework/jdbc/config/JdbcNamespaceHandler.java index e5567d1cfd..70510f971d 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/config/JdbcNamespaceHandler.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/config/JdbcNamespaceHandler.java @@ -26,7 +26,6 @@ import org.springframework.beans.factory.xml.NamespaceHandlerSupport; */ public class JdbcNamespaceHandler extends NamespaceHandlerSupport { - @Override public void init() { registerBeanDefinitionParser("embedded-database", new EmbeddedDatabaseBeanDefinitionParser()); registerBeanDefinitionParser("initialize-database", new InitializeDatabaseBeanDefinitionParser()); diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/config/SortedResourcesFactoryBean.java b/spring-jdbc/src/main/java/org/springframework/jdbc/config/SortedResourcesFactoryBean.java index 6f20b20a9e..6569ba893f 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/config/SortedResourcesFactoryBean.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/config/SortedResourcesFactoryBean.java @@ -59,7 +59,6 @@ public class SortedResourcesFactoryBean extends AbstractFactoryBean } - @Override public void setResourceLoader(ResourceLoader resourceLoader) { this.resourcePatternResolver = ResourcePatternUtils.getResourcePatternResolver(resourceLoader); } @@ -77,7 +76,6 @@ public class SortedResourcesFactoryBean extends AbstractFactoryBean List resources = new ArrayList( Arrays.asList(this.resourcePatternResolver.getResources(location))); Collections.sort(resources, new Comparator() { - @Override public int compare(Resource r1, Resource r2) { try { return r1.getURL().toString().compareTo(r2.getURL().toString()); diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/ArgPreparedStatementSetter.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/ArgPreparedStatementSetter.java index f049232a79..6d22dcec29 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/ArgPreparedStatementSetter.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/ArgPreparedStatementSetter.java @@ -39,7 +39,6 @@ class ArgPreparedStatementSetter implements PreparedStatementSetter, ParameterDi } - @Override public void setValues(PreparedStatement ps) throws SQLException { if (this.args != null) { for (int i = 0; i < this.args.length; i++) { @@ -67,7 +66,6 @@ class ArgPreparedStatementSetter implements PreparedStatementSetter, ParameterDi } } - @Override public void cleanupParameters() { StatementCreatorUtils.cleanupParameters(this.args); } diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/ArgTypePreparedStatementSetter.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/ArgTypePreparedStatementSetter.java index ee0e03de9a..576f6f8069 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/ArgTypePreparedStatementSetter.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/ArgTypePreparedStatementSetter.java @@ -52,7 +52,6 @@ class ArgTypePreparedStatementSetter implements PreparedStatementSetter, Paramet } - @Override public void setValues(PreparedStatement ps) throws SQLException { int parameterPosition = 1; if (this.args != null) { @@ -98,7 +97,6 @@ class ArgTypePreparedStatementSetter implements PreparedStatementSetter, Paramet StatementCreatorUtils.setParameterValue(ps, parameterPosition, argType, argValue); } - @Override public void cleanupParameters() { StatementCreatorUtils.cleanupParameters(this.args); } diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/BatchUpdateUtils.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/BatchUpdateUtils.java index c888b47ef3..b67f4ffdd1 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/BatchUpdateUtils.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/BatchUpdateUtils.java @@ -33,13 +33,11 @@ public abstract class BatchUpdateUtils { sql, new BatchPreparedStatementSetter() { - @Override public void setValues(PreparedStatement ps, int i) throws SQLException { Object[] values = batchValues.get(i); setStatementParameters(values, ps, columnTypes); } - @Override public int getBatchSize() { return batchValues.size(); } diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/BeanPropertyRowMapper.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/BeanPropertyRowMapper.java index 74dbd6ce7f..dde8067753 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/BeanPropertyRowMapper.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/BeanPropertyRowMapper.java @@ -228,7 +228,6 @@ public class BeanPropertyRowMapper implements RowMapper { *

Utilizes public setters and result set metadata. * @see java.sql.ResultSetMetaData */ - @Override public T mapRow(ResultSet rs, int rowNumber) throws SQLException { Assert.state(this.mappedClass != null, "Mapped class was not specified"); T mappedObject = BeanUtils.instantiate(this.mappedClass); diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/CallableStatementCreatorFactory.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/CallableStatementCreatorFactory.java index c4cdb8ab26..279ab5a587 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/CallableStatementCreatorFactory.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/CallableStatementCreatorFactory.java @@ -150,7 +150,6 @@ public class CallableStatementCreatorFactory { this.inParameters = inParams; } - @Override public CallableStatement createCallableStatement(Connection con) throws SQLException { // If we were given a ParameterMapper, we must let the mapper do its thing to create the Map. if (this.inParameterMapper != null) { @@ -219,12 +218,10 @@ public class CallableStatementCreatorFactory { return cs; } - @Override public String getSql() { return callString; } - @Override public void cleanupParameters() { if (this.inParameters != null) { StatementCreatorUtils.cleanupParameters(this.inParameters.values()); diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/ColumnMapRowMapper.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/ColumnMapRowMapper.java index 1a0ac8277f..103333fe98 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/ColumnMapRowMapper.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/ColumnMapRowMapper.java @@ -47,7 +47,6 @@ import org.springframework.util.LinkedCaseInsensitiveMap; */ public class ColumnMapRowMapper implements RowMapper> { - @Override public Map mapRow(ResultSet rs, int rowNum) throws SQLException { ResultSetMetaData rsmd = rs.getMetaData(); int columnCount = rsmd.getColumnCount(); diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/JdbcTemplate.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/JdbcTemplate.java index 713b723728..3f0085cebf 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/JdbcTemplate.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/JdbcTemplate.java @@ -325,7 +325,6 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations { // Methods dealing with a plain java.sql.Connection //------------------------------------------------------------------------- - @Override public T execute(ConnectionCallback action) throws DataAccessException { Assert.notNull(action, "Callback object must not be null"); @@ -377,7 +376,6 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations { // Methods dealing with static SQL (java.sql.Statement) //------------------------------------------------------------------------- - @Override public T execute(StatementCallback action) throws DataAccessException { Assert.notNull(action, "Callback object must not be null"); @@ -414,18 +412,15 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations { } } - @Override public void execute(final String sql) throws DataAccessException { if (logger.isDebugEnabled()) { logger.debug("Executing SQL statement [" + sql + "]"); } class ExecuteStatementCallback implements StatementCallback, SqlProvider { - @Override public Object doInStatement(Statement stmt) throws SQLException { stmt.execute(sql); return null; } - @Override public String getSql() { return sql; } @@ -433,7 +428,6 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations { execute(new ExecuteStatementCallback()); } - @Override public T query(final String sql, final ResultSetExtractor rse) throws DataAccessException { Assert.notNull(sql, "SQL must not be null"); Assert.notNull(rse, "ResultSetExtractor must not be null"); @@ -441,7 +435,6 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations { logger.debug("Executing SQL query [" + sql + "]"); } class QueryStatementCallback implements StatementCallback, SqlProvider { - @Override public T doInStatement(Statement stmt) throws SQLException { ResultSet rs = null; try { @@ -456,7 +449,6 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations { JdbcUtils.closeResultSet(rs); } } - @Override public String getSql() { return sql; } @@ -464,67 +456,55 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations { return execute(new QueryStatementCallback()); } - @Override public void query(String sql, RowCallbackHandler rch) throws DataAccessException { query(sql, new RowCallbackHandlerResultSetExtractor(rch)); } - @Override public List query(String sql, RowMapper rowMapper) throws DataAccessException { return query(sql, new RowMapperResultSetExtractor(rowMapper)); } - @Override public Map queryForMap(String sql) throws DataAccessException { return queryForObject(sql, getColumnMapRowMapper()); } - @Override public T queryForObject(String sql, RowMapper rowMapper) throws DataAccessException { List results = query(sql, rowMapper); return DataAccessUtils.requiredSingleResult(results); } - @Override public T queryForObject(String sql, Class requiredType) throws DataAccessException { return queryForObject(sql, getSingleColumnRowMapper(requiredType)); } - @Override public long queryForLong(String sql) throws DataAccessException { Number number = queryForObject(sql, Long.class); return (number != null ? number.longValue() : 0); } - @Override public int queryForInt(String sql) throws DataAccessException { Number number = queryForObject(sql, Integer.class); return (number != null ? number.intValue() : 0); } - @Override public List queryForList(String sql, Class elementType) throws DataAccessException { return query(sql, getSingleColumnRowMapper(elementType)); } - @Override public List> queryForList(String sql) throws DataAccessException { return query(sql, getColumnMapRowMapper()); } - @Override public SqlRowSet queryForRowSet(String sql) throws DataAccessException { return query(sql, new SqlRowSetResultSetExtractor()); } - @Override public int update(final String sql) throws DataAccessException { Assert.notNull(sql, "SQL must not be null"); if (logger.isDebugEnabled()) { logger.debug("Executing SQL update [" + sql + "]"); } class UpdateStatementCallback implements StatementCallback, SqlProvider { - @Override public Integer doInStatement(Statement stmt) throws SQLException { int rows = stmt.executeUpdate(sql); if (logger.isDebugEnabled()) { @@ -532,7 +512,6 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations { } return rows; } - @Override public String getSql() { return sql; } @@ -540,7 +519,6 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations { return execute(new UpdateStatementCallback()); } - @Override public int[] batchUpdate(final String[] sql) throws DataAccessException { Assert.notEmpty(sql, "SQL array must not be empty"); if (logger.isDebugEnabled()) { @@ -548,7 +526,6 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations { } class BatchUpdateStatementCallback implements StatementCallback, SqlProvider { private String currSql; - @Override public int[] doInStatement(Statement stmt) throws SQLException, DataAccessException { int[] rowsAffected = new int[sql.length]; if (JdbcUtils.supportsBatchUpdates(stmt.getConnection())) { @@ -571,7 +548,6 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations { } return rowsAffected; } - @Override public String getSql() { return this.currSql; } @@ -584,7 +560,6 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations { // Methods dealing with prepared statements //------------------------------------------------------------------------- - @Override public T execute(PreparedStatementCreator psc, PreparedStatementCallback action) throws DataAccessException { @@ -636,7 +611,6 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations { } } - @Override public T execute(String sql, PreparedStatementCallback action) throws DataAccessException { return execute(new SimplePreparedStatementCreator(sql), action); } @@ -661,7 +635,6 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations { logger.debug("Executing prepared SQL query"); return execute(psc, new PreparedStatementCallback() { - @Override public T doInPreparedStatement(PreparedStatement ps) throws SQLException { ResultSet rs = null; try { @@ -685,82 +658,66 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations { }); } - @Override public T query(PreparedStatementCreator psc, ResultSetExtractor rse) throws DataAccessException { return query(psc, null, rse); } - @Override public T query(String sql, PreparedStatementSetter pss, ResultSetExtractor rse) throws DataAccessException { return query(new SimplePreparedStatementCreator(sql), pss, rse); } - @Override public T query(String sql, Object[] args, int[] argTypes, ResultSetExtractor rse) throws DataAccessException { return query(sql, newArgTypePreparedStatementSetter(args, argTypes), rse); } - @Override public T query(String sql, Object[] args, ResultSetExtractor rse) throws DataAccessException { return query(sql, newArgPreparedStatementSetter(args), rse); } - @Override public T query(String sql, ResultSetExtractor rse, Object... args) throws DataAccessException { return query(sql, newArgPreparedStatementSetter(args), rse); } - @Override public void query(PreparedStatementCreator psc, RowCallbackHandler rch) throws DataAccessException { query(psc, new RowCallbackHandlerResultSetExtractor(rch)); } - @Override public void query(String sql, PreparedStatementSetter pss, RowCallbackHandler rch) throws DataAccessException { query(sql, pss, new RowCallbackHandlerResultSetExtractor(rch)); } - @Override public void query(String sql, Object[] args, int[] argTypes, RowCallbackHandler rch) throws DataAccessException { query(sql, newArgTypePreparedStatementSetter(args, argTypes), rch); } - @Override public void query(String sql, Object[] args, RowCallbackHandler rch) throws DataAccessException { query(sql, newArgPreparedStatementSetter(args), rch); } - @Override public void query(String sql, RowCallbackHandler rch, Object... args) throws DataAccessException { query(sql, newArgPreparedStatementSetter(args), rch); } - @Override public List query(PreparedStatementCreator psc, RowMapper rowMapper) throws DataAccessException { return query(psc, new RowMapperResultSetExtractor(rowMapper)); } - @Override public List query(String sql, PreparedStatementSetter pss, RowMapper rowMapper) throws DataAccessException { return query(sql, pss, new RowMapperResultSetExtractor(rowMapper)); } - @Override public List query(String sql, Object[] args, int[] argTypes, RowMapper rowMapper) throws DataAccessException { return query(sql, args, argTypes, new RowMapperResultSetExtractor(rowMapper)); } - @Override public List query(String sql, Object[] args, RowMapper rowMapper) throws DataAccessException { return query(sql, args, new RowMapperResultSetExtractor(rowMapper)); } - @Override public List query(String sql, RowMapper rowMapper, Object... args) throws DataAccessException { return query(sql, args, new RowMapperResultSetExtractor(rowMapper)); } - @Override public T queryForObject(String sql, Object[] args, int[] argTypes, RowMapper rowMapper) throws DataAccessException { @@ -768,100 +725,82 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations { return DataAccessUtils.requiredSingleResult(results); } - @Override public T queryForObject(String sql, Object[] args, RowMapper rowMapper) throws DataAccessException { List results = query(sql, args, new RowMapperResultSetExtractor(rowMapper, 1)); return DataAccessUtils.requiredSingleResult(results); } - @Override public T queryForObject(String sql, RowMapper rowMapper, Object... args) throws DataAccessException { List results = query(sql, args, new RowMapperResultSetExtractor(rowMapper, 1)); return DataAccessUtils.requiredSingleResult(results); } - @Override public T queryForObject(String sql, Object[] args, int[] argTypes, Class requiredType) throws DataAccessException { return queryForObject(sql, args, argTypes, getSingleColumnRowMapper(requiredType)); } - @Override public T queryForObject(String sql, Object[] args, Class requiredType) throws DataAccessException { return queryForObject(sql, args, getSingleColumnRowMapper(requiredType)); } - @Override public T queryForObject(String sql, Class requiredType, Object... args) throws DataAccessException { return queryForObject(sql, args, getSingleColumnRowMapper(requiredType)); } - @Override public Map queryForMap(String sql, Object[] args, int[] argTypes) throws DataAccessException { return queryForObject(sql, args, argTypes, getColumnMapRowMapper()); } - @Override public Map queryForMap(String sql, Object... args) throws DataAccessException { return queryForObject(sql, args, getColumnMapRowMapper()); } - @Override public long queryForLong(String sql, Object[] args, int[] argTypes) throws DataAccessException { Number number = queryForObject(sql, args, argTypes, Long.class); return (number != null ? number.longValue() : 0); } - @Override public long queryForLong(String sql, Object... args) throws DataAccessException { Number number = queryForObject(sql, args, Long.class); return (number != null ? number.longValue() : 0); } - @Override public int queryForInt(String sql, Object[] args, int[] argTypes) throws DataAccessException { Number number = queryForObject(sql, args, argTypes, Integer.class); return (number != null ? number.intValue() : 0); } - @Override public int queryForInt(String sql, Object... args) throws DataAccessException { Number number = queryForObject(sql, args, Integer.class); return (number != null ? number.intValue() : 0); } - @Override public List queryForList(String sql, Object[] args, int[] argTypes, Class elementType) throws DataAccessException { return query(sql, args, argTypes, getSingleColumnRowMapper(elementType)); } - @Override public List queryForList(String sql, Object[] args, Class elementType) throws DataAccessException { return query(sql, args, getSingleColumnRowMapper(elementType)); } - @Override public List queryForList(String sql, Class elementType, Object... args) throws DataAccessException { return query(sql, args, getSingleColumnRowMapper(elementType)); } - @Override public List> queryForList(String sql, Object[] args, int[] argTypes) throws DataAccessException { return query(sql, args, argTypes, getColumnMapRowMapper()); } - @Override public List> queryForList(String sql, Object... args) throws DataAccessException { return query(sql, args, getColumnMapRowMapper()); } - @Override public SqlRowSet queryForRowSet(String sql, Object[] args, int[] argTypes) throws DataAccessException { return query(sql, args, argTypes, new SqlRowSetResultSetExtractor()); } - @Override public SqlRowSet queryForRowSet(String sql, Object... args) throws DataAccessException { return query(sql, args, new SqlRowSetResultSetExtractor()); } @@ -871,7 +810,6 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations { logger.debug("Executing prepared SQL update"); return execute(psc, new PreparedStatementCallback() { - @Override public Integer doInPreparedStatement(PreparedStatement ps) throws SQLException { try { if (pss != null) { @@ -892,12 +830,10 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations { }); } - @Override public int update(PreparedStatementCreator psc) throws DataAccessException { return update(psc, (PreparedStatementSetter) null); } - @Override public int update(final PreparedStatementCreator psc, final KeyHolder generatedKeyHolder) throws DataAccessException { @@ -905,7 +841,6 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations { logger.debug("Executing SQL update and returning generated keys"); return execute(psc, new PreparedStatementCallback() { - @Override public Integer doInPreparedStatement(PreparedStatement ps) throws SQLException { int rows = ps.executeUpdate(); List> generatedKeys = generatedKeyHolder.getKeyList(); @@ -929,29 +864,24 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations { }); } - @Override public int update(String sql, PreparedStatementSetter pss) throws DataAccessException { return update(new SimplePreparedStatementCreator(sql), pss); } - @Override public int update(String sql, Object[] args, int[] argTypes) throws DataAccessException { return update(sql, newArgTypePreparedStatementSetter(args, argTypes)); } - @Override public int update(String sql, Object... args) throws DataAccessException { return update(sql, newArgPreparedStatementSetter(args)); } - @Override public int[] batchUpdate(String sql, final BatchPreparedStatementSetter pss) throws DataAccessException { if (logger.isDebugEnabled()) { logger.debug("Executing SQL batch update [" + sql + "]"); } return execute(sql, new PreparedStatementCallback() { - @Override public int[] doInPreparedStatement(PreparedStatement ps) throws SQLException { try { int batchSize = pss.getBatchSize(); @@ -993,12 +923,10 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations { }); } - @Override public int[] batchUpdate(String sql, List batchArgs) { return batchUpdate(sql, batchArgs, new int[0]); } - @Override public int[] batchUpdate(String sql, List batchArgs, int[] argTypes) { return BatchUpdateUtils.executeBatchUpdate(sql, batchArgs, argTypes, this); } @@ -1009,13 +937,11 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations { * * Contribution by Nicolas Fabre */ - @Override public int[][] batchUpdate(String sql, final Collection batchArgs, final int batchSize, final ParameterizedPreparedStatementSetter pss) { if (logger.isDebugEnabled()) { logger.debug("Executing SQL batch update [" + sql + "] with a batch size of " + batchSize); } return execute(sql, new PreparedStatementCallback() { - @Override public int[][] doInPreparedStatement(PreparedStatement ps) throws SQLException { List rowsAffected = new ArrayList(); try { @@ -1062,7 +988,6 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations { // Methods dealing with callable statements //------------------------------------------------------------------------- - @Override public T execute(CallableStatementCreator csc, CallableStatementCallback action) throws DataAccessException { @@ -1113,12 +1038,10 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations { } } - @Override public T execute(String callString, CallableStatementCallback action) throws DataAccessException { return execute(new SimpleCallableStatementCreator(callString), action); } - @Override public Map call(CallableStatementCreator csc, List declaredParameters) throws DataAccessException { @@ -1139,7 +1062,6 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations { } } return execute(csc, new CallableStatementCallback>() { - @Override public Map doInCallableStatement(CallableStatement cs) throws SQLException { boolean retVal = cs.execute(); int updateCount = cs.getUpdateCount(); @@ -1447,7 +1369,6 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations { this.target = target; } - @Override @SuppressWarnings("rawtypes") public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { // Invocation on ConnectionProxy interface coming in... @@ -1513,12 +1434,10 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations { this.sql = sql; } - @Override public PreparedStatement createPreparedStatement(Connection con) throws SQLException { return con.prepareStatement(this.sql); } - @Override public String getSql() { return this.sql; } @@ -1537,12 +1456,10 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations { this.callString = callString; } - @Override public CallableStatement createCallableStatement(Connection con) throws SQLException { return con.prepareCall(this.callString); } - @Override public String getSql() { return this.callString; } @@ -1562,7 +1479,6 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations { this.rch = rch; } - @Override public Object extractData(ResultSet rs) throws SQLException { while (rs.next()) { this.rch.processRow(rs); diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/PreparedStatementCreatorFactory.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/PreparedStatementCreatorFactory.java index d8cda78e1d..7efe962c64 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/PreparedStatementCreatorFactory.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/PreparedStatementCreatorFactory.java @@ -224,7 +224,6 @@ public class PreparedStatementCreatorFactory { } } - @Override public PreparedStatement createPreparedStatement(Connection con) throws SQLException { PreparedStatement ps = null; if (generatedKeysColumnNames != null || returnGeneratedKeys) { @@ -253,7 +252,6 @@ public class PreparedStatementCreatorFactory { return ps; } - @Override public void setValues(PreparedStatement ps) throws SQLException { // Determine PreparedStatement to pass to custom types. PreparedStatement psToUse = ps; @@ -302,12 +300,10 @@ public class PreparedStatementCreatorFactory { } } - @Override public String getSql() { return sql; } - @Override public void cleanupParameters() { StatementCreatorUtils.cleanupParameters(this.parameters); } diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/RowCountCallbackHandler.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/RowCountCallbackHandler.java index 376810bf26..7aeb9ee31f 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/RowCountCallbackHandler.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/RowCountCallbackHandler.java @@ -69,7 +69,6 @@ public class RowCountCallbackHandler implements RowCallbackHandler { * by overriding the {@code processRow(ResultSet, int)} method. * @see #processRow(java.sql.ResultSet, int) */ - @Override public final void processRow(ResultSet rs) throws SQLException { if (this.rowCount == 0) { ResultSetMetaData rsmd = rs.getMetaData(); diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/RowMapperResultSetExtractor.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/RowMapperResultSetExtractor.java index 98043f57b8..8ce9453622 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/RowMapperResultSetExtractor.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/RowMapperResultSetExtractor.java @@ -85,7 +85,6 @@ public class RowMapperResultSetExtractor implements ResultSetExtractor extractData(ResultSet rs) throws SQLException { List results = (this.rowsExpected > 0 ? new ArrayList(this.rowsExpected) : new ArrayList()); int rowNum = 0; diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/SingleColumnRowMapper.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/SingleColumnRowMapper.java index 2597b09743..9583ec752c 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/SingleColumnRowMapper.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/SingleColumnRowMapper.java @@ -78,7 +78,6 @@ public class SingleColumnRowMapper implements RowMapper { * @see #getColumnValue(java.sql.ResultSet, int, Class) * @see #convertValueToRequiredType(Object, Class) */ - @Override @SuppressWarnings("unchecked") public T mapRow(ResultSet rs, int rowNum) throws SQLException { // Validate column count. diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/SqlRowSetResultSetExtractor.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/SqlRowSetResultSetExtractor.java index a0db5625a4..38efce95b6 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/SqlRowSetResultSetExtractor.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/SqlRowSetResultSetExtractor.java @@ -58,7 +58,6 @@ public class SqlRowSetResultSetExtractor implements ResultSetExtractor getCallParameterMetaData() { return this.callParameterMetaData; } - @Override public String procedureNameToUse(String procedureName) { if (procedureName == null) { return null; @@ -125,7 +121,6 @@ public class GenericCallMetaDataProvider implements CallMetaDataProvider { } } - @Override public String catalogNameToUse(String catalogName) { if (catalogName == null) { return null; @@ -141,7 +136,6 @@ public class GenericCallMetaDataProvider implements CallMetaDataProvider { } } - @Override public String schemaNameToUse(String schemaName) { if (schemaName == null) { return null; @@ -157,7 +151,6 @@ public class GenericCallMetaDataProvider implements CallMetaDataProvider { } } - @Override public String metaDataCatalogNameToUse(String catalogName) { if (isSupportsCatalogsInProcedureCalls()) { return catalogNameToUse(catalogName); @@ -167,7 +160,6 @@ public class GenericCallMetaDataProvider implements CallMetaDataProvider { } } - @Override public String metaDataSchemaNameToUse(String schemaName) { if (isSupportsSchemasInProcedureCalls()) { return schemaNameToUse(schemaName); @@ -177,7 +169,6 @@ public class GenericCallMetaDataProvider implements CallMetaDataProvider { } } - @Override public String parameterNameToUse(String parameterName) { if (parameterName == null) { return null; @@ -193,47 +184,38 @@ public class GenericCallMetaDataProvider implements CallMetaDataProvider { } } - @Override public boolean byPassReturnParameter(String parameterName) { return false; } - @Override public SqlParameter createDefaultOutParameter(String parameterName, CallParameterMetaData meta) { return new SqlOutParameter(parameterName, meta.getSqlType()); } - @Override public SqlParameter createDefaultInOutParameter(String parameterName, CallParameterMetaData meta) { return new SqlInOutParameter(parameterName, meta.getSqlType()); } - @Override public SqlParameter createDefaultInParameter(String parameterName, CallParameterMetaData meta) { return new SqlParameter(parameterName, meta.getSqlType()); } - @Override public String getUserName() { return this.userName; } - @Override public boolean isReturnResultSetSupported() { return true; } - @Override public boolean isRefCursorSupported() { return false; } - @Override public int getRefCursorSqlType() { return Types.OTHER; } - @Override public boolean isProcedureColumnMetaDataUsed() { return this.procedureColumnMetaDataUsed; } @@ -249,7 +231,6 @@ public class GenericCallMetaDataProvider implements CallMetaDataProvider { /** * Does the database support the use of catalog name in procedure calls */ - @Override public boolean isSupportsCatalogsInProcedureCalls() { return this.supportsCatalogsInProcedureCalls; } @@ -264,7 +245,6 @@ public class GenericCallMetaDataProvider implements CallMetaDataProvider { /** * Does the database support the use of schema name in procedure calls */ - @Override public boolean isSupportsSchemasInProcedureCalls() { return this.supportsSchemasInProcedureCalls; } diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/GenericTableMetaDataProvider.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/GenericTableMetaDataProvider.java index 009eacc47c..138518660a 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/GenericTableMetaDataProvider.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/GenericTableMetaDataProvider.java @@ -113,27 +113,22 @@ public class GenericTableMetaDataProvider implements TableMetaDataProvider { return this.storesLowerCaseIdentifiers; } - @Override public boolean isTableColumnMetaDataUsed() { return this.tableColumnMetaDataUsed; } - @Override public List getTableParameterMetaData() { return this.insertParameterMetaData; } - @Override public boolean isGetGeneratedKeysSupported() { return this.getGeneratedKeysSupported; } - @Override public boolean isGetGeneratedKeysSimulated(){ return false; } - @Override public String getSimpleQueryForGetGeneratedKey(String tableName, String keyColumnName) { return null; } @@ -152,12 +147,10 @@ public class GenericTableMetaDataProvider implements TableMetaDataProvider { this.generatedKeysColumnNameArraySupported = generatedKeysColumnNameArraySupported; } - @Override public boolean isGeneratedKeysColumnNameArraySupported() { return this.generatedKeysColumnNameArraySupported; } - @Override public void setNativeJdbcExtractor(NativeJdbcExtractor nativeJdbcExtractor) { this.nativeJdbcExtractor = nativeJdbcExtractor; } @@ -167,7 +160,6 @@ public class GenericTableMetaDataProvider implements TableMetaDataProvider { } - @Override public void initializeWithMetaData(DatabaseMetaData databaseMetaData) throws SQLException { try { if (databaseMetaData.supportsGetGeneratedKeys()) { @@ -222,7 +214,6 @@ public class GenericTableMetaDataProvider implements TableMetaDataProvider { } - @Override public void initializeWithTableColumnMetaData(DatabaseMetaData databaseMetaData, String catalogName, String schemaName, String tableName) throws SQLException { @@ -230,7 +221,6 @@ public class GenericTableMetaDataProvider implements TableMetaDataProvider { locateTableAndProcessMetaData(databaseMetaData, catalogName, schemaName, tableName); } - @Override public String tableNameToUse(String tableName) { if (tableName == null) { return null; @@ -246,7 +236,6 @@ public class GenericTableMetaDataProvider implements TableMetaDataProvider { } } - @Override public String catalogNameToUse(String catalogName) { if (catalogName == null) { return null; @@ -262,7 +251,6 @@ public class GenericTableMetaDataProvider implements TableMetaDataProvider { } } - @Override public String schemaNameToUse(String schemaName) { if (schemaName == null) { return null; @@ -278,12 +266,10 @@ public class GenericTableMetaDataProvider implements TableMetaDataProvider { } } - @Override public String metaDataCatalogNameToUse(String catalogName) { return catalogNameToUse(catalogName); } - @Override public String metaDataSchemaNameToUse(String schemaName) { if (schemaName == null) { return schemaNameToUse(getDefaultSchema()); diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/TableMetaDataProviderFactory.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/TableMetaDataProviderFactory.java index 36bc50ed84..cf56a04999 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/TableMetaDataProviderFactory.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/TableMetaDataProviderFactory.java @@ -62,7 +62,6 @@ public class TableMetaDataProviderFactory { try { return (TableMetaDataProvider) JdbcUtils.extractDatabaseMetaData(dataSource, new DatabaseMetaDataCallback() { - @Override public Object processMetaData(DatabaseMetaData databaseMetaData) throws SQLException { String databaseProductName = JdbcUtils.commonDatabaseName(databaseMetaData.getDatabaseProductName()); diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/AbstractSqlParameterSource.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/AbstractSqlParameterSource.java index 79526492fb..f8ff89e479 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/AbstractSqlParameterSource.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/AbstractSqlParameterSource.java @@ -61,7 +61,6 @@ public abstract class AbstractSqlParameterSource implements SqlParameterSource { * @return the SQL type of the parameter, * or {@code TYPE_UNKNOWN} if not registered */ - @Override public int getSqlType(String paramName) { Assert.notNull(paramName, "Parameter name must not be null"); Integer sqlType = this.sqlTypes.get(paramName); @@ -77,7 +76,6 @@ public abstract class AbstractSqlParameterSource implements SqlParameterSource { * @return the type name of the parameter, * or {@code null} if not registered */ - @Override public String getTypeName(String paramName) { Assert.notNull(paramName, "Parameter name must not be null"); return this.typeNames.get(paramName); diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/BeanPropertySqlParameterSource.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/BeanPropertySqlParameterSource.java index 364b075b61..92e06e04cb 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/BeanPropertySqlParameterSource.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/BeanPropertySqlParameterSource.java @@ -55,12 +55,10 @@ public class BeanPropertySqlParameterSource extends AbstractSqlParameterSource { } - @Override public boolean hasValue(String paramName) { return this.beanWrapper.isReadableProperty(paramName); } - @Override public Object getValue(String paramName) throws IllegalArgumentException { try { return this.beanWrapper.getPropertyValue(paramName); diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/MapSqlParameterSource.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/MapSqlParameterSource.java index 1212c42c24..fc7b32f4ef 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/MapSqlParameterSource.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/MapSqlParameterSource.java @@ -149,12 +149,10 @@ public class MapSqlParameterSource extends AbstractSqlParameterSource { } - @Override public boolean hasValue(String paramName) { return this.values.containsKey(paramName); } - @Override public Object getValue(String paramName) { if (!hasValue(paramName)) { throw new IllegalArgumentException("No value registered for key '" + paramName + "'"); diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/NamedParameterBatchUpdateUtils.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/NamedParameterBatchUpdateUtils.java index fd711b4327..4438498a88 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/NamedParameterBatchUpdateUtils.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/NamedParameterBatchUpdateUtils.java @@ -41,14 +41,12 @@ public class NamedParameterBatchUpdateUtils extends BatchUpdateUtils { sqlToUse, new BatchPreparedStatementSetter() { - @Override public void setValues(PreparedStatement ps, int i) throws SQLException { Object[] values = NamedParameterUtils.buildValueArray(parsedSql, batchArgs[i], null); int[] columnTypes = NamedParameterUtils.buildSqlTypeArray(parsedSql, batchArgs[i]); setStatementParameters(values, ps, columnTypes); } - @Override public int getBatchSize() { return batchArgs.length; } diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/NamedParameterJdbcTemplate.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/NamedParameterJdbcTemplate.java index 882b965134..1abfdea3c2 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/NamedParameterJdbcTemplate.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/NamedParameterJdbcTemplate.java @@ -105,7 +105,6 @@ public class NamedParameterJdbcTemplate implements NamedParameterJdbcOperations * Expose the classic Spring JdbcTemplate to allow invocation of * less commonly used methods. */ - @Override public JdbcOperations getJdbcOperations() { return this.classicJdbcTemplate; } @@ -126,63 +125,54 @@ public class NamedParameterJdbcTemplate implements NamedParameterJdbcOperations } - @Override public T execute(String sql, SqlParameterSource paramSource, PreparedStatementCallback action) throws DataAccessException { return getJdbcOperations().execute(getPreparedStatementCreator(sql, paramSource), action); } - @Override public T execute(String sql, Map paramMap, PreparedStatementCallback action) throws DataAccessException { return execute(sql, new MapSqlParameterSource(paramMap), action); } - @Override public T query(String sql, SqlParameterSource paramSource, ResultSetExtractor rse) throws DataAccessException { return getJdbcOperations().query(getPreparedStatementCreator(sql, paramSource), rse); } - @Override public T query(String sql, Map paramMap, ResultSetExtractor rse) throws DataAccessException { return query(sql, new MapSqlParameterSource(paramMap), rse); } - @Override public void query(String sql, SqlParameterSource paramSource, RowCallbackHandler rch) throws DataAccessException { getJdbcOperations().query(getPreparedStatementCreator(sql, paramSource), rch); } - @Override public void query(String sql, Map paramMap, RowCallbackHandler rch) throws DataAccessException { query(sql, new MapSqlParameterSource(paramMap), rch); } - @Override public List query(String sql, SqlParameterSource paramSource, RowMapper rowMapper) throws DataAccessException { return getJdbcOperations().query(getPreparedStatementCreator(sql, paramSource), rowMapper); } - @Override public List query(String sql, Map paramMap, RowMapper rowMapper) throws DataAccessException { return query(sql, new MapSqlParameterSource(paramMap), rowMapper); } - @Override public T queryForObject(String sql, SqlParameterSource paramSource, RowMapper rowMapper) throws DataAccessException { @@ -190,116 +180,97 @@ public class NamedParameterJdbcTemplate implements NamedParameterJdbcOperations return DataAccessUtils.requiredSingleResult(results); } - @Override public T queryForObject(String sql, Map paramMap, RowMapperrowMapper) throws DataAccessException { return queryForObject(sql, new MapSqlParameterSource(paramMap), rowMapper); } - @Override public T queryForObject(String sql, SqlParameterSource paramSource, Class requiredType) throws DataAccessException { return queryForObject(sql, paramSource, new SingleColumnRowMapper(requiredType)); } - @Override public T queryForObject(String sql, Map paramMap, Class requiredType) throws DataAccessException { return queryForObject(sql, paramMap, new SingleColumnRowMapper(requiredType)); } - @Override public Map queryForMap(String sql, SqlParameterSource paramSource) throws DataAccessException { return queryForObject(sql, paramSource, new ColumnMapRowMapper()); } - @Override public Map queryForMap(String sql, Map paramMap) throws DataAccessException { return queryForObject(sql, paramMap, new ColumnMapRowMapper()); } - @Override public long queryForLong(String sql, SqlParameterSource paramSource) throws DataAccessException { Number number = queryForObject(sql, paramSource, Long.class); return (number != null ? number.longValue() : 0); } - @Override public long queryForLong(String sql, Map paramMap) throws DataAccessException { return queryForLong(sql, new MapSqlParameterSource(paramMap)); } - @Override public int queryForInt(String sql, SqlParameterSource paramSource) throws DataAccessException { Number number = queryForObject(sql, paramSource, Integer.class); return (number != null ? number.intValue() : 0); } - @Override public int queryForInt(String sql, Map paramMap) throws DataAccessException { return queryForInt(sql, new MapSqlParameterSource(paramMap)); } - @Override public List queryForList(String sql, SqlParameterSource paramSource, Class elementType) throws DataAccessException { return query(sql, paramSource, new SingleColumnRowMapper(elementType)); } - @Override public List queryForList(String sql, Map paramMap, Class elementType) throws DataAccessException { return queryForList(sql, new MapSqlParameterSource(paramMap), elementType); } - @Override public List> queryForList(String sql, SqlParameterSource paramSource) throws DataAccessException { return query(sql, paramSource, new ColumnMapRowMapper()); } - @Override public List> queryForList(String sql, Map paramMap) throws DataAccessException { return queryForList(sql, new MapSqlParameterSource(paramMap)); } - @Override public SqlRowSet queryForRowSet(String sql, SqlParameterSource paramSource) throws DataAccessException { return getJdbcOperations().query( getPreparedStatementCreator(sql, paramSource), new SqlRowSetResultSetExtractor()); } - @Override public SqlRowSet queryForRowSet(String sql, Map paramMap) throws DataAccessException { return queryForRowSet(sql, new MapSqlParameterSource(paramMap)); } - @Override public int update(String sql, SqlParameterSource paramSource) throws DataAccessException { return getJdbcOperations().update(getPreparedStatementCreator(sql, paramSource)); } - @Override public int update(String sql, Map paramMap) throws DataAccessException { return update(sql, new MapSqlParameterSource(paramMap)); } - @Override public int update(String sql, SqlParameterSource paramSource, KeyHolder generatedKeyHolder) throws DataAccessException { return update(sql, paramSource, generatedKeyHolder, null); } - @Override public int update( String sql, SqlParameterSource paramSource, KeyHolder generatedKeyHolder, String[] keyColumnNames) throws DataAccessException { @@ -318,7 +289,6 @@ public class NamedParameterJdbcTemplate implements NamedParameterJdbcOperations return getJdbcOperations().update(pscf.newPreparedStatementCreator(params), generatedKeyHolder); } - @Override public int[] batchUpdate(String sql, Map[] batchValues) { SqlParameterSource[] batchArgs = new SqlParameterSource[batchValues.length]; int i = 0; @@ -329,7 +299,6 @@ public class NamedParameterJdbcTemplate implements NamedParameterJdbcOperations return batchUpdate(sql, batchArgs); } - @Override public int[] batchUpdate(String sql, SqlParameterSource[] batchArgs) { ParsedSql parsedSql = this.getParsedSql(sql); return NamedParameterBatchUpdateUtils.executeBatchUpdateWithNamedParameters(parsedSql, batchArgs, getJdbcOperations()); diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/AbstractJdbcInsert.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/AbstractJdbcInsert.java index 730a11e5f1..98f0e5991e 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/AbstractJdbcInsert.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/AbstractJdbcInsert.java @@ -444,7 +444,6 @@ public abstract class AbstractJdbcInsert { if (this.tableMetaDataContext.isGetGeneratedKeysSupported()) { jdbcTemplate.update( new PreparedStatementCreator() { - @Override public PreparedStatement createPreparedStatement(Connection con) throws SQLException { PreparedStatement ps = prepareStatementForGeneratedKeys(con); setParameterValues(ps, values, getInsertTypes()); @@ -484,7 +483,6 @@ public abstract class AbstractJdbcInsert { } else { jdbcTemplate.execute(new ConnectionCallback() { - @Override public Object doInConnection(Connection con) throws SQLException, DataAccessException { // Do the insert PreparedStatement ps = null; @@ -594,13 +592,11 @@ public abstract class AbstractJdbcInsert { getInsertString(), new BatchPreparedStatementSetter() { - @Override public void setValues(PreparedStatement ps, int i) throws SQLException { List values = batchValues[i]; setParameterValues(ps, values, getInsertTypes()); } - @Override public int getBatchSize() { return batchValues.length; } diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcCall.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcCall.java index a05e16e5cb..d687dbc2f6 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcCall.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcCall.java @@ -79,39 +79,33 @@ public class SimpleJdbcCall extends AbstractJdbcCall implements SimpleJdbcCallOp } - @Override public SimpleJdbcCall withProcedureName(String procedureName) { setProcedureName(procedureName); setFunction(false); return this; } - @Override public SimpleJdbcCall withFunctionName(String functionName) { setProcedureName(functionName); setFunction(true); return this; } - @Override public SimpleJdbcCall withSchemaName(String schemaName) { setSchemaName(schemaName); return this; } - @Override public SimpleJdbcCall withCatalogName(String catalogName) { setCatalogName(catalogName); return this; } - @Override public SimpleJdbcCall withReturnValue() { setReturnValueRequired(true); return this; } - @Override public SimpleJdbcCall declareParameters(SqlParameter... sqlParameters) { for (SqlParameter sqlParameter : sqlParameters) { if (sqlParameter != null) { @@ -121,13 +115,11 @@ public class SimpleJdbcCall extends AbstractJdbcCall implements SimpleJdbcCallOp return this; } - @Override public SimpleJdbcCall useInParameterNames(String... inParameterNames) { setInParameterNames(new HashSet(Arrays.asList(inParameterNames))); return this; } - @Override public SimpleJdbcCall returningResultSet(String parameterName, RowMapper rowMapper) { addDeclaredRowMapper(parameterName, rowMapper); return this; @@ -136,66 +128,55 @@ public class SimpleJdbcCall extends AbstractJdbcCall implements SimpleJdbcCallOp /** * @deprecated in favor of {@link #returningResultSet(String, org.springframework.jdbc.core.RowMapper)} */ - @Override @Deprecated public SimpleJdbcCall returningResultSet(String parameterName, ParameterizedRowMapper rowMapper) { addDeclaredRowMapper(parameterName, rowMapper); return this; } - @Override public SimpleJdbcCall withoutProcedureColumnMetaDataAccess() { setAccessCallParameterMetaData(false); return this; } - @Override @SuppressWarnings("unchecked") public T executeFunction(Class returnType, Object... args) { return (T) doExecute(args).get(getScalarOutParameterName()); } - @Override @SuppressWarnings("unchecked") public T executeFunction(Class returnType, Map args) { return (T) doExecute(args).get(getScalarOutParameterName()); } - @Override @SuppressWarnings("unchecked") public T executeFunction(Class returnType, SqlParameterSource args) { return (T) doExecute(args).get(getScalarOutParameterName()); } - @Override @SuppressWarnings("unchecked") public T executeObject(Class returnType, Object... args) { return (T) doExecute(args).get(getScalarOutParameterName()); } - @Override @SuppressWarnings("unchecked") public T executeObject(Class returnType, Map args) { return (T) doExecute(args).get(getScalarOutParameterName()); } - @Override @SuppressWarnings("unchecked") public T executeObject(Class returnType, SqlParameterSource args) { return (T) doExecute(args).get(getScalarOutParameterName()); } - @Override public Map execute(Object... args) { return doExecute(args); } - @Override public Map execute(Map args) { return doExecute(args); } - @Override public Map execute(SqlParameterSource parameterSource) { return doExecute(parameterSource); } diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcInsert.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcInsert.java index e83f25ff92..7d29df8301 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcInsert.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcInsert.java @@ -70,90 +70,74 @@ public class SimpleJdbcInsert extends AbstractJdbcInsert implements SimpleJdbcIn } - @Override public SimpleJdbcInsert withTableName(String tableName) { setTableName(tableName); return this; } - @Override public SimpleJdbcInsert withSchemaName(String schemaName) { setSchemaName(schemaName); return this; } - @Override public SimpleJdbcInsert withCatalogName(String catalogName) { setCatalogName(catalogName); return this; } - @Override public SimpleJdbcInsert usingColumns(String... columnNames) { setColumnNames(Arrays.asList(columnNames)); return this; } - @Override public SimpleJdbcInsert usingGeneratedKeyColumns(String... columnNames) { setGeneratedKeyNames(columnNames); return this; } - @Override public SimpleJdbcInsertOperations withoutTableColumnMetaDataAccess() { setAccessTableColumnMetaData(false); return this; } - @Override public SimpleJdbcInsertOperations includeSynonymsForTableColumnMetaData() { setOverrideIncludeSynonymsDefault(true); return this; } - @Override public SimpleJdbcInsertOperations useNativeJdbcExtractorForMetaData(NativeJdbcExtractor nativeJdbcExtractor) { setNativeJdbcExtractor(nativeJdbcExtractor); return this; } - @Override public int execute(Map args) { return doExecute(args); } - @Override public int execute(SqlParameterSource parameterSource) { return doExecute(parameterSource); } - @Override public Number executeAndReturnKey(Map args) { return doExecuteAndReturnKey(args); } - @Override public Number executeAndReturnKey(SqlParameterSource parameterSource) { return doExecuteAndReturnKey(parameterSource); } - @Override public KeyHolder executeAndReturnKeyHolder(Map args) { return doExecuteAndReturnKeyHolder(args); } - @Override public KeyHolder executeAndReturnKeyHolder(SqlParameterSource parameterSource) { return doExecuteAndReturnKeyHolder(parameterSource); } - @Override public int[] executeBatch(Map[] batch) { return doExecuteBatch(batch); } - @Override public int[] executeBatch(SqlParameterSource[] batch) { return doExecuteBatch(batch); } diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcTemplate.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcTemplate.java index 78e85682bd..a4ec41fc06 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcTemplate.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcTemplate.java @@ -91,7 +91,6 @@ public class SimpleJdbcTemplate implements SimpleJdbcOperations { * Expose the classic Spring JdbcTemplate to allow invocation of * less commonly used methods. */ - @Override public JdbcOperations getJdbcOperations() { return this.namedParameterJdbcOperations.getJdbcOperations(); } @@ -100,207 +99,172 @@ public class SimpleJdbcTemplate implements SimpleJdbcOperations { * Expose the Spring NamedParameterJdbcTemplate to allow invocation of * less commonly used methods. */ - @Override public NamedParameterJdbcOperations getNamedParameterJdbcOperations() { return this.namedParameterJdbcOperations; } - @Override public int queryForInt(String sql, Map args) throws DataAccessException { return getNamedParameterJdbcOperations().queryForInt(sql, args); } - @Override public int queryForInt(String sql, SqlParameterSource args) throws DataAccessException { return getNamedParameterJdbcOperations().queryForInt(sql, args); } - @Override public int queryForInt(String sql, Object... args) throws DataAccessException { return (ObjectUtils.isEmpty(args) ? getJdbcOperations().queryForInt(sql) : getJdbcOperations().queryForInt(sql, getArguments(args))); } - @Override public long queryForLong(String sql, Map args) throws DataAccessException { return getNamedParameterJdbcOperations().queryForLong(sql, args); } - @Override public long queryForLong(String sql, SqlParameterSource args) throws DataAccessException { return getNamedParameterJdbcOperations().queryForLong(sql, args); } - @Override public long queryForLong(String sql, Object... args) throws DataAccessException { return (ObjectUtils.isEmpty(args) ? getJdbcOperations().queryForLong(sql) : getJdbcOperations().queryForLong(sql, getArguments(args))); } - @Override public T queryForObject(String sql, Class requiredType, Map args) throws DataAccessException { return getNamedParameterJdbcOperations().queryForObject(sql, args, requiredType); } - @Override public T queryForObject(String sql, Class requiredType, SqlParameterSource args) throws DataAccessException { return getNamedParameterJdbcOperations().queryForObject(sql, args, requiredType); } - @Override public T queryForObject(String sql, Class requiredType, Object... args) throws DataAccessException { return (ObjectUtils.isEmpty(args) ? getJdbcOperations().queryForObject(sql, requiredType) : getJdbcOperations().queryForObject(sql, getArguments(args), requiredType)); } - @Override public T queryForObject(String sql, RowMapper rm, Map args) throws DataAccessException { return getNamedParameterJdbcOperations().queryForObject(sql, args, rm); } - @Override @Deprecated public T queryForObject(String sql, ParameterizedRowMapper rm, Map args) throws DataAccessException { return queryForObject(sql, (RowMapper) rm, args); } - @Override public T queryForObject(String sql, RowMapper rm, SqlParameterSource args) throws DataAccessException { return getNamedParameterJdbcOperations().queryForObject(sql, args, rm); } - @Override @Deprecated public T queryForObject(String sql, ParameterizedRowMapper rm, SqlParameterSource args) throws DataAccessException { return queryForObject(sql, (RowMapper) rm, args); } - @Override public T queryForObject(String sql, RowMapper rm, Object... args) throws DataAccessException { return (ObjectUtils.isEmpty(args) ? getJdbcOperations().queryForObject(sql, rm): getJdbcOperations().queryForObject(sql, getArguments(args), rm)); } - @Override @Deprecated public T queryForObject(String sql, ParameterizedRowMapper rm, Object... args) throws DataAccessException { return queryForObject(sql, (RowMapper) rm, args); } - @Override public List query(String sql, RowMapper rm, Map args) throws DataAccessException { return getNamedParameterJdbcOperations().query(sql, args, rm); } - @Override @Deprecated public List query(String sql, ParameterizedRowMapper rm, Map args) throws DataAccessException { return query(sql, (RowMapper) rm, args); } - @Override public List query(String sql, RowMapper rm, SqlParameterSource args) throws DataAccessException { return getNamedParameterJdbcOperations().query(sql, args, rm); } - @Override @Deprecated public List query(String sql, ParameterizedRowMapper rm, SqlParameterSource args) throws DataAccessException { return query(sql, (RowMapper) rm, args); } - @Override public List query(String sql, RowMapper rm, Object... args) throws DataAccessException { return (ObjectUtils.isEmpty(args) ? getJdbcOperations().query(sql, rm) : getJdbcOperations().query(sql, getArguments(args), rm)); } - @Override @Deprecated public List query(String sql, ParameterizedRowMapper rm, Object... args) throws DataAccessException { return query(sql, (RowMapper) rm, args); } - @Override public Map queryForMap(String sql, Map args) throws DataAccessException { return getNamedParameterJdbcOperations().queryForMap(sql, args); } - @Override public Map queryForMap(String sql, SqlParameterSource args) throws DataAccessException { return getNamedParameterJdbcOperations().queryForMap(sql, args); } - @Override public Map queryForMap(String sql, Object... args) throws DataAccessException { return (ObjectUtils.isEmpty(args) ? getJdbcOperations().queryForMap(sql) : getJdbcOperations().queryForMap(sql, getArguments(args))); } - @Override public List> queryForList(String sql, Map args) throws DataAccessException { return getNamedParameterJdbcOperations().queryForList(sql, args); } - @Override public List> queryForList(String sql, SqlParameterSource args) throws DataAccessException { return getNamedParameterJdbcOperations().queryForList(sql, args); } - @Override public List> queryForList(String sql, Object... args) throws DataAccessException { return (ObjectUtils.isEmpty(args) ? getJdbcOperations().queryForList(sql) : getJdbcOperations().queryForList(sql, getArguments(args))); } - @Override public int update(String sql, Map args) throws DataAccessException { return getNamedParameterJdbcOperations().update(sql, args); } - @Override public int update(String sql, SqlParameterSource args) throws DataAccessException { return getNamedParameterJdbcOperations().update(sql, args); } - @Override public int update(String sql, Object ... args) throws DataAccessException { return (ObjectUtils.isEmpty(args) ? getJdbcOperations().update(sql) : getJdbcOperations().update(sql, getArguments(args))); } - @Override public int[] batchUpdate(String sql, List batchArgs) { return batchUpdate(sql, batchArgs, new int[0]); } - @Override public int[] batchUpdate(String sql, List batchArgs, int[] argTypes) { return BatchUpdateUtils.executeBatchUpdate(sql, batchArgs, argTypes, getJdbcOperations()); } - @Override public int[] batchUpdate(String sql, Map[] batchValues) { return getNamedParameterJdbcOperations().batchUpdate(sql, batchValues); } - @Override public int[] batchUpdate(String sql, SqlParameterSource[] batchArgs) { return getNamedParameterJdbcOperations().batchUpdate(sql, batchArgs); } diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/AbstractInterruptibleBatchPreparedStatementSetter.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/AbstractInterruptibleBatchPreparedStatementSetter.java index 7fb5e6d1c2..83d37435ec 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/AbstractInterruptibleBatchPreparedStatementSetter.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/AbstractInterruptibleBatchPreparedStatementSetter.java @@ -40,7 +40,6 @@ public abstract class AbstractInterruptibleBatchPreparedStatementSetter * This implementation calls {@link #setValuesIfAvailable} * and sets this instance's exhaustion flag accordingly. */ - @Override public final void setValues(PreparedStatement ps, int i) throws SQLException { this.exhausted = !setValuesIfAvailable(ps, i); } @@ -48,7 +47,6 @@ public abstract class AbstractInterruptibleBatchPreparedStatementSetter /** * This implementation return this instance's current exhaustion flag. */ - @Override public final boolean isBatchExhausted(int i) { return this.exhausted; } @@ -57,7 +55,6 @@ public abstract class AbstractInterruptibleBatchPreparedStatementSetter * This implementation returns {@code Integer.MAX_VALUE}. * Can be overridden in subclasses to lower the maximum batch size. */ - @Override public int getBatchSize() { return Integer.MAX_VALUE; } diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/AbstractLobCreatingPreparedStatementCallback.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/AbstractLobCreatingPreparedStatementCallback.java index 4b511bc735..7ef0b32583 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/AbstractLobCreatingPreparedStatementCallback.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/AbstractLobCreatingPreparedStatementCallback.java @@ -66,7 +66,6 @@ public abstract class AbstractLobCreatingPreparedStatementCallback implements Pr } - @Override public final Integer doInPreparedStatement(PreparedStatement ps) throws SQLException, DataAccessException { LobCreator lobCreator = this.lobHandler.getLobCreator(); try { diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/AbstractLobStreamingResultSetExtractor.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/AbstractLobStreamingResultSetExtractor.java index 4a15e97fd4..83a9aedffc 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/AbstractLobStreamingResultSetExtractor.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/AbstractLobStreamingResultSetExtractor.java @@ -64,7 +64,6 @@ public abstract class AbstractLobStreamingResultSetExtractor implements ResultSe * @see #streamData * @see org.springframework.jdbc.LobRetrievalFailureException */ - @Override public final Object extractData(ResultSet rs) throws SQLException, DataAccessException { if (!rs.next()) { handleNoRowFound(); diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/AbstractSqlTypeValue.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/AbstractSqlTypeValue.java index 67f325c8d5..d751933913 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/AbstractSqlTypeValue.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/AbstractSqlTypeValue.java @@ -52,7 +52,6 @@ import org.springframework.jdbc.core.SqlTypeValue; */ public abstract class AbstractSqlTypeValue implements SqlTypeValue { - @Override public final void setTypeValue(PreparedStatement ps, int paramIndex, int sqlType, String typeName) throws SQLException { diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/JdbcBeanDefinitionReader.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/JdbcBeanDefinitionReader.java index bdcd1c3073..7039eeacc8 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/JdbcBeanDefinitionReader.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/JdbcBeanDefinitionReader.java @@ -107,7 +107,6 @@ public class JdbcBeanDefinitionReader { Assert.notNull(this.jdbcTemplate, "Not fully configured - specify DataSource or JdbcTemplate"); final Properties props = new Properties(); this.jdbcTemplate.query(sql, new RowCallbackHandler() { - @Override public void processRow(ResultSet rs) throws SQLException { String beanName = rs.getString(1); String property = rs.getString(2); diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/SqlLobValue.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/SqlLobValue.java index 8e46d42b75..2cc5f9f909 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/SqlLobValue.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/SqlLobValue.java @@ -168,7 +168,6 @@ public class SqlLobValue implements DisposableSqlTypeValue { /** * Set the specified content via the LobCreator. */ - @Override public void setTypeValue(PreparedStatement ps, int paramIndex, int sqlType, String typeName) throws SQLException { if (sqlType == Types.BLOB) { @@ -209,7 +208,6 @@ public class SqlLobValue implements DisposableSqlTypeValue { /** * Close the LobCreator, if any. */ - @Override public void cleanup() { this.lobCreator.close(); } diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/AbstractDataSource.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/AbstractDataSource.java index 63d9ddff38..0674c79b47 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/AbstractDataSource.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/AbstractDataSource.java @@ -45,7 +45,6 @@ public abstract class AbstractDataSource implements DataSource { /** * Returns 0, indicating the default system timeout is to be used. */ - @Override public int getLoginTimeout() throws SQLException { return 0; } @@ -53,7 +52,6 @@ public abstract class AbstractDataSource implements DataSource { /** * Setting a login timeout is not supported. */ - @Override public void setLoginTimeout(int timeout) throws SQLException { throw new UnsupportedOperationException("setLoginTimeout"); } @@ -61,7 +59,6 @@ public abstract class AbstractDataSource implements DataSource { /** * LogWriter methods are not supported. */ - @Override public PrintWriter getLogWriter() { throw new UnsupportedOperationException("getLogWriter"); } @@ -69,7 +66,6 @@ public abstract class AbstractDataSource implements DataSource { /** * LogWriter methods are not supported. */ - @Override public void setLogWriter(PrintWriter pw) throws SQLException { throw new UnsupportedOperationException("setLogWriter"); } @@ -79,7 +75,6 @@ public abstract class AbstractDataSource implements DataSource { // Implementation of JDBC 4.0's Wrapper interface //--------------------------------------------------------------------- - @Override @SuppressWarnings("unchecked") public T unwrap(Class iface) throws SQLException { if (iface.isInstance(this)) { @@ -89,7 +84,6 @@ public abstract class AbstractDataSource implements DataSource { "] cannot be unwrapped as [" + iface.getName() + "]"); } - @Override public boolean isWrapperFor(Class iface) throws SQLException { return iface.isInstance(this); } @@ -99,7 +93,6 @@ public abstract class AbstractDataSource implements DataSource { // Implementation of JDBC 4.1's getParentLogger method //--------------------------------------------------------------------- - @Override public Logger getParentLogger() { return Logger.getLogger(Logger.GLOBAL_LOGGER_NAME); } diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/AbstractDriverBasedDataSource.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/AbstractDriverBasedDataSource.java index 6cb804406e..00aedb4c22 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/AbstractDriverBasedDataSource.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/AbstractDriverBasedDataSource.java @@ -115,7 +115,6 @@ public abstract class AbstractDriverBasedDataSource extends AbstractDataSource { * @see #setUsername * @see #setPassword */ - @Override public Connection getConnection() throws SQLException { return getConnectionFromDriver(getUsername(), getPassword()); } @@ -125,7 +124,6 @@ public abstract class AbstractDriverBasedDataSource extends AbstractDataSource { * using the given username and password. * @see #getConnectionFromDriver(String, String) */ - @Override public Connection getConnection(String username, String password) throws SQLException { return getConnectionFromDriver(username, password); } diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/DataSourceTransactionManager.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/DataSourceTransactionManager.java index 8b54f1b66f..9c6ebcfde2 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/DataSourceTransactionManager.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/DataSourceTransactionManager.java @@ -162,7 +162,6 @@ public class DataSourceTransactionManager extends AbstractPlatformTransactionMan return this.dataSource; } - @Override public void afterPropertiesSet() { if (getDataSource() == null) { throw new IllegalArgumentException("Property 'dataSource' is required"); @@ -170,7 +169,6 @@ public class DataSourceTransactionManager extends AbstractPlatformTransactionMan } - @Override public Object getResourceFactory() { return getDataSource(); } @@ -366,7 +364,6 @@ public class DataSourceTransactionManager extends AbstractPlatformTransactionMan getConnectionHolder().setRollbackOnly(); } - @Override public boolean isRollbackOnly() { return getConnectionHolder().isRollbackOnly(); } diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/DelegatingDataSource.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/DelegatingDataSource.java index 3adef83c81..a4c162dde8 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/DelegatingDataSource.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/DelegatingDataSource.java @@ -73,7 +73,6 @@ public class DelegatingDataSource implements DataSource, InitializingBean { return this.targetDataSource; } - @Override public void afterPropertiesSet() { if (getTargetDataSource() == null) { throw new IllegalArgumentException("Property 'targetDataSource' is required"); @@ -81,32 +80,26 @@ public class DelegatingDataSource implements DataSource, InitializingBean { } - @Override public Connection getConnection() throws SQLException { return getTargetDataSource().getConnection(); } - @Override public Connection getConnection(String username, String password) throws SQLException { return getTargetDataSource().getConnection(username, password); } - @Override public PrintWriter getLogWriter() throws SQLException { return getTargetDataSource().getLogWriter(); } - @Override public void setLogWriter(PrintWriter out) throws SQLException { getTargetDataSource().setLogWriter(out); } - @Override public int getLoginTimeout() throws SQLException { return getTargetDataSource().getLoginTimeout(); } - @Override public void setLoginTimeout(int seconds) throws SQLException { getTargetDataSource().setLoginTimeout(seconds); } @@ -116,7 +109,6 @@ public class DelegatingDataSource implements DataSource, InitializingBean { // Implementation of JDBC 4.0's Wrapper interface //--------------------------------------------------------------------- - @Override @SuppressWarnings("unchecked") public T unwrap(Class iface) throws SQLException { if (iface.isInstance(this)) { @@ -125,7 +117,6 @@ public class DelegatingDataSource implements DataSource, InitializingBean { return getTargetDataSource().unwrap(iface); } - @Override public boolean isWrapperFor(Class iface) throws SQLException { return (iface.isInstance(this) || getTargetDataSource().isWrapperFor(iface)); } @@ -135,7 +126,6 @@ public class DelegatingDataSource implements DataSource, InitializingBean { // Implementation of JDBC 4.1's getParentLogger method //--------------------------------------------------------------------- - @Override public Logger getParentLogger() { return Logger.getLogger(Logger.GLOBAL_LOGGER_NAME); } diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/JdbcTransactionObjectSupport.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/JdbcTransactionObjectSupport.java index 18c6572883..e2b7f0a896 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/JdbcTransactionObjectSupport.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/JdbcTransactionObjectSupport.java @@ -87,7 +87,6 @@ public abstract class JdbcTransactionObjectSupport implements SavepointManager, return this.savepointAllowed; } - @Override public void flush() { // no-op } @@ -101,7 +100,6 @@ public abstract class JdbcTransactionObjectSupport implements SavepointManager, * This implementation creates a JDBC 3.0 Savepoint and returns it. * @see java.sql.Connection#setSavepoint */ - @Override public Object createSavepoint() throws TransactionException { ConnectionHolder conHolder = getConnectionHolderForSavepoint(); try { @@ -126,7 +124,6 @@ public abstract class JdbcTransactionObjectSupport implements SavepointManager, * This implementation rolls back to the given JDBC 3.0 Savepoint. * @see java.sql.Connection#rollback(java.sql.Savepoint) */ - @Override public void rollbackToSavepoint(Object savepoint) throws TransactionException { try { getConnectionHolderForSavepoint().getConnection().rollback((Savepoint) savepoint); @@ -140,7 +137,6 @@ public abstract class JdbcTransactionObjectSupport implements SavepointManager, * This implementation releases the given JDBC 3.0 Savepoint. * @see java.sql.Connection#releaseSavepoint */ - @Override public void releaseSavepoint(Object savepoint) throws TransactionException { try { getConnectionHolderForSavepoint().getConnection().releaseSavepoint((Savepoint) savepoint); diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/LazyConnectionDataSourceProxy.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/LazyConnectionDataSourceProxy.java index c59f31b4cb..0651adbc18 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/LazyConnectionDataSourceProxy.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/LazyConnectionDataSourceProxy.java @@ -274,7 +274,6 @@ public class LazyConnectionDataSourceProxy extends DelegatingDataSource { this.password = password; } - @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { // Invocation on ConnectionProxy interface coming in... diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/SimpleConnectionHandle.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/SimpleConnectionHandle.java index 6140a51f1a..8df56627c2 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/SimpleConnectionHandle.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/SimpleConnectionHandle.java @@ -44,7 +44,6 @@ public class SimpleConnectionHandle implements ConnectionHandle { /** * Return the specified Connection as-is. */ - @Override public Connection getConnection() { return this.connection; } @@ -53,7 +52,6 @@ public class SimpleConnectionHandle implements ConnectionHandle { * This implementation is empty, as we're using a standard * Connection handle that does not have to be released. */ - @Override public void releaseConnection(Connection con) { } diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/SingleConnectionDataSource.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/SingleConnectionDataSource.java index c8a72e95e6..9d2b41f54e 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/SingleConnectionDataSource.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/SingleConnectionDataSource.java @@ -213,7 +213,6 @@ public class SingleConnectionDataSource extends DriverManagerDataSource /** * This is a single Connection: Do not close it when returning to the "pool". */ - @Override public boolean shouldClose(Connection con) { synchronized (this.connectionMonitor) { return (con != this.connection && con != this.target); @@ -226,7 +225,6 @@ public class SingleConnectionDataSource extends DriverManagerDataSource *

As this bean implements DisposableBean, a bean factory will * automatically invoke this on destruction of its cached singletons. */ - @Override public void destroy() { synchronized (this.connectionMonitor) { closeConnection(); @@ -316,7 +314,6 @@ public class SingleConnectionDataSource extends DriverManagerDataSource this.target = target; } - @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { // Invocation on ConnectionProxy interface coming in... diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/TransactionAwareDataSourceProxy.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/TransactionAwareDataSourceProxy.java index 8fc76ea690..1321c81662 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/TransactionAwareDataSourceProxy.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/TransactionAwareDataSourceProxy.java @@ -174,7 +174,6 @@ public class TransactionAwareDataSourceProxy extends DelegatingDataSource { this.targetDataSource = targetDataSource; } - @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { // Invocation on ConnectionProxy interface coming in... diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/AbstractEmbeddedDatabaseConfigurer.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/AbstractEmbeddedDatabaseConfigurer.java index 2497a6cc01..1af0e0e38e 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/AbstractEmbeddedDatabaseConfigurer.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/AbstractEmbeddedDatabaseConfigurer.java @@ -35,7 +35,6 @@ abstract class AbstractEmbeddedDatabaseConfigurer implements EmbeddedDatabaseCon protected final Log logger = LogFactory.getLog(getClass()); - @Override public void shutdown(DataSource dataSource, String databaseName) { try { Connection connection = dataSource.getConnection(); diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/DerbyEmbeddedDatabaseConfigurer.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/DerbyEmbeddedDatabaseConfigurer.java index 962b2dff6e..05fad27124 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/DerbyEmbeddedDatabaseConfigurer.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/DerbyEmbeddedDatabaseConfigurer.java @@ -69,7 +69,6 @@ final class DerbyEmbeddedDatabaseConfigurer implements EmbeddedDatabaseConfigure private DerbyEmbeddedDatabaseConfigurer() { } - @Override public void configureConnectionProperties(ConnectionProperties properties, String databaseName) { properties.setDriverClass(EmbeddedDriver.class); properties.setUrl(String.format(URL_TEMPLATE, databaseName, "create=true")); @@ -77,7 +76,6 @@ final class DerbyEmbeddedDatabaseConfigurer implements EmbeddedDatabaseConfigure properties.setPassword(""); } - @Override public void shutdown(DataSource dataSource, String databaseName) { try { new EmbeddedDriver().connect( diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseFactory.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseFactory.java index 5254361ea1..5e3db7cff4 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseFactory.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseFactory.java @@ -172,54 +172,44 @@ public class EmbeddedDatabaseFactory { this.dataSource = dataSource; } - @Override public Connection getConnection() throws SQLException { return this.dataSource.getConnection(); } - @Override public Connection getConnection(String username, String password) throws SQLException { return this.dataSource.getConnection(username, password); } - @Override public PrintWriter getLogWriter() throws SQLException { return this.dataSource.getLogWriter(); } - @Override public void setLogWriter(PrintWriter out) throws SQLException { this.dataSource.setLogWriter(out); } - @Override public int getLoginTimeout() throws SQLException { return this.dataSource.getLoginTimeout(); } - @Override public void setLoginTimeout(int seconds) throws SQLException { this.dataSource.setLoginTimeout(seconds); } - @Override public T unwrap(Class iface) throws SQLException { return this.dataSource.unwrap(iface); } - @Override public boolean isWrapperFor(Class iface) throws SQLException { return this.dataSource.isWrapperFor(iface); } // getParentLogger() is required for JDBC 4.1 compatibility - @Override @SuppressWarnings("unused") public Logger getParentLogger() { return Logger.getLogger(Logger.GLOBAL_LOGGER_NAME); } - @Override public void shutdown() { shutdownDatabase(); } diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseFactoryBean.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseFactoryBean.java index f41180ca85..79e83a9f69 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseFactoryBean.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseFactoryBean.java @@ -54,12 +54,10 @@ public class EmbeddedDatabaseFactoryBean extends EmbeddedDatabaseFactory this.databaseCleaner = databaseCleaner; } - @Override public void afterPropertiesSet() { initDatabase(); } - @Override public void destroy() { if (this.databaseCleaner != null) { DatabasePopulatorUtils.execute(this.databaseCleaner, getDataSource()); @@ -68,17 +66,14 @@ public class EmbeddedDatabaseFactoryBean extends EmbeddedDatabaseFactory } - @Override public DataSource getObject() { return getDataSource(); } - @Override public Class getObjectType() { return DataSource.class; } - @Override public boolean isSingleton() { return true; } diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/H2EmbeddedDatabaseConfigurer.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/H2EmbeddedDatabaseConfigurer.java index 197b5fb6be..9ac8270849 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/H2EmbeddedDatabaseConfigurer.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/H2EmbeddedDatabaseConfigurer.java @@ -52,7 +52,6 @@ final class H2EmbeddedDatabaseConfigurer extends AbstractEmbeddedDatabaseConfigu this.driverClass = driverClass; } - @Override public void configureConnectionProperties(ConnectionProperties properties, String databaseName) { properties.setDriverClass(this.driverClass); properties.setUrl(String.format("jdbc:h2:mem:%s;DB_CLOSE_DELAY=-1", databaseName)); diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/HsqlEmbeddedDatabaseConfigurer.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/HsqlEmbeddedDatabaseConfigurer.java index a39685139e..36cb4662d9 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/HsqlEmbeddedDatabaseConfigurer.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/HsqlEmbeddedDatabaseConfigurer.java @@ -52,7 +52,6 @@ final class HsqlEmbeddedDatabaseConfigurer extends AbstractEmbeddedDatabaseConfi this.driverClass = driverClass; } - @Override public void configureConnectionProperties(ConnectionProperties properties, String databaseName) { properties.setDriverClass(this.driverClass); properties.setUrl("jdbc:hsqldb:mem:" + databaseName); diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/OutputStreamFactory.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/OutputStreamFactory.java index 964c3b3323..a1471bd541 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/OutputStreamFactory.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/OutputStreamFactory.java @@ -33,7 +33,6 @@ public class OutputStreamFactory { */ public static OutputStream getNoopOutputStream() { return new OutputStream() { - @Override public void write(int b) throws IOException { // ignore the output } diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/SimpleDriverDataSourceFactory.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/SimpleDriverDataSourceFactory.java index 309d776534..58b176721b 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/SimpleDriverDataSourceFactory.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/SimpleDriverDataSourceFactory.java @@ -33,32 +33,26 @@ final class SimpleDriverDataSourceFactory implements DataSourceFactory { private final SimpleDriverDataSource dataSource = new SimpleDriverDataSource(); - @Override public ConnectionProperties getConnectionProperties() { return new ConnectionProperties() { - @Override public void setDriverClass(Class driverClass) { dataSource.setDriverClass(driverClass); } - @Override public void setUrl(String url) { dataSource.setUrl(url); } - @Override public void setUsername(String username) { dataSource.setUsername(username); } - @Override public void setPassword(String password) { dataSource.setPassword(password); } }; } - @Override public DataSource getDataSource() { return this.dataSource; } diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/init/CompositeDatabasePopulator.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/init/CompositeDatabasePopulator.java index 4920ada8f7..eba847e621 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/init/CompositeDatabasePopulator.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/init/CompositeDatabasePopulator.java @@ -50,7 +50,6 @@ public class CompositeDatabasePopulator implements DatabasePopulator { } - @Override public void populate(Connection connection) throws SQLException { for (DatabasePopulator populator : this.populators) { populator.populate(connection); diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/init/DataSourceInitializer.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/init/DataSourceInitializer.java index 177e778187..9958aa7d6b 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/init/DataSourceInitializer.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/init/DataSourceInitializer.java @@ -78,7 +78,6 @@ public class DataSourceInitializer implements InitializingBean, DisposableBean { /** * Use the populator to set up data in the data source. */ - @Override public void afterPropertiesSet() { if (this.databasePopulator != null && this.enabled) { DatabasePopulatorUtils.execute(this.databasePopulator, this.dataSource); @@ -88,7 +87,6 @@ public class DataSourceInitializer implements InitializingBean, DisposableBean { /** * Use the populator to clean up data in the data source. */ - @Override public void destroy() { if (this.databaseCleaner != null && this.enabled) { DatabasePopulatorUtils.execute(this.databaseCleaner, this.dataSource); diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/init/ResourceDatabasePopulator.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/init/ResourceDatabasePopulator.java index 1f615026cb..e2f6eafe36 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/init/ResourceDatabasePopulator.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/init/ResourceDatabasePopulator.java @@ -129,7 +129,6 @@ public class ResourceDatabasePopulator implements DatabasePopulator { } - @Override public void populate(Connection connection) throws SQLException { for (Resource script : this.scripts) { executeSqlScript(connection, applyEncodingIfNecessary(script), this.continueOnError, this.ignoreFailedDrops); diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/AbstractRoutingDataSource.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/AbstractRoutingDataSource.java index 610c9e6309..f42cbb72f8 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/AbstractRoutingDataSource.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/AbstractRoutingDataSource.java @@ -107,7 +107,6 @@ public abstract class AbstractRoutingDataSource extends AbstractDataSource imple } - @Override public void afterPropertiesSet() { if (this.targetDataSources == null) { throw new IllegalArgumentException("Property 'targetDataSources' is required"); @@ -159,12 +158,10 @@ public abstract class AbstractRoutingDataSource extends AbstractDataSource imple } - @Override public Connection getConnection() throws SQLException { return determineTargetDataSource().getConnection(); } - @Override public Connection getConnection(String username, String password) throws SQLException { return determineTargetDataSource().getConnection(username, password); } diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/BeanFactoryDataSourceLookup.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/BeanFactoryDataSourceLookup.java index f4dbbaf5a2..915b327153 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/BeanFactoryDataSourceLookup.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/BeanFactoryDataSourceLookup.java @@ -62,13 +62,11 @@ public class BeanFactoryDataSourceLookup implements DataSourceLookup, BeanFactor } - @Override public void setBeanFactory(BeanFactory beanFactory) { this.beanFactory = beanFactory; } - @Override public DataSource getDataSource(String dataSourceName) throws DataSourceLookupFailureException { Assert.state(this.beanFactory != null, "BeanFactory is required"); try { diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/JndiDataSourceLookup.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/JndiDataSourceLookup.java index 96677aa2e7..2a48efaaf5 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/JndiDataSourceLookup.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/JndiDataSourceLookup.java @@ -39,7 +39,6 @@ public class JndiDataSourceLookup extends JndiLocatorSupport implements DataSour setResourceRef(true); } - @Override public DataSource getDataSource(String dataSourceName) throws DataSourceLookupFailureException { try { return lookup(dataSourceName, DataSource.class); diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/MapDataSourceLookup.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/MapDataSourceLookup.java index e392303e79..0a4eb32b4b 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/MapDataSourceLookup.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/MapDataSourceLookup.java @@ -98,7 +98,6 @@ public class MapDataSourceLookup implements DataSourceLookup { this.dataSources.put(dataSourceName, dataSource); } - @Override public DataSource getDataSource(String dataSourceName) throws DataSourceLookupFailureException { Assert.notNull(dataSourceName, "DataSource name must not be null"); DataSource dataSource = this.dataSources.get(dataSourceName); diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/SingleDataSourceLookup.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/SingleDataSourceLookup.java index 8bd9a4bbce..25ec879b67 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/SingleDataSourceLookup.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/SingleDataSourceLookup.java @@ -42,7 +42,6 @@ public class SingleDataSourceLookup implements DataSourceLookup { } - @Override public DataSource getDataSource(String dataSourceName) { return this.dataSource; } diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/object/BatchSqlUpdate.java b/spring-jdbc/src/main/java/org/springframework/jdbc/object/BatchSqlUpdate.java index 6372990866..039e5c34f5 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/object/BatchSqlUpdate.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/object/BatchSqlUpdate.java @@ -184,11 +184,9 @@ public class BatchSqlUpdate extends SqlUpdate { int[] rowsAffected = getJdbcTemplate().batchUpdate( getSql(), new BatchPreparedStatementSetter() { - @Override public int getBatchSize() { return parameterQueue.size(); } - @Override public void setValues(PreparedStatement ps, int index) throws SQLException { Object[] params = parameterQueue.removeFirst(); newPreparedStatementSetter(params).setValues(ps); diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/object/GenericSqlQuery.java b/spring-jdbc/src/main/java/org/springframework/jdbc/object/GenericSqlQuery.java index 3b0b7342bf..1cf222e002 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/object/GenericSqlQuery.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/object/GenericSqlQuery.java @@ -37,13 +37,11 @@ public class GenericSqlQuery extends SqlQuery { "'org.springframework.jdbc.core.RowMapper'"); } - @Override public void afterPropertiesSet() { super.afterPropertiesSet(); Assert.notNull(rowMapperClass, "The 'rowMapperClass' property is required"); } - @Override protected RowMapper newRowMapper(Object[] parameters, Map context) { try { return (RowMapper) rowMapperClass.newInstance(); diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/object/MappingSqlQueryWithParameters.java b/spring-jdbc/src/main/java/org/springframework/jdbc/object/MappingSqlQueryWithParameters.java index 37db4a54ce..6e8355e639 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/object/MappingSqlQueryWithParameters.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/object/MappingSqlQueryWithParameters.java @@ -111,7 +111,6 @@ public abstract class MappingSqlQueryWithParameters extends SqlQuery { this.context = context; } - @Override public T mapRow(ResultSet rs, int rowNum) throws SQLException { return MappingSqlQueryWithParameters.this.mapRow(rs, rowNum, this.params, this.context); } diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/object/RdbmsOperation.java b/spring-jdbc/src/main/java/org/springframework/jdbc/object/RdbmsOperation.java index 6067251bac..f2d0bb58a0 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/object/RdbmsOperation.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/object/RdbmsOperation.java @@ -313,7 +313,6 @@ public abstract class RdbmsOperation implements InitializingBean { /** * Ensures compilation if used in a bean factory. */ - @Override public void afterPropertiesSet() { compile(); } diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/object/UpdatableSqlQuery.java b/spring-jdbc/src/main/java/org/springframework/jdbc/object/UpdatableSqlQuery.java index 3ceb131d7f..90603687a1 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/object/UpdatableSqlQuery.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/object/UpdatableSqlQuery.java @@ -94,7 +94,6 @@ public abstract class UpdatableSqlQuery extends SqlQuery { this.context = context; } - @Override public T mapRow(ResultSet rs, int rowNum) throws SQLException { T result = updateRow(rs, rowNum, this.context); rs.updateRow(); diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/AbstractFallbackSQLExceptionTranslator.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/AbstractFallbackSQLExceptionTranslator.java index 6e4c548eab..7b6d91814c 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/AbstractFallbackSQLExceptionTranslator.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/AbstractFallbackSQLExceptionTranslator.java @@ -60,7 +60,6 @@ public abstract class AbstractFallbackSQLExceptionTranslator implements SQLExcep * Pre-checks the arguments, calls {@link #doTranslate}, and invokes the * {@link #getFallbackTranslator() fallback translator} if necessary. */ - @Override public DataAccessException translate(String task, String sql, SQLException ex) { Assert.notNull(ex, "Cannot translate a null SQLException"); if (task == null) { diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/CustomSQLExceptionTranslatorRegistrar.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/CustomSQLExceptionTranslatorRegistrar.java index 2faaaba18e..668022162d 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/CustomSQLExceptionTranslatorRegistrar.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/CustomSQLExceptionTranslatorRegistrar.java @@ -48,7 +48,6 @@ public class CustomSQLExceptionTranslatorRegistrar implements InitializingBean { this.translators.putAll(translators); } - @Override public void afterPropertiesSet() { for (String dbName : this.translators.keySet()) { CustomSQLExceptionTranslatorRegistry.getInstance().registerTranslator(dbName, this.translators.get(dbName)); diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/DatabaseStartupValidator.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/DatabaseStartupValidator.java index 738709acc6..f1858ac576 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/DatabaseStartupValidator.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/DatabaseStartupValidator.java @@ -93,7 +93,6 @@ public class DatabaseStartupValidator implements InitializingBean { * from the specified DataSource, with the specified interval between * checks, until the specified timeout. */ - @Override public void afterPropertiesSet() { if (this.dataSource == null) { throw new IllegalArgumentException("dataSource is required"); diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/GeneratedKeyHolder.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/GeneratedKeyHolder.java index abdab1e872..389a3fc2c3 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/GeneratedKeyHolder.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/GeneratedKeyHolder.java @@ -57,7 +57,6 @@ public class GeneratedKeyHolder implements KeyHolder { } - @Override public Number getKey() throws InvalidDataAccessApiUsageException, DataRetrievalFailureException { if (this.keyList.size() == 0) { return null; @@ -84,7 +83,6 @@ public class GeneratedKeyHolder implements KeyHolder { } } - @Override public Map getKeys() throws InvalidDataAccessApiUsageException { if (this.keyList.size() == 0) { return null; @@ -96,7 +94,6 @@ public class GeneratedKeyHolder implements KeyHolder { return this.keyList.get(0); } - @Override public List> getKeyList() { return this.keyList; } diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/JdbcAccessor.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/JdbcAccessor.java index f383a4d833..89940f0cf2 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/JdbcAccessor.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/JdbcAccessor.java @@ -129,7 +129,6 @@ public abstract class JdbcAccessor implements InitializingBean { * Eagerly initialize the exception translator, if demanded, * creating a default one for the specified DataSource if none set. */ - @Override public void afterPropertiesSet() { if (getDataSource() == null) { throw new IllegalArgumentException("Property 'dataSource' is required"); diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/JdbcUtils.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/JdbcUtils.java index 8e682e1315..95f2ee3643 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/JdbcUtils.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/JdbcUtils.java @@ -319,7 +319,6 @@ public abstract class JdbcUtils { return extractDatabaseMetaData(dataSource, new DatabaseMetaDataCallback() { - @Override public Object processMetaData(DatabaseMetaData dbmd) throws SQLException, MetaDataAccessException { try { Method method = DatabaseMetaData.class.getMethod(metaDataMethodName, (Class[]) null); diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/AbstractDataFieldMaxValueIncrementer.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/AbstractDataFieldMaxValueIncrementer.java index 933c166a62..3fd0d80f68 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/AbstractDataFieldMaxValueIncrementer.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/AbstractDataFieldMaxValueIncrementer.java @@ -107,7 +107,6 @@ public abstract class AbstractDataFieldMaxValueIncrementer implements DataFieldM return this.paddingLength; } - @Override public void afterPropertiesSet() { if (this.dataSource == null) { throw new IllegalArgumentException("Property 'dataSource' is required"); @@ -118,17 +117,14 @@ public abstract class AbstractDataFieldMaxValueIncrementer implements DataFieldM } - @Override public int nextIntValue() throws DataAccessException { return (int) getNextKey(); } - @Override public long nextLongValue() throws DataAccessException { return getNextKey(); } - @Override public String nextStringValue() throws DataAccessException { String s = Long.toString(getNextKey()); int len = s.length(); diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/AbstractLobHandler.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/AbstractLobHandler.java index d55e85176c..062ffd9061 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/AbstractLobHandler.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/AbstractLobHandler.java @@ -33,27 +33,22 @@ import java.sql.SQLException; */ public abstract class AbstractLobHandler implements LobHandler { - @Override public byte[] getBlobAsBytes(ResultSet rs, String columnName) throws SQLException { return getBlobAsBytes(rs, rs.findColumn(columnName)); } - @Override public InputStream getBlobAsBinaryStream(ResultSet rs, String columnName) throws SQLException { return getBlobAsBinaryStream(rs, rs.findColumn(columnName)); } - @Override public String getClobAsString(ResultSet rs, String columnName) throws SQLException { return getClobAsString(rs, rs.findColumn(columnName)); } - @Override public InputStream getClobAsAsciiStream(ResultSet rs, String columnName) throws SQLException { return getClobAsAsciiStream(rs, rs.findColumn(columnName)); } - @Override public Reader getClobAsCharacterStream(ResultSet rs, String columnName) throws SQLException { return getClobAsCharacterStream(rs, rs.findColumn(columnName)); } diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/DefaultLobHandler.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/DefaultLobHandler.java index f95b5492f9..6964172e96 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/DefaultLobHandler.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/DefaultLobHandler.java @@ -113,7 +113,6 @@ public class DefaultLobHandler extends AbstractLobHandler { } - @Override public byte[] getBlobAsBytes(ResultSet rs, int columnIndex) throws SQLException { logger.debug("Returning BLOB as bytes"); if (this.wrapAsLob) { @@ -125,7 +124,6 @@ public class DefaultLobHandler extends AbstractLobHandler { } } - @Override public InputStream getBlobAsBinaryStream(ResultSet rs, int columnIndex) throws SQLException { logger.debug("Returning BLOB as binary stream"); if (this.wrapAsLob) { @@ -137,7 +135,6 @@ public class DefaultLobHandler extends AbstractLobHandler { } } - @Override public String getClobAsString(ResultSet rs, int columnIndex) throws SQLException { logger.debug("Returning CLOB as string"); if (this.wrapAsLob) { @@ -149,7 +146,6 @@ public class DefaultLobHandler extends AbstractLobHandler { } } - @Override public InputStream getClobAsAsciiStream(ResultSet rs, int columnIndex) throws SQLException { logger.debug("Returning CLOB as ASCII stream"); if (this.wrapAsLob) { @@ -161,7 +157,6 @@ public class DefaultLobHandler extends AbstractLobHandler { } } - @Override public Reader getClobAsCharacterStream(ResultSet rs, int columnIndex) throws SQLException { logger.debug("Returning CLOB as character stream"); if (this.wrapAsLob) { @@ -173,7 +168,6 @@ public class DefaultLobHandler extends AbstractLobHandler { } } - @Override public LobCreator getLobCreator() { return new DefaultLobCreator(); } @@ -185,7 +179,6 @@ public class DefaultLobHandler extends AbstractLobHandler { */ protected class DefaultLobCreator implements LobCreator { - @Override public void setBlobAsBytes(PreparedStatement ps, int paramIndex, byte[] content) throws SQLException { @@ -214,7 +207,6 @@ public class DefaultLobHandler extends AbstractLobHandler { } } - @Override public void setBlobAsBinaryStream( PreparedStatement ps, int paramIndex, InputStream binaryStream, int contentLength) throws SQLException { @@ -244,7 +236,6 @@ public class DefaultLobHandler extends AbstractLobHandler { } } - @Override public void setClobAsString(PreparedStatement ps, int paramIndex, String content) throws SQLException { @@ -273,7 +264,6 @@ public class DefaultLobHandler extends AbstractLobHandler { } } - @Override public void setClobAsAsciiStream( PreparedStatement ps, int paramIndex, InputStream asciiStream, int contentLength) throws SQLException { @@ -305,7 +295,6 @@ public class DefaultLobHandler extends AbstractLobHandler { } } - @Override public void setClobAsCharacterStream( PreparedStatement ps, int paramIndex, Reader characterStream, int contentLength) throws SQLException { @@ -335,7 +324,6 @@ public class DefaultLobHandler extends AbstractLobHandler { } } - @Override public void close() { // nothing to do here } diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/JtaLobCreatorSynchronization.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/JtaLobCreatorSynchronization.java index 80ae5d1ea6..19c85608c3 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/JtaLobCreatorSynchronization.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/JtaLobCreatorSynchronization.java @@ -46,7 +46,6 @@ public class JtaLobCreatorSynchronization implements Synchronization { this.lobCreator = lobCreator; } - @Override public void beforeCompletion() { // Close the LobCreator early if possible, to avoid issues with strict JTA // implementations that issue warnings when doing JDBC operations after @@ -55,7 +54,6 @@ public class JtaLobCreatorSynchronization implements Synchronization { this.lobCreator.close(); } - @Override public void afterCompletion(int status) { if (!this.beforeCompletionCalled) { // beforeCompletion not called before (probably because of JTA rollback). diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/LobCreator.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/LobCreator.java index 8bee169c79..ad0e3719e3 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/LobCreator.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/LobCreator.java @@ -135,7 +135,6 @@ public interface LobCreator extends Closeable { * been executed or the affected O/R mapping sessions have been flushed. * Otherwise, the database resources for the temporary BLOBs might stay allocated. */ - @Override void close(); } diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/OracleLobHandler.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/OracleLobHandler.java index d67f00685a..5399cf9c91 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/OracleLobHandler.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/OracleLobHandler.java @@ -211,7 +211,6 @@ public class OracleLobHandler extends AbstractLobHandler { } - @Override public byte[] getBlobAsBytes(ResultSet rs, int columnIndex) throws SQLException { logger.debug("Returning Oracle BLOB as bytes"); Blob blob = rs.getBlob(columnIndex); @@ -221,7 +220,6 @@ public class OracleLobHandler extends AbstractLobHandler { return retVal; } - @Override public InputStream getBlobAsBinaryStream(ResultSet rs, int columnIndex) throws SQLException { logger.debug("Returning Oracle BLOB as binary stream"); Blob blob = rs.getBlob(columnIndex); @@ -231,7 +229,6 @@ public class OracleLobHandler extends AbstractLobHandler { return retVal; } - @Override public String getClobAsString(ResultSet rs, int columnIndex) throws SQLException { logger.debug("Returning Oracle CLOB as string"); Clob clob = rs.getClob(columnIndex); @@ -241,7 +238,6 @@ public class OracleLobHandler extends AbstractLobHandler { return retVal; } - @Override public InputStream getClobAsAsciiStream(ResultSet rs, int columnIndex) throws SQLException { logger.debug("Returning Oracle CLOB as ASCII stream"); Clob clob = rs.getClob(columnIndex); @@ -251,7 +247,6 @@ public class OracleLobHandler extends AbstractLobHandler { return retVal; } - @Override public Reader getClobAsCharacterStream(ResultSet rs, int columnIndex) throws SQLException { logger.debug("Returning Oracle CLOB as character stream"); Clob clob = rs.getClob(columnIndex); @@ -261,7 +256,6 @@ public class OracleLobHandler extends AbstractLobHandler { return retVal; } - @Override public LobCreator getLobCreator() { return new OracleLobCreator(); } @@ -374,13 +368,11 @@ public class OracleLobHandler extends AbstractLobHandler { private final List createdLobs = new LinkedList(); - @Override public void setBlobAsBytes(PreparedStatement ps, int paramIndex, final byte[] content) throws SQLException { if (content != null) { Blob blob = (Blob) createLob(ps, false, new LobCallback() { - @Override public void populateLob(Object lob) throws Exception { Method methodToInvoke = lob.getClass().getMethod("getBinaryOutputStream"); OutputStream out = (OutputStream) methodToInvoke.invoke(lob); @@ -398,14 +390,12 @@ public class OracleLobHandler extends AbstractLobHandler { } } - @Override public void setBlobAsBinaryStream( PreparedStatement ps, int paramIndex, final InputStream binaryStream, int contentLength) throws SQLException { if (binaryStream != null) { Blob blob = (Blob) createLob(ps, false, new LobCallback() { - @Override public void populateLob(Object lob) throws Exception { Method methodToInvoke = lob.getClass().getMethod("getBinaryOutputStream", (Class[]) null); OutputStream out = (OutputStream) methodToInvoke.invoke(lob, (Object[]) null); @@ -423,13 +413,11 @@ public class OracleLobHandler extends AbstractLobHandler { } } - @Override public void setClobAsString(PreparedStatement ps, int paramIndex, final String content) throws SQLException { if (content != null) { Clob clob = (Clob) createLob(ps, true, new LobCallback() { - @Override public void populateLob(Object lob) throws Exception { Method methodToInvoke = lob.getClass().getMethod("getCharacterOutputStream", (Class[]) null); Writer writer = (Writer) methodToInvoke.invoke(lob, (Object[]) null); @@ -447,14 +435,12 @@ public class OracleLobHandler extends AbstractLobHandler { } } - @Override public void setClobAsAsciiStream( PreparedStatement ps, int paramIndex, final InputStream asciiStream, int contentLength) throws SQLException { if (asciiStream != null) { Clob clob = (Clob) createLob(ps, true, new LobCallback() { - @Override public void populateLob(Object lob) throws Exception { Method methodToInvoke = lob.getClass().getMethod("getAsciiOutputStream", (Class[]) null); OutputStream out = (OutputStream) methodToInvoke.invoke(lob, (Object[]) null); @@ -472,14 +458,12 @@ public class OracleLobHandler extends AbstractLobHandler { } } - @Override public void setClobAsCharacterStream( PreparedStatement ps, int paramIndex, final Reader characterStream, int contentLength) throws SQLException { if (characterStream != null) { Clob clob = (Clob) createLob(ps, true, new LobCallback() { - @Override public void populateLob(Object lob) throws Exception { Method methodToInvoke = lob.getClass().getMethod("getCharacterOutputStream", (Class[]) null); Writer writer = (Writer) methodToInvoke.invoke(lob, (Object[]) null); @@ -570,7 +554,6 @@ public class OracleLobHandler extends AbstractLobHandler { /** * Free all temporary BLOBs and CLOBs created by this creator. */ - @Override public void close() { try { for (Iterator it = this.createdLobs.iterator(); it.hasNext();) { diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/PassThroughBlob.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/PassThroughBlob.java index d55a0fd5c2..8d4a653c4b 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/PassThroughBlob.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/PassThroughBlob.java @@ -49,58 +49,47 @@ class PassThroughBlob implements Blob { } - @Override public long length() throws SQLException { return this.contentLength; } - @Override public InputStream getBinaryStream() throws SQLException { return (this.content != null ? new ByteArrayInputStream(this.content) : this.binaryStream); } - @Override public InputStream getBinaryStream(long pos, long length) throws SQLException { throw new UnsupportedOperationException(); } - @Override public OutputStream setBinaryStream(long pos) throws SQLException { throw new UnsupportedOperationException(); } - @Override public byte[] getBytes(long pos, int length) throws SQLException { throw new UnsupportedOperationException(); } - @Override public int setBytes(long pos, byte[] bytes) throws SQLException { throw new UnsupportedOperationException(); } - @Override public int setBytes(long pos, byte[] bytes, int offset, int len) throws SQLException { throw new UnsupportedOperationException(); } - @Override public long position(byte pattern[], long start) throws SQLException { throw new UnsupportedOperationException(); } - @Override public long position(Blob pattern, long start) throws SQLException { throw new UnsupportedOperationException(); } - @Override public void truncate(long len) throws SQLException { throw new UnsupportedOperationException(); } - @Override public void free() throws SQLException { // no-op } diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/PassThroughClob.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/PassThroughClob.java index 82e5d004ac..05c6a96f6f 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/PassThroughClob.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/PassThroughClob.java @@ -64,12 +64,10 @@ class PassThroughClob implements Clob { } - @Override public long length() throws SQLException { return this.contentLength; } - @Override public Reader getCharacterStream() throws SQLException { try { if (this.content != null) { @@ -87,7 +85,6 @@ class PassThroughClob implements Clob { } } - @Override public InputStream getAsciiStream() throws SQLException { try { if (this.content != null) { @@ -110,52 +107,42 @@ class PassThroughClob implements Clob { } - @Override public Reader getCharacterStream(long pos, long length) throws SQLException { throw new UnsupportedOperationException(); } - @Override public Writer setCharacterStream(long pos) throws SQLException { throw new UnsupportedOperationException(); } - @Override public OutputStream setAsciiStream(long pos) throws SQLException { throw new UnsupportedOperationException(); } - @Override public String getSubString(long pos, int length) throws SQLException { throw new UnsupportedOperationException(); } - @Override public int setString(long pos, String str) throws SQLException { throw new UnsupportedOperationException(); } - @Override public int setString(long pos, String str, int offset, int len) throws SQLException { throw new UnsupportedOperationException(); } - @Override public long position(String searchstr, long start) throws SQLException { throw new UnsupportedOperationException(); } - @Override public long position(Clob searchstr, long start) throws SQLException { throw new UnsupportedOperationException(); } - @Override public void truncate(long len) throws SQLException { throw new UnsupportedOperationException(); } - @Override public void free() throws SQLException { // no-op } diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/NativeJdbcExtractorAdapter.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/NativeJdbcExtractorAdapter.java index 60d859b715..2614338bec 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/NativeJdbcExtractorAdapter.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/NativeJdbcExtractorAdapter.java @@ -61,7 +61,6 @@ public abstract class NativeJdbcExtractorAdapter implements NativeJdbcExtractor /** * Return {@code false} by default. */ - @Override public boolean isNativeConnectionNecessaryForNativeStatements() { return false; } @@ -69,7 +68,6 @@ public abstract class NativeJdbcExtractorAdapter implements NativeJdbcExtractor /** * Return {@code false} by default. */ - @Override public boolean isNativeConnectionNecessaryForNativePreparedStatements() { return false; } @@ -77,7 +75,6 @@ public abstract class NativeJdbcExtractorAdapter implements NativeJdbcExtractor /** * Return {@code false} by default. */ - @Override public boolean isNativeConnectionNecessaryForNativeCallableStatements() { return false; } @@ -94,7 +91,6 @@ public abstract class NativeJdbcExtractorAdapter implements NativeJdbcExtractor * @see org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy * @see org.springframework.jdbc.datasource.LazyConnectionDataSourceProxy */ - @Override public Connection getNativeConnection(Connection con) throws SQLException { if (con == null) { return null; @@ -132,7 +128,6 @@ public abstract class NativeJdbcExtractorAdapter implements NativeJdbcExtractor * @see #getNativeConnection * @see Statement#getConnection */ - @Override public Connection getNativeConnectionFromStatement(Statement stmt) throws SQLException { if (stmt == null) { return null; @@ -143,7 +138,6 @@ public abstract class NativeJdbcExtractorAdapter implements NativeJdbcExtractor /** * Not able to unwrap: return passed-in Statement. */ - @Override public Statement getNativeStatement(Statement stmt) throws SQLException { return stmt; } @@ -151,7 +145,6 @@ public abstract class NativeJdbcExtractorAdapter implements NativeJdbcExtractor /** * Not able to unwrap: return passed-in PreparedStatement. */ - @Override public PreparedStatement getNativePreparedStatement(PreparedStatement ps) throws SQLException { return ps; } @@ -159,7 +152,6 @@ public abstract class NativeJdbcExtractorAdapter implements NativeJdbcExtractor /** * Not able to unwrap: return passed-in CallableStatement. */ - @Override public CallableStatement getNativeCallableStatement(CallableStatement cs) throws SQLException { return cs; } @@ -167,7 +159,6 @@ public abstract class NativeJdbcExtractorAdapter implements NativeJdbcExtractor /** * Not able to unwrap: return passed-in ResultSet. */ - @Override public ResultSet getNativeResultSet(ResultSet rs) throws SQLException { return rs; } diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/rowset/ResultSetWrappingSqlRowSet.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/rowset/ResultSetWrappingSqlRowSet.java index 96d66dfbfd..69f10432e4 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/rowset/ResultSetWrappingSqlRowSet.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/rowset/ResultSetWrappingSqlRowSet.java @@ -125,7 +125,6 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { /** * @see java.sql.ResultSetMetaData#getCatalogName(int) */ - @Override public final SqlRowSetMetaData getMetaData() { return this.rowSetMetaData; } @@ -133,7 +132,6 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { /** * @see java.sql.ResultSet#findColumn(String) */ - @Override public int findColumn(String columnLabel) throws InvalidResultSetAccessException { Integer columnIndex = this.columnLabelMap.get(columnLabel); if (columnIndex != null) { @@ -155,7 +153,6 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { /** * @see java.sql.ResultSet#getBigDecimal(int) */ - @Override public BigDecimal getBigDecimal(int columnIndex) throws InvalidResultSetAccessException { try { return this.resultSet.getBigDecimal(columnIndex); @@ -168,7 +165,6 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { /** * @see java.sql.ResultSet#getBigDecimal(String) */ - @Override public BigDecimal getBigDecimal(String columnLabel) throws InvalidResultSetAccessException { return getBigDecimal(findColumn(columnLabel)); } @@ -176,7 +172,6 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { /** * @see java.sql.ResultSet#getBoolean(int) */ - @Override public boolean getBoolean(int columnIndex) throws InvalidResultSetAccessException { try { return this.resultSet.getBoolean(columnIndex); @@ -189,7 +184,6 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { /** * @see java.sql.ResultSet#getBoolean(String) */ - @Override public boolean getBoolean(String columnLabel) throws InvalidResultSetAccessException { return getBoolean(findColumn(columnLabel)); } @@ -197,7 +191,6 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { /** * @see java.sql.ResultSet#getByte(int) */ - @Override public byte getByte(int columnIndex) throws InvalidResultSetAccessException { try { return this.resultSet.getByte(columnIndex); @@ -210,7 +203,6 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { /** * @see java.sql.ResultSet#getByte(String) */ - @Override public byte getByte(String columnLabel) throws InvalidResultSetAccessException { return getByte(findColumn(columnLabel)); } @@ -218,7 +210,6 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { /** * @see java.sql.ResultSet#getDate(int, java.util.Calendar) */ - @Override public Date getDate(int columnIndex, Calendar cal) throws InvalidResultSetAccessException { try { return this.resultSet.getDate(columnIndex, cal); @@ -231,7 +222,6 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { /** * @see java.sql.ResultSet#getDate(int) */ - @Override public Date getDate(int columnIndex) throws InvalidResultSetAccessException { try { return this.resultSet.getDate(columnIndex); @@ -243,7 +233,6 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { /** * @see java.sql.ResultSet#getDate(String, java.util.Calendar) */ - @Override public Date getDate(String columnLabel, Calendar cal) throws InvalidResultSetAccessException { return getDate(findColumn(columnLabel), cal); } @@ -251,7 +240,6 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { /** * @see java.sql.ResultSet#getDate(String) */ - @Override public Date getDate(String columnLabel) throws InvalidResultSetAccessException { return getDate(findColumn(columnLabel)); } @@ -259,7 +247,6 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { /** * @see java.sql.ResultSet#getDouble(int) */ - @Override public double getDouble(int columnIndex) throws InvalidResultSetAccessException { try { return this.resultSet.getDouble(columnIndex); @@ -272,7 +259,6 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { /** * @see java.sql.ResultSet#getDouble(String) */ - @Override public double getDouble(String columnLabel) throws InvalidResultSetAccessException { return getDouble(findColumn(columnLabel)); } @@ -280,7 +266,6 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { /** * @see java.sql.ResultSet#getFloat(int) */ - @Override public float getFloat(int columnIndex) throws InvalidResultSetAccessException { try { return this.resultSet.getFloat(columnIndex); @@ -293,14 +278,12 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { /** * @see java.sql.ResultSet#getFloat(String) */ - @Override public float getFloat(String columnLabel) throws InvalidResultSetAccessException { return getFloat(findColumn(columnLabel)); } /** * @see java.sql.ResultSet#getInt(int) */ - @Override public int getInt(int columnIndex) throws InvalidResultSetAccessException { try { return this.resultSet.getInt(columnIndex); @@ -313,7 +296,6 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { /** * @see java.sql.ResultSet#getInt(String) */ - @Override public int getInt(String columnLabel) throws InvalidResultSetAccessException { return getInt(findColumn(columnLabel)); } @@ -321,7 +303,6 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { /** * @see java.sql.ResultSet#getLong(int) */ - @Override public long getLong(int columnIndex) throws InvalidResultSetAccessException { try { return this.resultSet.getLong(columnIndex); @@ -334,7 +315,6 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { /** * @see java.sql.ResultSet#getLong(String) */ - @Override public long getLong(String columnLabel) throws InvalidResultSetAccessException { return getLong(findColumn(columnLabel)); } @@ -342,7 +322,6 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { /** * @see java.sql.ResultSet#getObject(int, java.util.Map) */ - @Override public Object getObject(int i, Map> map) throws InvalidResultSetAccessException { try { return this.resultSet.getObject(i, map); @@ -355,7 +334,6 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { /** * @see java.sql.ResultSet#getObject(int) */ - @Override public Object getObject(int columnIndex) throws InvalidResultSetAccessException { try { return this.resultSet.getObject(columnIndex); @@ -368,7 +346,6 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { /** * @see java.sql.ResultSet#getObject(String, java.util.Map) */ - @Override public Object getObject(String columnLabel, Map> map) throws InvalidResultSetAccessException { return getObject(findColumn(columnLabel), map); } @@ -376,7 +353,6 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { /** * @see java.sql.ResultSet#getObject(String) */ - @Override public Object getObject(String columnLabel) throws InvalidResultSetAccessException { return getObject(findColumn(columnLabel)); } @@ -384,7 +360,6 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { /** * @see java.sql.ResultSet#getShort(int) */ - @Override public short getShort(int columnIndex) throws InvalidResultSetAccessException { try { return this.resultSet.getShort(columnIndex); @@ -397,7 +372,6 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { /** * @see java.sql.ResultSet#getShort(String) */ - @Override public short getShort(String columnLabel) throws InvalidResultSetAccessException { return getShort(findColumn(columnLabel)); } @@ -405,7 +379,6 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { /** * @see java.sql.ResultSet#getString(int) */ - @Override public String getString(int columnIndex) throws InvalidResultSetAccessException { try { return this.resultSet.getString(columnIndex); @@ -418,7 +391,6 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { /** * @see java.sql.ResultSet#getString(String) */ - @Override public String getString(String columnLabel) throws InvalidResultSetAccessException { return getString(findColumn(columnLabel)); } @@ -426,7 +398,6 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { /** * @see java.sql.ResultSet#getTime(int, java.util.Calendar) */ - @Override public Time getTime(int columnIndex, Calendar cal) throws InvalidResultSetAccessException { try { return this.resultSet.getTime(columnIndex, cal); @@ -439,7 +410,6 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { /** * @see java.sql.ResultSet#getTime(int) */ - @Override public Time getTime(int columnIndex) throws InvalidResultSetAccessException { try { return this.resultSet.getTime(columnIndex); @@ -452,7 +422,6 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { /** * @see java.sql.ResultSet#getTime(String, java.util.Calendar) */ - @Override public Time getTime(String columnLabel, Calendar cal) throws InvalidResultSetAccessException { return getTime(findColumn(columnLabel), cal); } @@ -460,7 +429,6 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { /** * @see java.sql.ResultSet#getTime(String) */ - @Override public Time getTime(String columnLabel) throws InvalidResultSetAccessException { return getTime(findColumn(columnLabel)); } @@ -468,7 +436,6 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { /** * @see java.sql.ResultSet#getTimestamp(int, java.util.Calendar) */ - @Override public Timestamp getTimestamp(int columnIndex, Calendar cal) throws InvalidResultSetAccessException { try { return this.resultSet.getTimestamp(columnIndex, cal); @@ -481,7 +448,6 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { /** * @see java.sql.ResultSet#getTimestamp(int) */ - @Override public Timestamp getTimestamp(int columnIndex) throws InvalidResultSetAccessException { try { return this.resultSet.getTimestamp(columnIndex); @@ -494,7 +460,6 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { /** * @see java.sql.ResultSet#getTimestamp(String, java.util.Calendar) */ - @Override public Timestamp getTimestamp(String columnLabel, Calendar cal) throws InvalidResultSetAccessException { return getTimestamp(findColumn(columnLabel), cal); } @@ -502,7 +467,6 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { /** * @see java.sql.ResultSet#getTimestamp(String) */ - @Override public Timestamp getTimestamp(String columnLabel) throws InvalidResultSetAccessException { return getTimestamp(findColumn(columnLabel)); } @@ -513,7 +477,6 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { /** * @see java.sql.ResultSet#absolute(int) */ - @Override public boolean absolute(int row) throws InvalidResultSetAccessException { try { return this.resultSet.absolute(row); @@ -526,7 +489,6 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { /** * @see java.sql.ResultSet#afterLast() */ - @Override public void afterLast() throws InvalidResultSetAccessException { try { this.resultSet.afterLast(); @@ -539,7 +501,6 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { /** * @see java.sql.ResultSet#beforeFirst() */ - @Override public void beforeFirst() throws InvalidResultSetAccessException { try { this.resultSet.beforeFirst(); @@ -552,7 +513,6 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { /** * @see java.sql.ResultSet#first() */ - @Override public boolean first() throws InvalidResultSetAccessException { try { return this.resultSet.first(); @@ -565,7 +525,6 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { /** * @see java.sql.ResultSet#getRow() */ - @Override public int getRow() throws InvalidResultSetAccessException { try { return this.resultSet.getRow(); @@ -578,7 +537,6 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { /** * @see java.sql.ResultSet#isAfterLast() */ - @Override public boolean isAfterLast() throws InvalidResultSetAccessException { try { return this.resultSet.isAfterLast(); @@ -591,7 +549,6 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { /** * @see java.sql.ResultSet#isBeforeFirst() */ - @Override public boolean isBeforeFirst() throws InvalidResultSetAccessException { try { return this.resultSet.isBeforeFirst(); @@ -604,7 +561,6 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { /** * @see java.sql.ResultSet#isFirst() */ - @Override public boolean isFirst() throws InvalidResultSetAccessException { try { return this.resultSet.isFirst(); @@ -617,7 +573,6 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { /** * @see java.sql.ResultSet#isLast() */ - @Override public boolean isLast() throws InvalidResultSetAccessException { try { return this.resultSet.isLast(); @@ -630,7 +585,6 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { /** * @see java.sql.ResultSet#last() */ - @Override public boolean last() throws InvalidResultSetAccessException { try { return this.resultSet.last(); @@ -643,7 +597,6 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { /** * @see java.sql.ResultSet#next() */ - @Override public boolean next() throws InvalidResultSetAccessException { try { return this.resultSet.next(); @@ -656,7 +609,6 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { /** * @see java.sql.ResultSet#previous() */ - @Override public boolean previous() throws InvalidResultSetAccessException { try { return this.resultSet.previous(); @@ -669,7 +621,6 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { /** * @see java.sql.ResultSet#relative(int) */ - @Override public boolean relative(int rows) throws InvalidResultSetAccessException { try { return this.resultSet.relative(rows); @@ -682,7 +633,6 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { /** * @see java.sql.ResultSet#wasNull() */ - @Override public boolean wasNull() throws InvalidResultSetAccessException { try { return this.resultSet.wasNull(); diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/rowset/ResultSetWrappingSqlRowSetMetaData.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/rowset/ResultSetWrappingSqlRowSetMetaData.java index cf5f83dac5..31d9d9e14e 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/rowset/ResultSetWrappingSqlRowSetMetaData.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/rowset/ResultSetWrappingSqlRowSetMetaData.java @@ -55,7 +55,6 @@ public class ResultSetWrappingSqlRowSetMetaData implements SqlRowSetMetaData { } - @Override public String getCatalogName(int column) throws InvalidResultSetAccessException { try { return this.resultSetMetaData.getCatalogName(column); @@ -65,7 +64,6 @@ public class ResultSetWrappingSqlRowSetMetaData implements SqlRowSetMetaData { } } - @Override public String getColumnClassName(int column) throws InvalidResultSetAccessException { try { return this.resultSetMetaData.getColumnClassName(column); @@ -75,7 +73,6 @@ public class ResultSetWrappingSqlRowSetMetaData implements SqlRowSetMetaData { } } - @Override public int getColumnCount() throws InvalidResultSetAccessException { try { return this.resultSetMetaData.getColumnCount(); @@ -85,7 +82,6 @@ public class ResultSetWrappingSqlRowSetMetaData implements SqlRowSetMetaData { } } - @Override public String[] getColumnNames() throws InvalidResultSetAccessException { if (this.columnNames == null) { this.columnNames = new String[getColumnCount()]; @@ -96,7 +92,6 @@ public class ResultSetWrappingSqlRowSetMetaData implements SqlRowSetMetaData { return this.columnNames; } - @Override public int getColumnDisplaySize(int column) throws InvalidResultSetAccessException { try { return this.resultSetMetaData.getColumnDisplaySize(column); @@ -106,7 +101,6 @@ public class ResultSetWrappingSqlRowSetMetaData implements SqlRowSetMetaData { } } - @Override public String getColumnLabel(int column) throws InvalidResultSetAccessException { try { return this.resultSetMetaData.getColumnLabel(column); @@ -116,7 +110,6 @@ public class ResultSetWrappingSqlRowSetMetaData implements SqlRowSetMetaData { } } - @Override public String getColumnName(int column) throws InvalidResultSetAccessException { try { return this.resultSetMetaData.getColumnName(column); @@ -126,7 +119,6 @@ public class ResultSetWrappingSqlRowSetMetaData implements SqlRowSetMetaData { } } - @Override public int getColumnType(int column) throws InvalidResultSetAccessException { try { return this.resultSetMetaData.getColumnType(column); @@ -136,7 +128,6 @@ public class ResultSetWrappingSqlRowSetMetaData implements SqlRowSetMetaData { } } - @Override public String getColumnTypeName(int column) throws InvalidResultSetAccessException { try { return this.resultSetMetaData.getColumnTypeName(column); @@ -146,7 +137,6 @@ public class ResultSetWrappingSqlRowSetMetaData implements SqlRowSetMetaData { } } - @Override public int getPrecision(int column) throws InvalidResultSetAccessException { try { return this.resultSetMetaData.getPrecision(column); @@ -156,7 +146,6 @@ public class ResultSetWrappingSqlRowSetMetaData implements SqlRowSetMetaData { } } - @Override public int getScale(int column) throws InvalidResultSetAccessException { try { return this.resultSetMetaData.getScale(column); @@ -166,7 +155,6 @@ public class ResultSetWrappingSqlRowSetMetaData implements SqlRowSetMetaData { } } - @Override public String getSchemaName(int column) throws InvalidResultSetAccessException { try { return this.resultSetMetaData.getSchemaName(column); @@ -176,7 +164,6 @@ public class ResultSetWrappingSqlRowSetMetaData implements SqlRowSetMetaData { } } - @Override public String getTableName(int column) throws InvalidResultSetAccessException { try { return this.resultSetMetaData.getTableName(column); @@ -186,7 +173,6 @@ public class ResultSetWrappingSqlRowSetMetaData implements SqlRowSetMetaData { } } - @Override public boolean isCaseSensitive(int column) throws InvalidResultSetAccessException { try { return this.resultSetMetaData.isCaseSensitive(column); @@ -196,7 +182,6 @@ public class ResultSetWrappingSqlRowSetMetaData implements SqlRowSetMetaData { } } - @Override public boolean isCurrency(int column) throws InvalidResultSetAccessException { try { return this.resultSetMetaData.isCurrency(column); @@ -206,7 +191,6 @@ public class ResultSetWrappingSqlRowSetMetaData implements SqlRowSetMetaData { } } - @Override public boolean isSigned(int column) throws InvalidResultSetAccessException { try { return this.resultSetMetaData.isSigned(column); diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/xml/Jdbc4SqlXmlHandler.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/xml/Jdbc4SqlXmlHandler.java index ed9d66190c..13f0363377 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/xml/Jdbc4SqlXmlHandler.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/xml/Jdbc4SqlXmlHandler.java @@ -50,43 +50,35 @@ public class Jdbc4SqlXmlHandler implements SqlXmlHandler { // Convenience methods for accessing XML content //------------------------------------------------------------------------- - @Override public String getXmlAsString(ResultSet rs, String columnName) throws SQLException { return rs.getSQLXML(columnName).getString(); } - @Override public String getXmlAsString(ResultSet rs, int columnIndex) throws SQLException { return rs.getSQLXML(columnIndex).getString(); } - @Override public InputStream getXmlAsBinaryStream(ResultSet rs, String columnName) throws SQLException { return rs.getSQLXML(columnName).getBinaryStream(); } - @Override public InputStream getXmlAsBinaryStream(ResultSet rs, int columnIndex) throws SQLException { return rs.getSQLXML(columnIndex).getBinaryStream(); } - @Override public Reader getXmlAsCharacterStream(ResultSet rs, String columnName) throws SQLException { return rs.getSQLXML(columnName).getCharacterStream(); } - @Override public Reader getXmlAsCharacterStream(ResultSet rs, int columnIndex) throws SQLException { return rs.getSQLXML(columnIndex).getCharacterStream(); } - @Override @SuppressWarnings("unchecked") public Source getXmlAsSource(ResultSet rs, String columnName, Class sourceClass) throws SQLException { return rs.getSQLXML(columnName).getSource(sourceClass != null ? sourceClass : DOMSource.class); } - @Override @SuppressWarnings("unchecked") public Source getXmlAsSource(ResultSet rs, int columnIndex, Class sourceClass) throws SQLException { return rs.getSQLXML(columnIndex).getSource(sourceClass != null ? sourceClass : DOMSource.class); @@ -97,7 +89,6 @@ public class Jdbc4SqlXmlHandler implements SqlXmlHandler { // Convenience methods for building XML content //------------------------------------------------------------------------- - @Override public SqlXmlValue newSqlXmlValue(final String value) { return new AbstractJdbc4SqlXmlValue() { @Override @@ -107,7 +98,6 @@ public class Jdbc4SqlXmlHandler implements SqlXmlHandler { }; } - @Override public SqlXmlValue newSqlXmlValue(final XmlBinaryStreamProvider provider) { return new AbstractJdbc4SqlXmlValue() { @Override @@ -117,7 +107,6 @@ public class Jdbc4SqlXmlHandler implements SqlXmlHandler { }; } - @Override public SqlXmlValue newSqlXmlValue(final XmlCharacterStreamProvider provider) { return new AbstractJdbc4SqlXmlValue() { @Override @@ -127,7 +116,6 @@ public class Jdbc4SqlXmlHandler implements SqlXmlHandler { }; } - @Override public SqlXmlValue newSqlXmlValue(final Class resultClass, final XmlResultProvider provider) { return new AbstractJdbc4SqlXmlValue() { @Override @@ -138,7 +126,6 @@ public class Jdbc4SqlXmlHandler implements SqlXmlHandler { }; } - @Override public SqlXmlValue newSqlXmlValue(final Document document) { return new AbstractJdbc4SqlXmlValue() { @Override @@ -156,7 +143,6 @@ public class Jdbc4SqlXmlHandler implements SqlXmlHandler { private SQLXML xmlObject; - @Override public void setValue(PreparedStatement ps, int paramIndex) throws SQLException { this.xmlObject = ps.getConnection().createSQLXML(); try { @@ -168,7 +154,6 @@ public class Jdbc4SqlXmlHandler implements SqlXmlHandler { ps.setSQLXML(paramIndex, this.xmlObject); } - @Override public void cleanup() { try { this.xmlObject.free(); diff --git a/spring-jms/src/main/java/org/springframework/jms/JmsException.java b/spring-jms/src/main/java/org/springframework/jms/JmsException.java index b2d3a6f442..9da83d02ec 100644 --- a/spring-jms/src/main/java/org/springframework/jms/JmsException.java +++ b/spring-jms/src/main/java/org/springframework/jms/JmsException.java @@ -80,7 +80,6 @@ public abstract class JmsException extends NestedRuntimeException { * if there is one. * @see javax.jms.JMSException#getLinkedException() */ - @Override public String getMessage() { String message = super.getMessage(); Throwable cause = getCause(); diff --git a/spring-jms/src/main/java/org/springframework/jms/config/AbstractListenerContainerParser.java b/spring-jms/src/main/java/org/springframework/jms/config/AbstractListenerContainerParser.java index a69e172348..9407db27f4 100644 --- a/spring-jms/src/main/java/org/springframework/jms/config/AbstractListenerContainerParser.java +++ b/spring-jms/src/main/java/org/springframework/jms/config/AbstractListenerContainerParser.java @@ -88,7 +88,6 @@ abstract class AbstractListenerContainerParser implements BeanDefinitionParser { protected static final String PREFETCH_ATTRIBUTE = "prefetch"; - @Override public BeanDefinition parse(Element element, ParserContext parserContext) { CompositeComponentDefinition compositeDef = new CompositeComponentDefinition(element.getTagName(), parserContext.extractSource(element)); diff --git a/spring-jms/src/main/java/org/springframework/jms/config/JcaListenerContainerParser.java b/spring-jms/src/main/java/org/springframework/jms/config/JcaListenerContainerParser.java index 327c15b3e9..4c34748211 100644 --- a/spring-jms/src/main/java/org/springframework/jms/config/JcaListenerContainerParser.java +++ b/spring-jms/src/main/java/org/springframework/jms/config/JcaListenerContainerParser.java @@ -37,7 +37,6 @@ class JcaListenerContainerParser extends AbstractListenerContainerParser { private static final String ACTIVATION_SPEC_FACTORY_ATTRIBUTE = "activation-spec-factory"; - @Override protected BeanDefinition parseContainer(Element listenerEle, Element containerEle, ParserContext parserContext) { RootBeanDefinition containerDef = new RootBeanDefinition(); containerDef.setSource(parserContext.extractSource(containerEle)); diff --git a/spring-jms/src/main/java/org/springframework/jms/config/JmsListenerContainerParser.java b/spring-jms/src/main/java/org/springframework/jms/config/JmsListenerContainerParser.java index 68787b5f05..05ecd8b5de 100644 --- a/spring-jms/src/main/java/org/springframework/jms/config/JmsListenerContainerParser.java +++ b/spring-jms/src/main/java/org/springframework/jms/config/JmsListenerContainerParser.java @@ -50,7 +50,6 @@ class JmsListenerContainerParser extends AbstractListenerContainerParser { private static final String RECEIVE_TIMEOUT_ATTRIBUTE = "receive-timeout"; - @Override protected BeanDefinition parseContainer(Element listenerEle, Element containerEle, ParserContext parserContext) { RootBeanDefinition containerDef = new RootBeanDefinition(); containerDef.setSource(parserContext.extractSource(containerEle)); diff --git a/spring-jms/src/main/java/org/springframework/jms/config/JmsNamespaceHandler.java b/spring-jms/src/main/java/org/springframework/jms/config/JmsNamespaceHandler.java index 7b78bd093b..d4642a6bda 100644 --- a/spring-jms/src/main/java/org/springframework/jms/config/JmsNamespaceHandler.java +++ b/spring-jms/src/main/java/org/springframework/jms/config/JmsNamespaceHandler.java @@ -28,7 +28,6 @@ import org.springframework.beans.factory.xml.NamespaceHandlerSupport; */ public class JmsNamespaceHandler extends NamespaceHandlerSupport { - @Override public void init() { registerBeanDefinitionParser("listener-container", new JmsListenerContainerParser()); registerBeanDefinitionParser("jca-listener-container", new JcaListenerContainerParser()); diff --git a/spring-jms/src/main/java/org/springframework/jms/connection/CachedMessageConsumer.java b/spring-jms/src/main/java/org/springframework/jms/connection/CachedMessageConsumer.java index ce1a628351..ef2a3350f3 100644 --- a/spring-jms/src/main/java/org/springframework/jms/connection/CachedMessageConsumer.java +++ b/spring-jms/src/main/java/org/springframework/jms/connection/CachedMessageConsumer.java @@ -42,52 +42,42 @@ class CachedMessageConsumer implements MessageConsumer, QueueReceiver, TopicSubs } - @Override public String getMessageSelector() throws JMSException { return this.target.getMessageSelector(); } - @Override public Queue getQueue() throws JMSException { return (this.target instanceof QueueReceiver ? ((QueueReceiver) this.target).getQueue() : null); } - @Override public Topic getTopic() throws JMSException { return (this.target instanceof TopicSubscriber ? ((TopicSubscriber) this.target).getTopic() : null); } - @Override public boolean getNoLocal() throws JMSException { return (this.target instanceof TopicSubscriber && ((TopicSubscriber) this.target).getNoLocal()); } - @Override public MessageListener getMessageListener() throws JMSException { return this.target.getMessageListener(); } - @Override public void setMessageListener(MessageListener messageListener) throws JMSException { this.target.setMessageListener(messageListener); } - @Override public Message receive() throws JMSException { return this.target.receive(); } - @Override public Message receive(long timeout) throws JMSException { return this.target.receive(timeout); } - @Override public Message receiveNoWait() throws JMSException { return this.target.receiveNoWait(); } - @Override public void close() throws JMSException { // It's a cached MessageConsumer... } diff --git a/spring-jms/src/main/java/org/springframework/jms/connection/CachedMessageProducer.java b/spring-jms/src/main/java/org/springframework/jms/connection/CachedMessageProducer.java index 2b8e54726d..324ca6667d 100644 --- a/spring-jms/src/main/java/org/springframework/jms/connection/CachedMessageProducer.java +++ b/spring-jms/src/main/java/org/springframework/jms/connection/CachedMessageProducer.java @@ -55,7 +55,6 @@ class CachedMessageProducer implements MessageProducer, QueueSender, TopicPublis } - @Override public void setDisableMessageID(boolean disableMessageID) throws JMSException { if (this.originalDisableMessageID == null) { this.originalDisableMessageID = Boolean.valueOf(this.target.getDisableMessageID()); @@ -63,12 +62,10 @@ class CachedMessageProducer implements MessageProducer, QueueSender, TopicPublis this.target.setDisableMessageID(disableMessageID); } - @Override public boolean getDisableMessageID() throws JMSException { return this.target.getDisableMessageID(); } - @Override public void setDisableMessageTimestamp(boolean disableMessageTimestamp) throws JMSException { if (this.originalDisableMessageTimestamp == null) { this.originalDisableMessageTimestamp = Boolean.valueOf(this.target.getDisableMessageTimestamp()); @@ -76,107 +73,86 @@ class CachedMessageProducer implements MessageProducer, QueueSender, TopicPublis this.target.setDisableMessageTimestamp(disableMessageTimestamp); } - @Override public boolean getDisableMessageTimestamp() throws JMSException { return this.target.getDisableMessageTimestamp(); } - @Override public void setDeliveryMode(int deliveryMode) { this.deliveryMode = deliveryMode; } - @Override public int getDeliveryMode() { return this.deliveryMode; } - @Override public void setPriority(int priority) { this.priority = priority; } - @Override public int getPriority() { return this.priority; } - @Override public void setTimeToLive(long timeToLive) { this.timeToLive = timeToLive; } - @Override public long getTimeToLive() { return this.timeToLive; } - @Override public Destination getDestination() throws JMSException { return this.target.getDestination(); } - @Override public Queue getQueue() throws JMSException { return (Queue) this.target.getDestination(); } - @Override public Topic getTopic() throws JMSException { return (Topic) this.target.getDestination(); } - @Override public void send(Message message) throws JMSException { this.target.send(message, this.deliveryMode, this.priority, this.timeToLive); } - @Override public void send(Message message, int deliveryMode, int priority, long timeToLive) throws JMSException { this.target.send(message, deliveryMode, priority, timeToLive); } - @Override public void send(Destination destination, Message message) throws JMSException { this.target.send(destination, message, this.deliveryMode, this.priority, this.timeToLive); } - @Override public void send(Destination destination, Message message, int deliveryMode, int priority, long timeToLive) throws JMSException { this.target.send(destination, message, deliveryMode, priority, timeToLive); } - @Override public void send(Queue queue, Message message) throws JMSException { this.target.send(queue, message, this.deliveryMode, this.priority, this.timeToLive); } - @Override public void send(Queue queue, Message message, int deliveryMode, int priority, long timeToLive) throws JMSException { this.target.send(queue, message, deliveryMode, priority, timeToLive); } - @Override public void publish(Message message) throws JMSException { this.target.send(message, this.deliveryMode, this.priority, this.timeToLive); } - @Override public void publish(Message message, int deliveryMode, int priority, long timeToLive) throws JMSException { this.target.send(message, deliveryMode, priority, timeToLive); } - @Override public void publish(Topic topic, Message message) throws JMSException { this.target.send(topic, message, this.deliveryMode, this.priority, this.timeToLive); } - @Override public void publish(Topic topic, Message message, int deliveryMode, int priority, long timeToLive) throws JMSException { this.target.send(topic, message, deliveryMode, priority, timeToLive); } - @Override public void close() throws JMSException { // It's a cached MessageProducer... reset properties only. if (this.originalDisableMessageID != null) { diff --git a/spring-jms/src/main/java/org/springframework/jms/connection/CachingConnectionFactory.java b/spring-jms/src/main/java/org/springframework/jms/connection/CachingConnectionFactory.java index 9e0229c58e..367d8b804a 100644 --- a/spring-jms/src/main/java/org/springframework/jms/connection/CachingConnectionFactory.java +++ b/spring-jms/src/main/java/org/springframework/jms/connection/CachingConnectionFactory.java @@ -176,7 +176,6 @@ public class CachingConnectionFactory extends SingleConnectionFactory { /** * Resets the Session cache as well. */ - @Override public void resetConnection() { this.active = false; synchronized (this.cachedSessions) { @@ -203,7 +202,6 @@ public class CachingConnectionFactory extends SingleConnectionFactory { /** * Checks for a cached Session for the given mode. */ - @Override protected Session getSession(Connection con, Integer mode) throws JMSException { LinkedList sessionList; synchronized (this.cachedSessions) { @@ -281,7 +279,6 @@ public class CachingConnectionFactory extends SingleConnectionFactory { this.sessionList = sessionList; } - @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { String methodName = method.getName(); if (methodName.equals("equals")) { diff --git a/spring-jms/src/main/java/org/springframework/jms/connection/ChainedExceptionListener.java b/spring-jms/src/main/java/org/springframework/jms/connection/ChainedExceptionListener.java index 4ca40d842c..31f9ad675b 100644 --- a/spring-jms/src/main/java/org/springframework/jms/connection/ChainedExceptionListener.java +++ b/spring-jms/src/main/java/org/springframework/jms/connection/ChainedExceptionListener.java @@ -52,7 +52,6 @@ public class ChainedExceptionListener implements ExceptionListener { } - @Override public void onException(JMSException ex) { for (ExceptionListener listener : this.delegates) { listener.onException(ex); diff --git a/spring-jms/src/main/java/org/springframework/jms/connection/ConnectionFactoryUtils.java b/spring-jms/src/main/java/org/springframework/jms/connection/ConnectionFactoryUtils.java index 72f0497453..a668a1d62e 100644 --- a/spring-jms/src/main/java/org/springframework/jms/connection/ConnectionFactoryUtils.java +++ b/spring-jms/src/main/java/org/springframework/jms/connection/ConnectionFactoryUtils.java @@ -136,23 +136,18 @@ public abstract class ConnectionFactoryUtils { throws JMSException { return doGetTransactionalSession(cf, new ResourceFactory() { - @Override public Session getSession(JmsResourceHolder holder) { return holder.getSession(Session.class, existingCon); } - @Override public Connection getConnection(JmsResourceHolder holder) { return (existingCon != null ? existingCon : holder.getConnection()); } - @Override public Connection createConnection() throws JMSException { return cf.createConnection(); } - @Override public Session createSession(Connection con) throws JMSException { return con.createSession(synchedLocalTransactionAllowed, Session.AUTO_ACKNOWLEDGE); } - @Override public boolean isSynchedLocalTransactionAllowed() { return synchedLocalTransactionAllowed; } @@ -178,23 +173,18 @@ public abstract class ConnectionFactoryUtils { throws JMSException { return (QueueSession) doGetTransactionalSession(cf, new ResourceFactory() { - @Override public Session getSession(JmsResourceHolder holder) { return holder.getSession(QueueSession.class, existingCon); } - @Override public Connection getConnection(JmsResourceHolder holder) { return (existingCon != null ? existingCon : holder.getConnection(QueueConnection.class)); } - @Override public Connection createConnection() throws JMSException { return cf.createQueueConnection(); } - @Override public Session createSession(Connection con) throws JMSException { return ((QueueConnection) con).createQueueSession(synchedLocalTransactionAllowed, Session.AUTO_ACKNOWLEDGE); } - @Override public boolean isSynchedLocalTransactionAllowed() { return synchedLocalTransactionAllowed; } @@ -220,23 +210,18 @@ public abstract class ConnectionFactoryUtils { throws JMSException { return (TopicSession) doGetTransactionalSession(cf, new ResourceFactory() { - @Override public Session getSession(JmsResourceHolder holder) { return holder.getSession(TopicSession.class, existingCon); } - @Override public Connection getConnection(JmsResourceHolder holder) { return (existingCon != null ? existingCon : holder.getConnection(TopicConnection.class)); } - @Override public Connection createConnection() throws JMSException { return cf.createTopicConnection(); } - @Override public Session createSession(Connection con) throws JMSException { return ((TopicConnection) con).createTopicSession(synchedLocalTransactionAllowed, Session.AUTO_ACKNOWLEDGE); } - @Override public boolean isSynchedLocalTransactionAllowed() { return synchedLocalTransactionAllowed; } @@ -410,12 +395,10 @@ public abstract class ConnectionFactoryUtils { this.transacted = transacted; } - @Override protected boolean shouldReleaseBeforeCompletion() { return !this.transacted; } - @Override protected void processResourceAfterCommit(JmsResourceHolder resourceHolder) { try { resourceHolder.commitAll(); @@ -425,7 +408,6 @@ public abstract class ConnectionFactoryUtils { } } - @Override protected void releaseResource(JmsResourceHolder resourceHolder, Object resourceKey) { resourceHolder.closeAll(); } diff --git a/spring-jms/src/main/java/org/springframework/jms/connection/DelegatingConnectionFactory.java b/spring-jms/src/main/java/org/springframework/jms/connection/DelegatingConnectionFactory.java index 85a1a589de..e01bfec1f0 100644 --- a/spring-jms/src/main/java/org/springframework/jms/connection/DelegatingConnectionFactory.java +++ b/spring-jms/src/main/java/org/springframework/jms/connection/DelegatingConnectionFactory.java @@ -85,7 +85,6 @@ public class DelegatingConnectionFactory this.shouldStopConnections = shouldStopConnections; } - @Override public void afterPropertiesSet() { if (getTargetConnectionFactory() == null) { throw new IllegalArgumentException("'targetConnectionFactory' is required"); @@ -93,17 +92,14 @@ public class DelegatingConnectionFactory } - @Override public Connection createConnection() throws JMSException { return getTargetConnectionFactory().createConnection(); } - @Override public Connection createConnection(String username, String password) throws JMSException { return getTargetConnectionFactory().createConnection(username, password); } - @Override public QueueConnection createQueueConnection() throws JMSException { ConnectionFactory cf = getTargetConnectionFactory(); if (cf instanceof QueueConnectionFactory) { @@ -118,7 +114,6 @@ public class DelegatingConnectionFactory } } - @Override public QueueConnection createQueueConnection(String username, String password) throws JMSException { ConnectionFactory cf = getTargetConnectionFactory(); if (cf instanceof QueueConnectionFactory) { @@ -133,7 +128,6 @@ public class DelegatingConnectionFactory } } - @Override public TopicConnection createTopicConnection() throws JMSException { ConnectionFactory cf = getTargetConnectionFactory(); if (cf instanceof TopicConnectionFactory) { @@ -148,7 +142,6 @@ public class DelegatingConnectionFactory } } - @Override public TopicConnection createTopicConnection(String username, String password) throws JMSException { ConnectionFactory cf = getTargetConnectionFactory(); if (cf instanceof TopicConnectionFactory) { @@ -163,7 +156,6 @@ public class DelegatingConnectionFactory } } - @Override public boolean shouldStop(Connection con) { return this.shouldStopConnections; } diff --git a/spring-jms/src/main/java/org/springframework/jms/connection/JmsTransactionManager.java b/spring-jms/src/main/java/org/springframework/jms/connection/JmsTransactionManager.java index 3587b13582..28a683c8f5 100644 --- a/spring-jms/src/main/java/org/springframework/jms/connection/JmsTransactionManager.java +++ b/spring-jms/src/main/java/org/springframework/jms/connection/JmsTransactionManager.java @@ -146,7 +146,6 @@ public class JmsTransactionManager extends AbstractPlatformTransactionManager /** * Make sure the ConnectionFactory has been set. */ - @Override public void afterPropertiesSet() { if (getConnectionFactory() == null) { throw new IllegalArgumentException("Property 'connectionFactory' is required"); @@ -154,12 +153,10 @@ public class JmsTransactionManager extends AbstractPlatformTransactionManager } - @Override public Object getResourceFactory() { return getConnectionFactory(); } - @Override protected Object doGetTransaction() { JmsTransactionObject txObject = new JmsTransactionObject(); txObject.setResourceHolder( @@ -167,13 +164,11 @@ public class JmsTransactionManager extends AbstractPlatformTransactionManager return txObject; } - @Override protected boolean isExistingTransaction(Object transaction) { JmsTransactionObject txObject = (JmsTransactionObject) transaction; return (txObject.getResourceHolder() != null); } - @Override protected void doBegin(Object transaction, TransactionDefinition definition) { if (definition.getIsolationLevel() != TransactionDefinition.ISOLATION_DEFAULT) { throw new InvalidIsolationLevelException("JMS does not support an isolation level concept"); @@ -209,20 +204,17 @@ public class JmsTransactionManager extends AbstractPlatformTransactionManager } } - @Override protected Object doSuspend(Object transaction) { JmsTransactionObject txObject = (JmsTransactionObject) transaction; txObject.setResourceHolder(null); return TransactionSynchronizationManager.unbindResource(getConnectionFactory()); } - @Override protected void doResume(Object transaction, Object suspendedResources) { JmsResourceHolder conHolder = (JmsResourceHolder) suspendedResources; TransactionSynchronizationManager.bindResource(getConnectionFactory(), conHolder); } - @Override protected void doCommit(DefaultTransactionStatus status) { JmsTransactionObject txObject = (JmsTransactionObject) status.getTransaction(); Session session = txObject.getResourceHolder().getSession(); @@ -240,7 +232,6 @@ public class JmsTransactionManager extends AbstractPlatformTransactionManager } } - @Override protected void doRollback(DefaultTransactionStatus status) { JmsTransactionObject txObject = (JmsTransactionObject) status.getTransaction(); Session session = txObject.getResourceHolder().getSession(); @@ -255,13 +246,11 @@ public class JmsTransactionManager extends AbstractPlatformTransactionManager } } - @Override protected void doSetRollbackOnly(DefaultTransactionStatus status) { JmsTransactionObject txObject = (JmsTransactionObject) status.getTransaction(); txObject.getResourceHolder().setRollbackOnly(); } - @Override protected void doCleanupAfterCompletion(Object transaction) { JmsTransactionObject txObject = (JmsTransactionObject) transaction; TransactionSynchronizationManager.unbindResource(getConnectionFactory()); @@ -313,12 +302,10 @@ public class JmsTransactionManager extends AbstractPlatformTransactionManager return this.resourceHolder; } - @Override public boolean isRollbackOnly() { return this.resourceHolder.isRollbackOnly(); } - @Override public void flush() { // no-op } diff --git a/spring-jms/src/main/java/org/springframework/jms/connection/JmsTransactionManager102.java b/spring-jms/src/main/java/org/springframework/jms/connection/JmsTransactionManager102.java index 0ba0243708..5d73a3497c 100644 --- a/spring-jms/src/main/java/org/springframework/jms/connection/JmsTransactionManager102.java +++ b/spring-jms/src/main/java/org/springframework/jms/connection/JmsTransactionManager102.java @@ -100,7 +100,6 @@ public class JmsTransactionManager102 extends JmsTransactionManager { * the specified destination type: QueueConnectionFactory for queues, * and TopicConnectionFactory for topics. */ - @Override public void afterPropertiesSet() { super.afterPropertiesSet(); @@ -128,7 +127,6 @@ public class JmsTransactionManager102 extends JmsTransactionManager { /** * This implementation overrides the superclass method to use JMS 1.0.2 API. */ - @Override protected Connection createConnection() throws JMSException { if (isPubSubDomain()) { return ((TopicConnectionFactory) getConnectionFactory()).createTopicConnection(); @@ -141,7 +139,6 @@ public class JmsTransactionManager102 extends JmsTransactionManager { /** * This implementation overrides the superclass method to use JMS 1.0.2 API. */ - @Override protected Session createSession(Connection con) throws JMSException { if (isPubSubDomain()) { return ((TopicConnection) con).createTopicSession(true, Session.AUTO_ACKNOWLEDGE); diff --git a/spring-jms/src/main/java/org/springframework/jms/connection/SingleConnectionFactory.java b/spring-jms/src/main/java/org/springframework/jms/connection/SingleConnectionFactory.java index 974c2923fd..ed298a1c29 100644 --- a/spring-jms/src/main/java/org/springframework/jms/connection/SingleConnectionFactory.java +++ b/spring-jms/src/main/java/org/springframework/jms/connection/SingleConnectionFactory.java @@ -212,7 +212,6 @@ public class SingleConnectionFactory /** * Make sure a Connection or ConnectionFactory has been set. */ - @Override public void afterPropertiesSet() { if (this.connection == null && getTargetConnectionFactory() == null) { throw new IllegalArgumentException("Connection or 'targetConnectionFactory' is required"); @@ -220,7 +219,6 @@ public class SingleConnectionFactory } - @Override public Connection createConnection() throws JMSException { synchronized (this.connectionMonitor) { if (this.connection == null) { @@ -230,13 +228,11 @@ public class SingleConnectionFactory } } - @Override public Connection createConnection(String username, String password) throws JMSException { throw new javax.jms.IllegalStateException( "SingleConnectionFactory does not support custom username and password"); } - @Override public QueueConnection createQueueConnection() throws JMSException { Connection con; synchronized (this.connectionMonitor) { @@ -250,13 +246,11 @@ public class SingleConnectionFactory return ((QueueConnection) con); } - @Override public QueueConnection createQueueConnection(String username, String password) throws JMSException { throw new javax.jms.IllegalStateException( "SingleConnectionFactory does not support custom username and password"); } - @Override public TopicConnection createTopicConnection() throws JMSException { Connection con; synchronized (this.connectionMonitor) { @@ -270,7 +264,6 @@ public class SingleConnectionFactory return ((TopicConnection) con); } - @Override public TopicConnection createTopicConnection(String username, String password) throws JMSException { throw new javax.jms.IllegalStateException( "SingleConnectionFactory does not support custom username and password"); @@ -304,7 +297,6 @@ public class SingleConnectionFactory /** * Exception listener callback that renews the underlying single Connection. */ - @Override public void onException(JMSException ex) { logger.warn("Encountered a JMSException - resetting the underlying JMS Connection", ex); resetConnection(); @@ -316,7 +308,6 @@ public class SingleConnectionFactory *

As this bean implements DisposableBean, a bean factory will * automatically invoke this on destruction of its cached singletons. */ - @Override public void destroy() { resetConnection(); } @@ -478,7 +469,6 @@ public class SingleConnectionFactory this.target = target; } - @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { if (method.getName().equals("equals")) { // Only consider equal when proxies are identical. diff --git a/spring-jms/src/main/java/org/springframework/jms/connection/SingleConnectionFactory102.java b/spring-jms/src/main/java/org/springframework/jms/connection/SingleConnectionFactory102.java index e832baa960..b9097d06a1 100644 --- a/spring-jms/src/main/java/org/springframework/jms/connection/SingleConnectionFactory102.java +++ b/spring-jms/src/main/java/org/springframework/jms/connection/SingleConnectionFactory102.java @@ -93,7 +93,6 @@ public class SingleConnectionFactory102 extends SingleConnectionFactory { * the specified destination type: QueueConnectionFactory for queues, * TopicConnectionFactory for topics. */ - @Override public void afterPropertiesSet() { super.afterPropertiesSet(); @@ -120,7 +119,6 @@ public class SingleConnectionFactory102 extends SingleConnectionFactory { /** * This implementation overrides the superclass method to use JMS 1.0.2 API. */ - @Override protected Connection doCreateConnection() throws JMSException { if (isPubSubDomain()) { return ((TopicConnectionFactory) getTargetConnectionFactory()).createTopicConnection(); diff --git a/spring-jms/src/main/java/org/springframework/jms/connection/TransactionAwareConnectionFactoryProxy.java b/spring-jms/src/main/java/org/springframework/jms/connection/TransactionAwareConnectionFactoryProxy.java index de2b64c1fa..ccacc0df0b 100644 --- a/spring-jms/src/main/java/org/springframework/jms/connection/TransactionAwareConnectionFactoryProxy.java +++ b/spring-jms/src/main/java/org/springframework/jms/connection/TransactionAwareConnectionFactoryProxy.java @@ -136,19 +136,16 @@ public class TransactionAwareConnectionFactoryProxy } - @Override public Connection createConnection() throws JMSException { Connection targetConnection = this.targetConnectionFactory.createConnection(); return getTransactionAwareConnectionProxy(targetConnection); } - @Override public Connection createConnection(String username, String password) throws JMSException { Connection targetConnection = this.targetConnectionFactory.createConnection(username, password); return getTransactionAwareConnectionProxy(targetConnection); } - @Override public QueueConnection createQueueConnection() throws JMSException { if (!(this.targetConnectionFactory instanceof QueueConnectionFactory)) { throw new javax.jms.IllegalStateException("'targetConnectionFactory' is no QueueConnectionFactory"); @@ -158,7 +155,6 @@ public class TransactionAwareConnectionFactoryProxy return (QueueConnection) getTransactionAwareConnectionProxy(targetConnection); } - @Override public QueueConnection createQueueConnection(String username, String password) throws JMSException { if (!(this.targetConnectionFactory instanceof QueueConnectionFactory)) { throw new javax.jms.IllegalStateException("'targetConnectionFactory' is no QueueConnectionFactory"); @@ -168,7 +164,6 @@ public class TransactionAwareConnectionFactoryProxy return (QueueConnection) getTransactionAwareConnectionProxy(targetConnection); } - @Override public TopicConnection createTopicConnection() throws JMSException { if (!(this.targetConnectionFactory instanceof TopicConnectionFactory)) { throw new javax.jms.IllegalStateException("'targetConnectionFactory' is no TopicConnectionFactory"); @@ -178,7 +173,6 @@ public class TransactionAwareConnectionFactoryProxy return (TopicConnection) getTransactionAwareConnectionProxy(targetConnection); } - @Override public TopicConnection createTopicConnection(String username, String password) throws JMSException { if (!(this.targetConnectionFactory instanceof TopicConnectionFactory)) { throw new javax.jms.IllegalStateException("'targetConnectionFactory' is no TopicConnectionFactory"); @@ -222,7 +216,6 @@ public class TransactionAwareConnectionFactoryProxy this.target = target; } - @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { // Invocation on ConnectionProxy interface coming in... @@ -295,7 +288,6 @@ public class TransactionAwareConnectionFactoryProxy this.target = target; } - @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { // Invocation on SessionProxy interface coming in... diff --git a/spring-jms/src/main/java/org/springframework/jms/connection/UserCredentialsConnectionFactoryAdapter.java b/spring-jms/src/main/java/org/springframework/jms/connection/UserCredentialsConnectionFactoryAdapter.java index 83ec1aa55e..2d1cc49b27 100644 --- a/spring-jms/src/main/java/org/springframework/jms/connection/UserCredentialsConnectionFactoryAdapter.java +++ b/spring-jms/src/main/java/org/springframework/jms/connection/UserCredentialsConnectionFactoryAdapter.java @@ -104,7 +104,6 @@ public class UserCredentialsConnectionFactoryAdapter this.password = password; } - @Override public void afterPropertiesSet() { if (this.targetConnectionFactory == null) { throw new IllegalArgumentException("Property 'targetConnectionFactory' is required"); @@ -142,7 +141,6 @@ public class UserCredentialsConnectionFactoryAdapter * username and password (i.e. values of the bean properties) else. * @see #doCreateConnection */ - @Override public final Connection createConnection() throws JMSException { JmsUserCredentials threadCredentials = this.threadBoundCredentials.get(); if (threadCredentials != null) { @@ -156,7 +154,6 @@ public class UserCredentialsConnectionFactoryAdapter /** * Delegate the call straight to the target ConnectionFactory. */ - @Override public Connection createConnection(String username, String password) throws JMSException { return doCreateConnection(username, password); } @@ -189,7 +186,6 @@ public class UserCredentialsConnectionFactoryAdapter * username and password (i.e. values of the bean properties) else. * @see #doCreateQueueConnection */ - @Override public final QueueConnection createQueueConnection() throws JMSException { JmsUserCredentials threadCredentials = this.threadBoundCredentials.get(); if (threadCredentials != null) { @@ -203,7 +199,6 @@ public class UserCredentialsConnectionFactoryAdapter /** * Delegate the call straight to the target QueueConnectionFactory. */ - @Override public QueueConnection createQueueConnection(String username, String password) throws JMSException { return doCreateQueueConnection(username, password); } @@ -240,7 +235,6 @@ public class UserCredentialsConnectionFactoryAdapter * username and password (i.e. values of the bean properties) else. * @see #doCreateTopicConnection */ - @Override public final TopicConnection createTopicConnection() throws JMSException { JmsUserCredentials threadCredentials = this.threadBoundCredentials.get(); if (threadCredentials != null) { @@ -254,7 +248,6 @@ public class UserCredentialsConnectionFactoryAdapter /** * Delegate the call straight to the target TopicConnectionFactory. */ - @Override public TopicConnection createTopicConnection(String username, String password) throws JMSException { return doCreateTopicConnection(username, password); } diff --git a/spring-jms/src/main/java/org/springframework/jms/core/JmsTemplate.java b/spring-jms/src/main/java/org/springframework/jms/core/JmsTemplate.java index 4f8d0e17af..c2b7ca8a77 100644 --- a/spring-jms/src/main/java/org/springframework/jms/core/JmsTemplate.java +++ b/spring-jms/src/main/java/org/springframework/jms/core/JmsTemplate.java @@ -427,7 +427,6 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations // JmsOperations execute methods //------------------------------------------------------------------------- - @Override public T execute(SessionCallback action) throws JmsException { return execute(action, false); } @@ -475,7 +474,6 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations } } - @Override public T execute(ProducerCallback action) throws JmsException { String defaultDestinationName = getDefaultDestinationName(); if (defaultDestinationName != null) { @@ -486,11 +484,9 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations } } - @Override public T execute(final Destination destination, final ProducerCallback action) throws JmsException { Assert.notNull(action, "Callback object must not be null"); return execute(new SessionCallback() { - @Override public T doInJms(Session session) throws JMSException { MessageProducer producer = createProducer(session, destination); try { @@ -503,11 +499,9 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations }, false); } - @Override public T execute(final String destinationName, final ProducerCallback action) throws JmsException { Assert.notNull(action, "Callback object must not be null"); return execute(new SessionCallback() { - @Override public T doInJms(Session session) throws JMSException { Destination destination = resolveDestinationName(session, destinationName); MessageProducer producer = createProducer(session, destination); @@ -526,7 +520,6 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations // Convenience methods for sending messages //------------------------------------------------------------------------- - @Override public void send(MessageCreator messageCreator) throws JmsException { Destination defaultDestination = getDefaultDestination(); if (defaultDestination != null) { @@ -537,10 +530,8 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations } } - @Override public void send(final Destination destination, final MessageCreator messageCreator) throws JmsException { execute(new SessionCallback() { - @Override public Object doInJms(Session session) throws JMSException { doSend(session, destination, messageCreator); return null; @@ -548,10 +539,8 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations }, false); } - @Override public void send(final String destinationName, final MessageCreator messageCreator) throws JmsException { execute(new SessionCallback() { - @Override public Object doInJms(Session session) throws JMSException { Destination destination = resolveDestinationName(session, destinationName); doSend(session, destination, messageCreator); @@ -609,7 +598,6 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations // Convenience methods for sending auto-converted messages //------------------------------------------------------------------------- - @Override public void convertAndSend(Object message) throws JmsException { Destination defaultDestination = getDefaultDestination(); if (defaultDestination != null) { @@ -620,27 +608,22 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations } } - @Override public void convertAndSend(Destination destination, final Object message) throws JmsException { send(destination, new MessageCreator() { - @Override public Message createMessage(Session session) throws JMSException { return getRequiredMessageConverter().toMessage(message, session); } }); } - @Override public void convertAndSend(String destinationName, final Object message) throws JmsException { send(destinationName, new MessageCreator() { - @Override public Message createMessage(Session session) throws JMSException { return getRequiredMessageConverter().toMessage(message, session); } }); } - @Override public void convertAndSend(Object message, MessagePostProcessor postProcessor) throws JmsException { Destination defaultDestination = getDefaultDestination(); if (defaultDestination != null) { @@ -651,13 +634,11 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations } } - @Override public void convertAndSend( Destination destination, final Object message, final MessagePostProcessor postProcessor) throws JmsException { send(destination, new MessageCreator() { - @Override public Message createMessage(Session session) throws JMSException { Message msg = getRequiredMessageConverter().toMessage(message, session); return postProcessor.postProcessMessage(msg); @@ -665,13 +646,11 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations }); } - @Override public void convertAndSend( String destinationName, final Object message, final MessagePostProcessor postProcessor) throws JmsException { send(destinationName, new MessageCreator() { - @Override public Message createMessage(Session session) throws JMSException { Message msg = getRequiredMessageConverter().toMessage(message, session); return postProcessor.postProcessMessage(msg); @@ -684,7 +663,6 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations // Convenience methods for receiving messages //------------------------------------------------------------------------- - @Override public Message receive() throws JmsException { Destination defaultDestination = getDefaultDestination(); if (defaultDestination != null) { @@ -695,17 +673,14 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations } } - @Override public Message receive(Destination destination) throws JmsException { return receiveSelected(destination, null); } - @Override public Message receive(String destinationName) throws JmsException { return receiveSelected(destinationName, null); } - @Override public Message receiveSelected(String messageSelector) throws JmsException { Destination defaultDestination = getDefaultDestination(); if (defaultDestination != null) { @@ -716,20 +691,16 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations } } - @Override public Message receiveSelected(final Destination destination, final String messageSelector) throws JmsException { return execute(new SessionCallback() { - @Override public Message doInJms(Session session) throws JMSException { return doReceive(session, destination, messageSelector); } }, true); } - @Override public Message receiveSelected(final String destinationName, final String messageSelector) throws JmsException { return execute(new SessionCallback() { - @Override public Message doInJms(Session session) throws JMSException { Destination destination = resolveDestinationName(session, destinationName); return doReceive(session, destination, messageSelector); @@ -812,32 +783,26 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations // Convenience methods for receiving auto-converted messages //------------------------------------------------------------------------- - @Override public Object receiveAndConvert() throws JmsException { return doConvertFromMessage(receive()); } - @Override public Object receiveAndConvert(Destination destination) throws JmsException { return doConvertFromMessage(receive(destination)); } - @Override public Object receiveAndConvert(String destinationName) throws JmsException { return doConvertFromMessage(receive(destinationName)); } - @Override public Object receiveSelectedAndConvert(String messageSelector) throws JmsException { return doConvertFromMessage(receiveSelected(messageSelector)); } - @Override public Object receiveSelectedAndConvert(Destination destination, String messageSelector) throws JmsException { return doConvertFromMessage(receiveSelected(destination, messageSelector)); } - @Override public Object receiveSelectedAndConvert(String destinationName, String messageSelector) throws JmsException { return doConvertFromMessage(receiveSelected(destinationName, messageSelector)); } @@ -864,7 +829,6 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations // Convenience methods for browsing messages //------------------------------------------------------------------------- - @Override public T browse(BrowserCallback action) throws JmsException { Queue defaultQueue = getDefaultQueue(); if (defaultQueue != null) { @@ -875,17 +839,14 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations } } - @Override public T browse(Queue queue, BrowserCallback action) throws JmsException { return browseSelected(queue, null, action); } - @Override public T browse(String queueName, BrowserCallback action) throws JmsException { return browseSelected(queueName, null, action); } - @Override public T browseSelected(String messageSelector, BrowserCallback action) throws JmsException { Queue defaultQueue = getDefaultQueue(); if (defaultQueue != null) { @@ -896,13 +857,11 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations } } - @Override public T browseSelected(final Queue queue, final String messageSelector, final BrowserCallback action) throws JmsException { Assert.notNull(action, "Callback object must not be null"); return execute(new SessionCallback() { - @Override public T doInJms(Session session) throws JMSException { QueueBrowser browser = createBrowser(session, queue, messageSelector); try { @@ -915,13 +874,11 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations }, true); } - @Override public T browseSelected(final String queueName, final String messageSelector, final BrowserCallback action) throws JmsException { Assert.notNull(action, "Callback object must not be null"); return execute(new SessionCallback() { - @Override public T doInJms(Session session) throws JMSException { Queue queue = (Queue) getDestinationResolver().resolveDestinationName(session, queueName, false); QueueBrowser browser = createBrowser(session, queue, messageSelector); @@ -1062,27 +1019,22 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations */ private class JmsTemplateResourceFactory implements ConnectionFactoryUtils.ResourceFactory { - @Override public Connection getConnection(JmsResourceHolder holder) { return JmsTemplate.this.getConnection(holder); } - @Override public Session getSession(JmsResourceHolder holder) { return JmsTemplate.this.getSession(holder); } - @Override public Connection createConnection() throws JMSException { return JmsTemplate.this.createConnection(); } - @Override public Session createSession(Connection con) throws JMSException { return JmsTemplate.this.createSession(con); } - @Override public boolean isSynchedLocalTransactionAllowed() { return JmsTemplate.this.isSessionTransacted(); } diff --git a/spring-jms/src/main/java/org/springframework/jms/core/JmsTemplate102.java b/spring-jms/src/main/java/org/springframework/jms/core/JmsTemplate102.java index 57062933e5..0aa7fbc49f 100644 --- a/spring-jms/src/main/java/org/springframework/jms/core/JmsTemplate102.java +++ b/spring-jms/src/main/java/org/springframework/jms/core/JmsTemplate102.java @@ -111,7 +111,6 @@ public class JmsTemplate102 extends JmsTemplate { * @see org.springframework.jms.support.destination.DynamicDestinationResolver * @see org.springframework.jms.support.converter.SimpleMessageConverter102 */ - @Override protected void initDefaultStrategies() { setMessageConverter(new SimpleMessageConverter102()); } @@ -122,7 +121,6 @@ public class JmsTemplate102 extends JmsTemplate { * the specified destination type: QueueConnectionFactory for queues, * and TopicConnectionFactory for topics. */ - @Override public void afterPropertiesSet() { super.afterPropertiesSet(); @@ -151,7 +149,6 @@ public class JmsTemplate102 extends JmsTemplate { * This implementation overrides the superclass method to accept either * a QueueConnection or a TopicConnection, depending on the domain. */ - @Override protected Connection getConnection(JmsResourceHolder holder) { return holder.getConnection(isPubSubDomain() ? (Class) TopicConnection.class : QueueConnection.class); } @@ -160,7 +157,6 @@ public class JmsTemplate102 extends JmsTemplate { * This implementation overrides the superclass method to accept either * a QueueSession or a TopicSession, depending on the domain. */ - @Override protected Session getSession(JmsResourceHolder holder) { return holder.getSession(isPubSubDomain() ? (Class) TopicSession.class : QueueSession.class); } @@ -168,7 +164,6 @@ public class JmsTemplate102 extends JmsTemplate { /** * This implementation overrides the superclass method to use JMS 1.0.2 API. */ - @Override protected Connection createConnection() throws JMSException { if (isPubSubDomain()) { return ((TopicConnectionFactory) getConnectionFactory()).createTopicConnection(); @@ -181,7 +176,6 @@ public class JmsTemplate102 extends JmsTemplate { /** * This implementation overrides the superclass method to use JMS 1.0.2 API. */ - @Override protected Session createSession(Connection con) throws JMSException { if (isPubSubDomain()) { return ((TopicConnection) con).createTopicSession(isSessionTransacted(), getSessionAcknowledgeMode()); @@ -194,7 +188,6 @@ public class JmsTemplate102 extends JmsTemplate { /** * This implementation overrides the superclass method to use JMS 1.0.2 API. */ - @Override protected MessageProducer doCreateProducer(Session session, Destination destination) throws JMSException { if (isPubSubDomain()) { return ((TopicSession) session).createPublisher((Topic) destination); @@ -207,7 +200,6 @@ public class JmsTemplate102 extends JmsTemplate { /** * This implementation overrides the superclass method to use JMS 1.0.2 API. */ - @Override protected MessageConsumer createConsumer(Session session, Destination destination, String messageSelector) throws JMSException { @@ -219,7 +211,6 @@ public class JmsTemplate102 extends JmsTemplate { } } - @Override protected QueueBrowser createBrowser(Session session, Queue queue, String messageSelector) throws JMSException { @@ -234,7 +225,6 @@ public class JmsTemplate102 extends JmsTemplate { /** * This implementation overrides the superclass method to use JMS 1.0.2 API. */ - @Override protected void doSend(MessageProducer producer, Message message) throws JMSException { if (isPubSubDomain()) { if (isExplicitQosEnabled()) { @@ -260,7 +250,6 @@ public class JmsTemplate102 extends JmsTemplate { * The best we can do here is to check the setting on the template. * @see #getSessionAcknowledgeMode() */ - @Override protected boolean isClientAcknowledge(Session session) throws JMSException { return (getSessionAcknowledgeMode() == Session.CLIENT_ACKNOWLEDGE); } diff --git a/spring-jms/src/main/java/org/springframework/jms/core/support/JmsGatewaySupport.java b/spring-jms/src/main/java/org/springframework/jms/core/support/JmsGatewaySupport.java index 277e7ed893..95314fd3b2 100644 --- a/spring-jms/src/main/java/org/springframework/jms/core/support/JmsGatewaySupport.java +++ b/spring-jms/src/main/java/org/springframework/jms/core/support/JmsGatewaySupport.java @@ -96,7 +96,6 @@ public abstract class JmsGatewaySupport implements InitializingBean { return this.jmsTemplate; } - @Override public final void afterPropertiesSet() throws IllegalArgumentException, BeanInitializationException { if (this.jmsTemplate == null) { throw new IllegalArgumentException("'connectionFactory' or 'jmsTemplate' is required"); diff --git a/spring-jms/src/main/java/org/springframework/jms/listener/AbstractJmsListeningContainer.java b/spring-jms/src/main/java/org/springframework/jms/listener/AbstractJmsListeningContainer.java index f7170925bb..87507c28b7 100644 --- a/spring-jms/src/main/java/org/springframework/jms/listener/AbstractJmsListeningContainer.java +++ b/spring-jms/src/main/java/org/springframework/jms/listener/AbstractJmsListeningContainer.java @@ -113,7 +113,6 @@ public abstract class AbstractJmsListeningContainer extends JmsDestinationAccess this.autoStartup = autoStartup; } - @Override public boolean isAutoStartup() { return this.autoStartup; } @@ -132,12 +131,10 @@ public abstract class AbstractJmsListeningContainer extends JmsDestinationAccess /** * Return the phase in which this container will be started and stopped. */ - @Override public int getPhase() { return this.phase; } - @Override public void setBeanName(String beanName) { this.beanName = beanName; } @@ -172,7 +169,6 @@ public abstract class AbstractJmsListeningContainer extends JmsDestinationAccess * Calls {@link #shutdown()} when the BeanFactory destroys the container instance. * @see #shutdown() */ - @Override public void destroy() { shutdown(); } @@ -264,7 +260,6 @@ public abstract class AbstractJmsListeningContainer extends JmsDestinationAccess * @throws JmsException if starting failed * @see #doStart */ - @Override public void start() throws JmsException { try { doStart(); @@ -303,7 +298,6 @@ public abstract class AbstractJmsListeningContainer extends JmsDestinationAccess * @throws JmsException if stopping failed * @see #doStop */ - @Override public void stop() throws JmsException { try { doStop(); @@ -313,7 +307,6 @@ public abstract class AbstractJmsListeningContainer extends JmsDestinationAccess } } - @Override public void stop(Runnable callback) { this.stop(); callback.run(); @@ -342,7 +335,6 @@ public abstract class AbstractJmsListeningContainer extends JmsDestinationAccess * @see #stop() * @see #runningAllowed() */ - @Override public final boolean isRunning() { synchronized (this.lifecycleMonitor) { return (this.running && runningAllowed()); diff --git a/spring-jms/src/main/java/org/springframework/jms/listener/AbstractPollingMessageListenerContainer.java b/spring-jms/src/main/java/org/springframework/jms/listener/AbstractPollingMessageListenerContainer.java index e5db170e73..e899ca12cd 100644 --- a/spring-jms/src/main/java/org/springframework/jms/listener/AbstractPollingMessageListenerContainer.java +++ b/spring-jms/src/main/java/org/springframework/jms/listener/AbstractPollingMessageListenerContainer.java @@ -509,17 +509,14 @@ public abstract class AbstractPollingMessageListenerContainer extends AbstractMe */ private class MessageListenerContainerResourceFactory implements ConnectionFactoryUtils.ResourceFactory { - @Override public Connection getConnection(JmsResourceHolder holder) { return AbstractPollingMessageListenerContainer.this.getConnection(holder); } - @Override public Session getSession(JmsResourceHolder holder) { return AbstractPollingMessageListenerContainer.this.getSession(holder); } - @Override public Connection createConnection() throws JMSException { if (AbstractPollingMessageListenerContainer.this.sharedConnectionEnabled()) { Connection sharedCon = AbstractPollingMessageListenerContainer.this.getSharedConnection(); @@ -530,12 +527,10 @@ public abstract class AbstractPollingMessageListenerContainer extends AbstractMe } } - @Override public Session createSession(Connection con) throws JMSException { return AbstractPollingMessageListenerContainer.this.createSession(con); } - @Override public boolean isSynchedLocalTransactionAllowed() { return AbstractPollingMessageListenerContainer.this.isSessionTransacted(); } diff --git a/spring-jms/src/main/java/org/springframework/jms/listener/DefaultMessageListenerContainer.java b/spring-jms/src/main/java/org/springframework/jms/listener/DefaultMessageListenerContainer.java index e192103d42..91b15c319d 100644 --- a/spring-jms/src/main/java/org/springframework/jms/listener/DefaultMessageListenerContainer.java +++ b/spring-jms/src/main/java/org/springframework/jms/listener/DefaultMessageListenerContainer.java @@ -947,7 +947,6 @@ public class DefaultMessageListenerContainer extends AbstractPollingMessageListe private volatile boolean idle = true; - @Override public void run() { synchronized (lifecycleMonitor) { activeInvokerCount++; @@ -1124,7 +1123,6 @@ public class DefaultMessageListenerContainer extends AbstractPollingMessageListe this.session = null; } - @Override public boolean isLongLived() { return (maxMessagesPerTask < 0); } diff --git a/spring-jms/src/main/java/org/springframework/jms/listener/DefaultMessageListenerContainer102.java b/spring-jms/src/main/java/org/springframework/jms/listener/DefaultMessageListenerContainer102.java index e8d350ef4d..f15fb92323 100644 --- a/spring-jms/src/main/java/org/springframework/jms/listener/DefaultMessageListenerContainer102.java +++ b/spring-jms/src/main/java/org/springframework/jms/listener/DefaultMessageListenerContainer102.java @@ -50,7 +50,6 @@ public class DefaultMessageListenerContainer102 extends DefaultMessageListenerCo * This implementation overrides the superclass method to accept either * a QueueConnection or a TopicConnection, depending on the domain. */ - @Override protected Connection getConnection(JmsResourceHolder holder) { return holder.getConnection(isPubSubDomain() ? TopicConnection.class : QueueConnection.class); } @@ -59,7 +58,6 @@ public class DefaultMessageListenerContainer102 extends DefaultMessageListenerCo * This implementation overrides the superclass method to accept either * a QueueSession or a TopicSession, depending on the domain. */ - @Override protected Session getSession(JmsResourceHolder holder) { return holder.getSession(isPubSubDomain() ? TopicSession.class : QueueSession.class); } @@ -67,7 +65,6 @@ public class DefaultMessageListenerContainer102 extends DefaultMessageListenerCo /** * This implementation overrides the superclass method to use JMS 1.0.2 API. */ - @Override protected Connection createConnection() throws JMSException { if (isPubSubDomain()) { return ((TopicConnectionFactory) getConnectionFactory()).createTopicConnection(); @@ -80,7 +77,6 @@ public class DefaultMessageListenerContainer102 extends DefaultMessageListenerCo /** * This implementation overrides the superclass method to use JMS 1.0.2 API. */ - @Override protected Session createSession(Connection con) throws JMSException { if (isPubSubDomain()) { return ((TopicConnection) con).createTopicSession(isSessionTransacted(), getSessionAcknowledgeMode()); @@ -93,7 +89,6 @@ public class DefaultMessageListenerContainer102 extends DefaultMessageListenerCo /** * This implementation overrides the superclass method to use JMS 1.0.2 API. */ - @Override protected MessageConsumer createConsumer(Session session, Destination destination) throws JMSException { if (isPubSubDomain()) { if (isSubscriptionDurable()) { @@ -115,7 +110,6 @@ public class DefaultMessageListenerContainer102 extends DefaultMessageListenerCo * JMS 1.1's Session {@code getAcknowledgeMode()} method. * The best we can do here is to check the setting on the listener container. */ - @Override protected boolean isClientAcknowledge(Session session) throws JMSException { return (getSessionAcknowledgeMode() == Session.CLIENT_ACKNOWLEDGE); } diff --git a/spring-jms/src/main/java/org/springframework/jms/listener/SimpleMessageListenerContainer.java b/spring-jms/src/main/java/org/springframework/jms/listener/SimpleMessageListenerContainer.java index 2a503cc754..c3f0f22e59 100644 --- a/spring-jms/src/main/java/org/springframework/jms/listener/SimpleMessageListenerContainer.java +++ b/spring-jms/src/main/java/org/springframework/jms/listener/SimpleMessageListenerContainer.java @@ -240,7 +240,6 @@ public class SimpleMessageListenerContainer extends AbstractMessageListenerConta * shared connection and its sessions and consumers. * @param ex the reported connection exception */ - @Override public void onException(JMSException ex) { // First invoke the user-specific ExceptionListener, if any. invokeExceptionListener(ex); @@ -302,10 +301,8 @@ public class SimpleMessageListenerContainer extends AbstractMessageListenerConta if (this.taskExecutor != null) { consumer.setMessageListener(new MessageListener() { - @Override public void onMessage(final Message message) { taskExecutor.execute(new Runnable() { - @Override public void run() { processMessage(message, session); } @@ -315,7 +312,6 @@ public class SimpleMessageListenerContainer extends AbstractMessageListenerConta } else { consumer.setMessageListener(new MessageListener() { - @Override public void onMessage(Message message) { processMessage(message, session); } diff --git a/spring-jms/src/main/java/org/springframework/jms/listener/SimpleMessageListenerContainer102.java b/spring-jms/src/main/java/org/springframework/jms/listener/SimpleMessageListenerContainer102.java index 5e19ab4c29..758301eb40 100644 --- a/spring-jms/src/main/java/org/springframework/jms/listener/SimpleMessageListenerContainer102.java +++ b/spring-jms/src/main/java/org/springframework/jms/listener/SimpleMessageListenerContainer102.java @@ -47,7 +47,6 @@ public class SimpleMessageListenerContainer102 extends SimpleMessageListenerCont /** * This implementation overrides the superclass method to use JMS 1.0.2 API. */ - @Override protected Connection createConnection() throws JMSException { if (isPubSubDomain()) { return ((TopicConnectionFactory) getConnectionFactory()).createTopicConnection(); @@ -60,7 +59,6 @@ public class SimpleMessageListenerContainer102 extends SimpleMessageListenerCont /** * This implementation overrides the superclass method to use JMS 1.0.2 API. */ - @Override protected Session createSession(Connection con) throws JMSException { if (isPubSubDomain()) { return ((TopicConnection) con).createTopicSession(isSessionTransacted(), getSessionAcknowledgeMode()); @@ -73,7 +71,6 @@ public class SimpleMessageListenerContainer102 extends SimpleMessageListenerCont /** * This implementation overrides the superclass method to use JMS 1.0.2 API. */ - @Override protected MessageConsumer createConsumer(Session session, Destination destination) throws JMSException { if (isPubSubDomain()) { if (isSubscriptionDurable()) { @@ -95,7 +92,6 @@ public class SimpleMessageListenerContainer102 extends SimpleMessageListenerCont * JMS 1.1's Session {@code getAcknowledgeMode()} method. * The best we can do here is to check the setting on the listener container. */ - @Override protected boolean isClientAcknowledge(Session session) throws JMSException { return (getSessionAcknowledgeMode() == Session.CLIENT_ACKNOWLEDGE); } diff --git a/spring-jms/src/main/java/org/springframework/jms/listener/adapter/MessageListenerAdapter.java b/spring-jms/src/main/java/org/springframework/jms/listener/adapter/MessageListenerAdapter.java index 23ead10e33..3aa313c925 100644 --- a/spring-jms/src/main/java/org/springframework/jms/listener/adapter/MessageListenerAdapter.java +++ b/spring-jms/src/main/java/org/springframework/jms/listener/adapter/MessageListenerAdapter.java @@ -301,7 +301,6 @@ public class MessageListenerAdapter * @see #handleListenerException * @see #onMessage(javax.jms.Message, javax.jms.Session) */ - @Override public void onMessage(Message message) { try { onMessage(message, null); @@ -320,7 +319,6 @@ public class MessageListenerAdapter * @param session the JMS session to operate on * @throws JMSException if thrown by JMS API methods */ - @Override @SuppressWarnings("unchecked") public void onMessage(Message message, Session session) throws JMSException { // Check whether the delegate is a MessageListener impl itself. @@ -363,7 +361,6 @@ public class MessageListenerAdapter } } - @Override public String getSubscriptionName() { Object delegate = getDelegate(); if (delegate != this && delegate instanceof SubscriptionNameProvider) { diff --git a/spring-jms/src/main/java/org/springframework/jms/listener/adapter/MessageListenerAdapter102.java b/spring-jms/src/main/java/org/springframework/jms/listener/adapter/MessageListenerAdapter102.java index 78bd1c1986..5c19d70311 100644 --- a/spring-jms/src/main/java/org/springframework/jms/listener/adapter/MessageListenerAdapter102.java +++ b/spring-jms/src/main/java/org/springframework/jms/listener/adapter/MessageListenerAdapter102.java @@ -69,7 +69,6 @@ public class MessageListenerAdapter102 extends MessageListenerAdapter { * @see #setMessageConverter * @see org.springframework.jms.support.converter.SimpleMessageConverter102 */ - @Override protected void initDefaultStrategies() { setMessageConverter(new SimpleMessageConverter102()); } @@ -79,7 +78,6 @@ public class MessageListenerAdapter102 extends MessageListenerAdapter { *

Uses the JMS pub-sub API if the given destination is a topic, * else uses the JMS queue API. */ - @Override protected void sendResponse(Session session, Destination destination, Message response) throws JMSException { MessageProducer producer = null; try { diff --git a/spring-jms/src/main/java/org/springframework/jms/listener/endpoint/DefaultJmsActivationSpecFactory.java b/spring-jms/src/main/java/org/springframework/jms/listener/endpoint/DefaultJmsActivationSpecFactory.java index c0e008f560..0f11609876 100644 --- a/spring-jms/src/main/java/org/springframework/jms/listener/endpoint/DefaultJmsActivationSpecFactory.java +++ b/spring-jms/src/main/java/org/springframework/jms/listener/endpoint/DefaultJmsActivationSpecFactory.java @@ -72,7 +72,6 @@ public class DefaultJmsActivationSpecFactory extends StandardJmsActivationSpecFa * "ActiveMQActivationSpec" in the same package, or a class named * "ActivationSpecImpl" in the same package as the ResourceAdapter class. */ - @Override protected Class determineActivationSpecClass(ResourceAdapter adapter) { String adapterClassName = adapter.getClass().getName(); @@ -132,7 +131,6 @@ public class DefaultJmsActivationSpecFactory extends StandardJmsActivationSpecFa * "maxMessagesPerSessions"/"maxMessages", respectively * (following ActiveMQ's and JORAM's naming conventions). */ - @Override protected void populateActivationSpecProperties(BeanWrapper bw, JmsActivationSpecConfig config) { super.populateActivationSpecProperties(bw, config); if (config.getMaxConcurrency() > 0) { @@ -170,7 +168,6 @@ public class DefaultJmsActivationSpecFactory extends StandardJmsActivationSpecFa * ActivationSpec property named "useRAManagedTransaction", if available * (following ActiveMQ's naming conventions). */ - @Override protected void applyAcknowledgeMode(BeanWrapper bw, int ackMode) { if (ackMode == Session.SESSION_TRANSACTED && bw.isWritableProperty("useRAManagedTransaction")) { // ActiveMQ diff --git a/spring-jms/src/main/java/org/springframework/jms/listener/endpoint/JmsMessageEndpointFactory.java b/spring-jms/src/main/java/org/springframework/jms/listener/endpoint/JmsMessageEndpointFactory.java index 3441aacf2b..392d02b1fa 100644 --- a/spring-jms/src/main/java/org/springframework/jms/listener/endpoint/JmsMessageEndpointFactory.java +++ b/spring-jms/src/main/java/org/springframework/jms/listener/endpoint/JmsMessageEndpointFactory.java @@ -59,7 +59,6 @@ public class JmsMessageEndpointFactory extends AbstractMessageEndpointFactory { /** * Creates a concrete JMS message endpoint, internal to this factory. */ - @Override protected AbstractMessageEndpoint createEndpointInternal() throws UnavailableException { return new JmsMessageEndpoint(); } @@ -70,7 +69,6 @@ public class JmsMessageEndpointFactory extends AbstractMessageEndpointFactory { */ private class JmsMessageEndpoint extends AbstractMessageEndpoint implements MessageListener { - @Override public void onMessage(Message message) { boolean applyDeliveryCalls = !hasBeforeDeliveryBeenCalled(); if (applyDeliveryCalls) { @@ -104,7 +102,6 @@ public class JmsMessageEndpointFactory extends AbstractMessageEndpointFactory { } } - @Override protected ClassLoader getEndpointClassLoader() { return messageListener.getClass().getClassLoader(); } diff --git a/spring-jms/src/main/java/org/springframework/jms/listener/endpoint/JmsMessageEndpointManager.java b/spring-jms/src/main/java/org/springframework/jms/listener/endpoint/JmsMessageEndpointManager.java index 3586dffaad..455714c25a 100644 --- a/spring-jms/src/main/java/org/springframework/jms/listener/endpoint/JmsMessageEndpointManager.java +++ b/spring-jms/src/main/java/org/springframework/jms/listener/endpoint/JmsMessageEndpointManager.java @@ -128,7 +128,6 @@ public class JmsMessageEndpointManager extends GenericMessageEndpointManager { } - @Override public void afterPropertiesSet() throws ResourceException { if (this.messageListenerSet) { setMessageEndpointFactory(this.endpointFactory); diff --git a/spring-jms/src/main/java/org/springframework/jms/listener/endpoint/StandardJmsActivationSpecFactory.java b/spring-jms/src/main/java/org/springframework/jms/listener/endpoint/StandardJmsActivationSpecFactory.java index 62ac11d7d2..7263a4c993 100644 --- a/spring-jms/src/main/java/org/springframework/jms/listener/endpoint/StandardJmsActivationSpecFactory.java +++ b/spring-jms/src/main/java/org/springframework/jms/listener/endpoint/StandardJmsActivationSpecFactory.java @@ -91,7 +91,6 @@ public class StandardJmsActivationSpecFactory implements JmsActivationSpecFactor } - @Override public ActivationSpec createActivationSpec(ResourceAdapter adapter, JmsActivationSpecConfig config) { Class activationSpecClassToUse = this.activationSpecClass; if (activationSpecClassToUse == null) { diff --git a/spring-jms/src/main/java/org/springframework/jms/remoting/JmsInvokerClientInterceptor.java b/spring-jms/src/main/java/org/springframework/jms/remoting/JmsInvokerClientInterceptor.java index 66c1d79490..dfc481c0e4 100644 --- a/spring-jms/src/main/java/org/springframework/jms/remoting/JmsInvokerClientInterceptor.java +++ b/spring-jms/src/main/java/org/springframework/jms/remoting/JmsInvokerClientInterceptor.java @@ -180,7 +180,6 @@ public class JmsInvokerClientInterceptor implements MethodInterceptor, Initializ } - @Override public void afterPropertiesSet() { if (getConnectionFactory() == null) { throw new IllegalArgumentException("Property 'connectionFactory' is required"); @@ -191,7 +190,6 @@ public class JmsInvokerClientInterceptor implements MethodInterceptor, Initializ } - @Override public Object invoke(MethodInvocation methodInvocation) throws Throwable { if (AopUtils.isToStringMethod(methodInvocation.getMethod())) { return "JMS invoker proxy for queue [" + this.queue + "]"; diff --git a/spring-jms/src/main/java/org/springframework/jms/remoting/JmsInvokerProxyFactoryBean.java b/spring-jms/src/main/java/org/springframework/jms/remoting/JmsInvokerProxyFactoryBean.java index 0bfe3407af..1b4cce84d7 100644 --- a/spring-jms/src/main/java/org/springframework/jms/remoting/JmsInvokerProxyFactoryBean.java +++ b/spring-jms/src/main/java/org/springframework/jms/remoting/JmsInvokerProxyFactoryBean.java @@ -64,12 +64,10 @@ public class JmsInvokerProxyFactoryBean extends JmsInvokerClientInterceptor this.serviceInterface = serviceInterface; } - @Override public void setBeanClassLoader(ClassLoader classLoader) { this.beanClassLoader = classLoader; } - @Override public void afterPropertiesSet() { super.afterPropertiesSet(); if (this.serviceInterface == null) { @@ -79,17 +77,14 @@ public class JmsInvokerProxyFactoryBean extends JmsInvokerClientInterceptor } - @Override public Object getObject() { return this.serviceProxy; } - @Override public Class getObjectType() { return this.serviceInterface; } - @Override public boolean isSingleton() { return true; } diff --git a/spring-jms/src/main/java/org/springframework/jms/remoting/JmsInvokerServiceExporter.java b/spring-jms/src/main/java/org/springframework/jms/remoting/JmsInvokerServiceExporter.java index 8d5ba01cea..38dbfe53cf 100644 --- a/spring-jms/src/main/java/org/springframework/jms/remoting/JmsInvokerServiceExporter.java +++ b/spring-jms/src/main/java/org/springframework/jms/remoting/JmsInvokerServiceExporter.java @@ -89,13 +89,11 @@ public class JmsInvokerServiceExporter extends RemoteInvocationBasedExporter this.ignoreInvalidRequests = ignoreInvalidRequests; } - @Override public void afterPropertiesSet() { this.proxy = getProxyForService(); } - @Override public void onMessage(Message requestMessage, Session session) throws JMSException { RemoteInvocation invocation = readRemoteInvocation(requestMessage); if (invocation != null) { diff --git a/spring-jms/src/main/java/org/springframework/jms/support/JmsAccessor.java b/spring-jms/src/main/java/org/springframework/jms/support/JmsAccessor.java index 70b06ad033..80023bc3d0 100644 --- a/spring-jms/src/main/java/org/springframework/jms/support/JmsAccessor.java +++ b/spring-jms/src/main/java/org/springframework/jms/support/JmsAccessor.java @@ -147,7 +147,6 @@ public abstract class JmsAccessor implements InitializingBean { return this.sessionAcknowledgeMode; } - @Override public void afterPropertiesSet() { if (getConnectionFactory() == null) { throw new IllegalArgumentException("Property 'connectionFactory' is required"); diff --git a/spring-jms/src/main/java/org/springframework/jms/support/converter/MappingJacksonMessageConverter.java b/spring-jms/src/main/java/org/springframework/jms/support/converter/MappingJacksonMessageConverter.java index 976daf69c1..091e5fc4a3 100644 --- a/spring-jms/src/main/java/org/springframework/jms/support/converter/MappingJacksonMessageConverter.java +++ b/spring-jms/src/main/java/org/springframework/jms/support/converter/MappingJacksonMessageConverter.java @@ -146,7 +146,6 @@ public class MappingJacksonMessageConverter implements MessageConverter { } - @Override public Message toMessage(Object object, Session session) throws JMSException, MessageConversionException { Message message; try { @@ -168,7 +167,6 @@ public class MappingJacksonMessageConverter implements MessageConverter { return message; } - @Override public Object fromMessage(Message message) throws JMSException, MessageConversionException { try { JavaType targetJavaType = getJavaTypeForMessage(message); diff --git a/spring-jms/src/main/java/org/springframework/jms/support/converter/MarshallingMessageConverter.java b/spring-jms/src/main/java/org/springframework/jms/support/converter/MarshallingMessageConverter.java index 9cdaaae362..9378d21c47 100644 --- a/spring-jms/src/main/java/org/springframework/jms/support/converter/MarshallingMessageConverter.java +++ b/spring-jms/src/main/java/org/springframework/jms/support/converter/MarshallingMessageConverter.java @@ -132,7 +132,6 @@ public class MarshallingMessageConverter implements MessageConverter, Initializi this.targetType = targetType; } - @Override public void afterPropertiesSet() { Assert.notNull(this.marshaller, "Property 'marshaller' is required"); Assert.notNull(this.unmarshaller, "Property 'unmarshaller' is required"); @@ -146,7 +145,6 @@ public class MarshallingMessageConverter implements MessageConverter, Initializi * @see #marshalToTextMessage * @see #marshalToBytesMessage */ - @Override public Message toMessage(Object object, Session session) throws JMSException, MessageConversionException { try { switch (this.targetType) { @@ -171,7 +169,6 @@ public class MarshallingMessageConverter implements MessageConverter, Initializi * @see #unmarshalFromTextMessage * @see #unmarshalFromBytesMessage */ - @Override public Object fromMessage(Message message) throws JMSException, MessageConversionException { try { if (message instanceof TextMessage) { diff --git a/spring-jms/src/main/java/org/springframework/jms/support/converter/SimpleMessageConverter.java b/spring-jms/src/main/java/org/springframework/jms/support/converter/SimpleMessageConverter.java index fd5e4be5a0..939bd0f211 100644 --- a/spring-jms/src/main/java/org/springframework/jms/support/converter/SimpleMessageConverter.java +++ b/spring-jms/src/main/java/org/springframework/jms/support/converter/SimpleMessageConverter.java @@ -56,7 +56,6 @@ public class SimpleMessageConverter implements MessageConverter { * @see #createMessageForMap * @see #createMessageForSerializable */ - @Override public Message toMessage(Object object, Session session) throws JMSException, MessageConversionException { if (object instanceof Message) { return (Message) object; @@ -90,7 +89,6 @@ public class SimpleMessageConverter implements MessageConverter { * @see #extractMapFromMessage * @see #extractSerializableFromMessage */ - @Override public Object fromMessage(Message message) throws JMSException, MessageConversionException { if (message instanceof TextMessage) { return extractStringFromMessage((TextMessage) message); diff --git a/spring-jms/src/main/java/org/springframework/jms/support/converter/SimpleMessageConverter102.java b/spring-jms/src/main/java/org/springframework/jms/support/converter/SimpleMessageConverter102.java index a8d7d2f5c9..569b9cbedf 100644 --- a/spring-jms/src/main/java/org/springframework/jms/support/converter/SimpleMessageConverter102.java +++ b/spring-jms/src/main/java/org/springframework/jms/support/converter/SimpleMessageConverter102.java @@ -50,7 +50,6 @@ public class SimpleMessageConverter102 extends SimpleMessageConverter { * JMS 1.1 and is therefore not available on a JMS 1.0.2 provider. * @see javax.jms.BytesMessage#getBodyLength() */ - @Override protected byte[] extractByteArrayFromMessage(BytesMessage message) throws JMSException { ByteArrayOutputStream baos = new ByteArrayOutputStream(BUFFER_SIZE); byte[] buffer = new byte[BUFFER_SIZE]; diff --git a/spring-jms/src/main/java/org/springframework/jms/support/destination/BeanFactoryDestinationResolver.java b/spring-jms/src/main/java/org/springframework/jms/support/destination/BeanFactoryDestinationResolver.java index 73591a51eb..e3105c223d 100644 --- a/spring-jms/src/main/java/org/springframework/jms/support/destination/BeanFactoryDestinationResolver.java +++ b/spring-jms/src/main/java/org/springframework/jms/support/destination/BeanFactoryDestinationResolver.java @@ -63,13 +63,11 @@ public class BeanFactoryDestinationResolver implements DestinationResolver, Bean } - @Override public void setBeanFactory(BeanFactory beanFactory) { this.beanFactory = beanFactory; } - @Override public Destination resolveDestinationName(Session session, String destinationName, boolean pubSubDomain) throws JMSException { diff --git a/spring-jms/src/main/java/org/springframework/jms/support/destination/DynamicDestinationResolver.java b/spring-jms/src/main/java/org/springframework/jms/support/destination/DynamicDestinationResolver.java index 7f6450fffe..f3d39361f8 100644 --- a/spring-jms/src/main/java/org/springframework/jms/support/destination/DynamicDestinationResolver.java +++ b/spring-jms/src/main/java/org/springframework/jms/support/destination/DynamicDestinationResolver.java @@ -54,7 +54,6 @@ public class DynamicDestinationResolver implements DestinationResolver { * @see #resolveTopic(javax.jms.Session, String) * @see #resolveQueue(javax.jms.Session, String) */ - @Override public Destination resolveDestinationName(Session session, String destinationName, boolean pubSubDomain) throws JMSException { diff --git a/spring-jms/src/main/java/org/springframework/jms/support/destination/JndiDestinationResolver.java b/spring-jms/src/main/java/org/springframework/jms/support/destination/JndiDestinationResolver.java index 5ed8476495..b9bf560e8e 100644 --- a/spring-jms/src/main/java/org/springframework/jms/support/destination/JndiDestinationResolver.java +++ b/spring-jms/src/main/java/org/springframework/jms/support/destination/JndiDestinationResolver.java @@ -98,7 +98,6 @@ public class JndiDestinationResolver extends JndiLocatorSupport implements Cachi } - @Override public Destination resolveDestinationName(Session session, String destinationName, boolean pubSubDomain) throws JMSException { @@ -151,12 +150,10 @@ public class JndiDestinationResolver extends JndiLocatorSupport implements Cachi } - @Override public void removeFromCache(String destinationName) { this.destinationCache.remove(destinationName); } - @Override public void clearCache() { this.destinationCache.clear(); } diff --git a/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/HibernateExceptionTranslator.java b/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/HibernateExceptionTranslator.java index 7223e8d7da..4801a5afbc 100644 --- a/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/HibernateExceptionTranslator.java +++ b/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/HibernateExceptionTranslator.java @@ -38,7 +38,6 @@ import org.springframework.dao.support.PersistenceExceptionTranslator; */ public class HibernateExceptionTranslator implements PersistenceExceptionTranslator { - @Override public DataAccessException translateExceptionIfPossible(RuntimeException ex) { if (ex instanceof HibernateException) { return convertHibernateAccessException((HibernateException) ex); diff --git a/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/HibernateTransactionManager.java b/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/HibernateTransactionManager.java index f0bc322e26..ddde103c1d 100644 --- a/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/HibernateTransactionManager.java +++ b/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/HibernateTransactionManager.java @@ -242,7 +242,6 @@ public class HibernateTransactionManager extends AbstractPlatformTransactionMana this.hibernateManagedSession = hibernateManagedSession; } - @Override public void afterPropertiesSet() { if (getSessionFactory() == null) { throw new IllegalArgumentException("Property 'sessionFactory' is required"); @@ -263,7 +262,6 @@ public class HibernateTransactionManager extends AbstractPlatformTransactionMana } - @Override public Object getResourceFactory() { return getSessionFactory(); } @@ -654,7 +652,6 @@ public class HibernateTransactionManager extends AbstractPlatformTransactionMana } } - @Override public boolean isRollbackOnly() { return this.sessionHolder.isRollbackOnly() || (hasConnectionHolder() && getConnectionHolder().isRollbackOnly()); diff --git a/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/LocalSessionFactoryBean.java b/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/LocalSessionFactoryBean.java index ab24c96150..dea7f1a139 100644 --- a/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/LocalSessionFactoryBean.java +++ b/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/LocalSessionFactoryBean.java @@ -268,13 +268,11 @@ public class LocalSessionFactoryBean extends HibernateExceptionTranslator this.jtaTransactionManager = jtaTransactionManager; } - @Override public void setResourceLoader(ResourceLoader resourceLoader) { this.resourcePatternResolver = ResourcePatternUtils.getResourcePatternResolver(resourceLoader); } - @Override public void afterPropertiesSet() throws IOException { LocalSessionFactoryBuilder sfb = new LocalSessionFactoryBuilder(this.dataSource, this.resourcePatternResolver); @@ -387,23 +385,19 @@ public class LocalSessionFactoryBean extends HibernateExceptionTranslator } - @Override public SessionFactory getObject() { return this.sessionFactory; } - @Override public Class getObjectType() { return (this.sessionFactory != null ? this.sessionFactory.getClass() : SessionFactory.class); } - @Override public boolean isSingleton() { return true; } - @Override public void destroy() { this.sessionFactory.close(); } diff --git a/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/SpringSessionContext.java b/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/SpringSessionContext.java index 1dfd5aa866..1a5c4bd678 100644 --- a/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/SpringSessionContext.java +++ b/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/SpringSessionContext.java @@ -62,7 +62,6 @@ public class SpringSessionContext implements CurrentSessionContext { /** * Retrieve the Spring-managed Session for the current thread, if any. */ - @Override public Session currentSession() throws HibernateException { Object value = TransactionSynchronizationManager.getResource(this.sessionFactory); if (value instanceof Session) { diff --git a/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/SpringSessionSynchronization.java b/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/SpringSessionSynchronization.java index 9f48f5f010..a831617d9c 100644 --- a/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/SpringSessionSynchronization.java +++ b/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/SpringSessionSynchronization.java @@ -52,12 +52,10 @@ class SpringSessionSynchronization implements TransactionSynchronization, Ordere } - @Override public int getOrder() { return SessionFactoryUtils.SESSION_SYNCHRONIZATION_ORDER; } - @Override public void suspend() { if (this.holderActive) { TransactionSynchronizationManager.unbindResource(this.sessionFactory); @@ -66,14 +64,12 @@ class SpringSessionSynchronization implements TransactionSynchronization, Ordere } } - @Override public void resume() { if (this.holderActive) { TransactionSynchronizationManager.bindResource(this.sessionFactory, this.sessionHolder); } } - @Override public void flush() { try { SessionFactoryUtils.logger.debug("Flushing Hibernate Session on explicit request"); @@ -84,7 +80,6 @@ class SpringSessionSynchronization implements TransactionSynchronization, Ordere } } - @Override public void beforeCommit(boolean readOnly) throws DataAccessException { if (!readOnly) { Session session = getCurrentSession(); @@ -102,7 +97,6 @@ class SpringSessionSynchronization implements TransactionSynchronization, Ordere } } - @Override public void beforeCompletion() { Session session = this.sessionHolder.getSession(); if (this.sessionHolder.getPreviousFlushMode() != null) { @@ -113,11 +107,9 @@ class SpringSessionSynchronization implements TransactionSynchronization, Ordere session.disconnect(); } - @Override public void afterCommit() { } - @Override public void afterCompletion(int status) { try { if (status != STATUS_COMMITTED) { diff --git a/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/support/OpenSessionInViewInterceptor.java b/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/support/OpenSessionInViewInterceptor.java index 4d82160eb7..8994255e75 100644 --- a/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/support/OpenSessionInViewInterceptor.java +++ b/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/support/OpenSessionInViewInterceptor.java @@ -95,7 +95,6 @@ public class OpenSessionInViewInterceptor implements AsyncWebRequestInterceptor * {@code HibernateAccessor} and bind it to the thread via the * {@link org.springframework.transaction.support.TransactionSynchronizationManager}. */ - @Override public void preHandle(WebRequest request) throws DataAccessException { String participateAttributeName = getParticipateAttributeName(); @@ -124,7 +123,6 @@ public class OpenSessionInViewInterceptor implements AsyncWebRequestInterceptor } } - @Override public void postHandle(WebRequest request, ModelMap model) { } @@ -132,7 +130,6 @@ public class OpenSessionInViewInterceptor implements AsyncWebRequestInterceptor * Unbind the Hibernate {@code Session} from the thread and close it). * @see org.springframework.transaction.support.TransactionSynchronizationManager */ - @Override public void afterCompletion(WebRequest request, Exception ex) throws DataAccessException { if (!decrementParticipateCount(request)) { SessionHolder sessionHolder = @@ -159,7 +156,6 @@ public class OpenSessionInViewInterceptor implements AsyncWebRequestInterceptor return true; } - @Override public void afterConcurrentHandlingStarted(WebRequest request) { if (!decrementParticipateCount(request)) { TransactionSynchronizationManager.unbindResource(getSessionFactory()); diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate3/AbstractSessionFactoryBean.java b/spring-orm/src/main/java/org/springframework/orm/hibernate3/AbstractSessionFactoryBean.java index 2a53432f81..4475af596a 100644 --- a/spring-orm/src/main/java/org/springframework/orm/hibernate3/AbstractSessionFactoryBean.java +++ b/spring-orm/src/main/java/org/springframework/orm/hibernate3/AbstractSessionFactoryBean.java @@ -184,7 +184,6 @@ public abstract class AbstractSessionFactoryBean extends HibernateExceptionTrans * @see #buildSessionFactory() * @see #wrapSessionFactoryIfNecessary */ - @Override public void afterPropertiesSet() throws Exception { SessionFactory rawSf = buildSessionFactory(); this.sessionFactory = wrapSessionFactoryIfNecessary(rawSf); @@ -220,7 +219,6 @@ public abstract class AbstractSessionFactoryBean extends HibernateExceptionTrans /** * Close the SessionFactory on bean factory shutdown. */ - @Override public void destroy() throws HibernateException { logger.info("Closing Hibernate SessionFactory"); try { @@ -235,17 +233,14 @@ public abstract class AbstractSessionFactoryBean extends HibernateExceptionTrans /** * Return the singleton SessionFactory. */ - @Override public SessionFactory getObject() { return this.sessionFactory; } - @Override public Class getObjectType() { return (this.sessionFactory != null ? this.sessionFactory.getClass() : SessionFactory.class); } - @Override public boolean isSingleton() { return true; } diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate3/FilterDefinitionFactoryBean.java b/spring-orm/src/main/java/org/springframework/orm/hibernate3/FilterDefinitionFactoryBean.java index 0f401001db..54bc662c7d 100644 --- a/spring-orm/src/main/java/org/springframework/orm/hibernate3/FilterDefinitionFactoryBean.java +++ b/spring-orm/src/main/java/org/springframework/orm/hibernate3/FilterDefinitionFactoryBean.java @@ -137,31 +137,26 @@ public class FilterDefinitionFactoryBean implements FactoryBean getObjectType() { return FilterDefinition.class; } - @Override public boolean isSingleton() { return true; } diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateAccessor.java b/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateAccessor.java index fb0dc74444..ddc08aed8b 100644 --- a/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateAccessor.java +++ b/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateAccessor.java @@ -305,12 +305,10 @@ public abstract class HibernateAccessor implements InitializingBean, BeanFactory * bean names. It does not need to be set for any other mode of operation. * @see #setEntityInterceptorBeanName */ - @Override public void setBeanFactory(BeanFactory beanFactory) { this.beanFactory = beanFactory; } - @Override public void afterPropertiesSet() { if (getSessionFactory() == null) { throw new IllegalArgumentException("Property 'sessionFactory' is required"); diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateExceptionTranslator.java b/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateExceptionTranslator.java index ded5f70434..b302d15da2 100644 --- a/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateExceptionTranslator.java +++ b/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateExceptionTranslator.java @@ -63,7 +63,6 @@ public class HibernateExceptionTranslator implements PersistenceExceptionTransla } - @Override public DataAccessException translateExceptionIfPossible(RuntimeException ex) { if (ex instanceof HibernateException) { return convertHibernateAccessException((HibernateException) ex); diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateInterceptor.java b/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateInterceptor.java index a5ca4902a7..79339de558 100644 --- a/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateInterceptor.java +++ b/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateInterceptor.java @@ -86,7 +86,6 @@ public class HibernateInterceptor extends HibernateAccessor implements MethodInt } - @Override public Object invoke(MethodInvocation methodInvocation) throws Throwable { Session session = getSession(); SessionHolder sessionHolder = diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateTemplate.java b/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateTemplate.java index f833ab890e..1edc733d3b 100644 --- a/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateTemplate.java +++ b/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateTemplate.java @@ -335,12 +335,10 @@ public class HibernateTemplate extends HibernateAccessor implements HibernateOpe } - @Override public T execute(HibernateCallback action) throws DataAccessException { return doExecute(action, false, false); } - @Override public List executeFind(HibernateCallback action) throws DataAccessException { Object result = doExecute(action, false, false); if (result != null && !(result instanceof List)) { @@ -504,17 +502,14 @@ public class HibernateTemplate extends HibernateAccessor implements HibernateOpe // Convenience methods for loading individual objects //------------------------------------------------------------------------- - @Override public T get(Class entityClass, Serializable id) throws DataAccessException { return get(entityClass, id, null); } - @Override public T get(final Class entityClass, final Serializable id, final LockMode lockMode) throws DataAccessException { return executeWithNativeSession(new HibernateCallback() { - @Override @SuppressWarnings("unchecked") public T doInHibernate(Session session) throws HibernateException { if (lockMode != null) { @@ -527,17 +522,14 @@ public class HibernateTemplate extends HibernateAccessor implements HibernateOpe }); } - @Override public Object get(String entityName, Serializable id) throws DataAccessException { return get(entityName, id, null); } - @Override public Object get(final String entityName, final Serializable id, final LockMode lockMode) throws DataAccessException { return executeWithNativeSession(new HibernateCallback() { - @Override public Object doInHibernate(Session session) throws HibernateException { if (lockMode != null) { return session.get(entityName, id, lockMode); @@ -549,17 +541,14 @@ public class HibernateTemplate extends HibernateAccessor implements HibernateOpe }); } - @Override public T load(Class entityClass, Serializable id) throws DataAccessException { return load(entityClass, id, null); } - @Override public T load(final Class entityClass, final Serializable id, final LockMode lockMode) throws DataAccessException { return executeWithNativeSession(new HibernateCallback() { - @Override @SuppressWarnings("unchecked") public T doInHibernate(Session session) throws HibernateException { if (lockMode != null) { @@ -572,17 +561,14 @@ public class HibernateTemplate extends HibernateAccessor implements HibernateOpe }); } - @Override public Object load(String entityName, Serializable id) throws DataAccessException { return load(entityName, id, null); } - @Override public Object load(final String entityName, final Serializable id, final LockMode lockMode) throws DataAccessException { return executeWithNativeSession(new HibernateCallback() { - @Override public Object doInHibernate(Session session) throws HibernateException { if (lockMode != null) { return session.load(entityName, id, lockMode); @@ -594,10 +580,8 @@ public class HibernateTemplate extends HibernateAccessor implements HibernateOpe }); } - @Override public List loadAll(final Class entityClass) throws DataAccessException { return executeWithNativeSession(new HibernateCallback>() { - @Override @SuppressWarnings("unchecked") public List doInHibernate(Session session) throws HibernateException { Criteria criteria = session.createCriteria(entityClass); @@ -608,10 +592,8 @@ public class HibernateTemplate extends HibernateAccessor implements HibernateOpe }); } - @Override public void load(final Object entity, final Serializable id) throws DataAccessException { executeWithNativeSession(new HibernateCallback() { - @Override public Object doInHibernate(Session session) throws HibernateException { session.load(entity, id); return null; @@ -619,15 +601,12 @@ public class HibernateTemplate extends HibernateAccessor implements HibernateOpe }); } - @Override public void refresh(final Object entity) throws DataAccessException { refresh(entity, null); } - @Override public void refresh(final Object entity, final LockMode lockMode) throws DataAccessException { executeWithNativeSession(new HibernateCallback() { - @Override public Object doInHibernate(Session session) throws HibernateException { if (lockMode != null) { session.refresh(entity, lockMode); @@ -640,20 +619,16 @@ public class HibernateTemplate extends HibernateAccessor implements HibernateOpe }); } - @Override public boolean contains(final Object entity) throws DataAccessException { return executeWithNativeSession(new HibernateCallback() { - @Override public Boolean doInHibernate(Session session) { return session.contains(entity); } }); } - @Override public void evict(final Object entity) throws DataAccessException { executeWithNativeSession(new HibernateCallback() { - @Override public Object doInHibernate(Session session) throws HibernateException { session.evict(entity); return null; @@ -661,7 +636,6 @@ public class HibernateTemplate extends HibernateAccessor implements HibernateOpe }); } - @Override public void initialize(Object proxy) throws DataAccessException { try { Hibernate.initialize(proxy); @@ -671,7 +645,6 @@ public class HibernateTemplate extends HibernateAccessor implements HibernateOpe } } - @Override public Filter enableFilter(String filterName) throws IllegalStateException { Session session = SessionFactoryUtils.getSession(getSessionFactory(), false); Filter filter = session.getEnabledFilter(filterName); @@ -686,10 +659,8 @@ public class HibernateTemplate extends HibernateAccessor implements HibernateOpe // Convenience methods for storing individual objects //------------------------------------------------------------------------- - @Override public void lock(final Object entity, final LockMode lockMode) throws DataAccessException { executeWithNativeSession(new HibernateCallback() { - @Override public Object doInHibernate(Session session) throws HibernateException { session.lock(entity, lockMode); return null; @@ -697,12 +668,10 @@ public class HibernateTemplate extends HibernateAccessor implements HibernateOpe }); } - @Override public void lock(final String entityName, final Object entity, final LockMode lockMode) throws DataAccessException { executeWithNativeSession(new HibernateCallback() { - @Override public Object doInHibernate(Session session) throws HibernateException { session.lock(entityName, entity, lockMode); return null; @@ -710,10 +679,8 @@ public class HibernateTemplate extends HibernateAccessor implements HibernateOpe }); } - @Override public Serializable save(final Object entity) throws DataAccessException { return executeWithNativeSession(new HibernateCallback() { - @Override public Serializable doInHibernate(Session session) throws HibernateException { checkWriteOperationAllowed(session); return session.save(entity); @@ -721,10 +688,8 @@ public class HibernateTemplate extends HibernateAccessor implements HibernateOpe }); } - @Override public Serializable save(final String entityName, final Object entity) throws DataAccessException { return executeWithNativeSession(new HibernateCallback() { - @Override public Serializable doInHibernate(Session session) throws HibernateException { checkWriteOperationAllowed(session); return session.save(entityName, entity); @@ -732,15 +697,12 @@ public class HibernateTemplate extends HibernateAccessor implements HibernateOpe }); } - @Override public void update(Object entity) throws DataAccessException { update(entity, null); } - @Override public void update(final Object entity, final LockMode lockMode) throws DataAccessException { executeWithNativeSession(new HibernateCallback() { - @Override public Object doInHibernate(Session session) throws HibernateException { checkWriteOperationAllowed(session); session.update(entity); @@ -752,17 +714,14 @@ public class HibernateTemplate extends HibernateAccessor implements HibernateOpe }); } - @Override public void update(String entityName, Object entity) throws DataAccessException { update(entityName, entity, null); } - @Override public void update(final String entityName, final Object entity, final LockMode lockMode) throws DataAccessException { executeWithNativeSession(new HibernateCallback() { - @Override public Object doInHibernate(Session session) throws HibernateException { checkWriteOperationAllowed(session); session.update(entityName, entity); @@ -774,10 +733,8 @@ public class HibernateTemplate extends HibernateAccessor implements HibernateOpe }); } - @Override public void saveOrUpdate(final Object entity) throws DataAccessException { executeWithNativeSession(new HibernateCallback() { - @Override public Object doInHibernate(Session session) throws HibernateException { checkWriteOperationAllowed(session); session.saveOrUpdate(entity); @@ -786,10 +743,8 @@ public class HibernateTemplate extends HibernateAccessor implements HibernateOpe }); } - @Override public void saveOrUpdate(final String entityName, final Object entity) throws DataAccessException { executeWithNativeSession(new HibernateCallback() { - @Override public Object doInHibernate(Session session) throws HibernateException { checkWriteOperationAllowed(session); session.saveOrUpdate(entityName, entity); @@ -798,10 +753,8 @@ public class HibernateTemplate extends HibernateAccessor implements HibernateOpe }); } - @Override public void saveOrUpdateAll(final Collection entities) throws DataAccessException { executeWithNativeSession(new HibernateCallback() { - @Override public Object doInHibernate(Session session) throws HibernateException { checkWriteOperationAllowed(session); for (Object entity : entities) { @@ -812,12 +765,10 @@ public class HibernateTemplate extends HibernateAccessor implements HibernateOpe }); } - @Override public void replicate(final Object entity, final ReplicationMode replicationMode) throws DataAccessException { executeWithNativeSession(new HibernateCallback() { - @Override public Object doInHibernate(Session session) throws HibernateException { checkWriteOperationAllowed(session); session.replicate(entity, replicationMode); @@ -826,12 +777,10 @@ public class HibernateTemplate extends HibernateAccessor implements HibernateOpe }); } - @Override public void replicate(final String entityName, final Object entity, final ReplicationMode replicationMode) throws DataAccessException { executeWithNativeSession(new HibernateCallback() { - @Override public Object doInHibernate(Session session) throws HibernateException { checkWriteOperationAllowed(session); session.replicate(entityName, entity, replicationMode); @@ -840,10 +789,8 @@ public class HibernateTemplate extends HibernateAccessor implements HibernateOpe }); } - @Override public void persist(final Object entity) throws DataAccessException { executeWithNativeSession(new HibernateCallback() { - @Override public Object doInHibernate(Session session) throws HibernateException { checkWriteOperationAllowed(session); session.persist(entity); @@ -852,10 +799,8 @@ public class HibernateTemplate extends HibernateAccessor implements HibernateOpe }); } - @Override public void persist(final String entityName, final Object entity) throws DataAccessException { executeWithNativeSession(new HibernateCallback() { - @Override public Object doInHibernate(Session session) throws HibernateException { checkWriteOperationAllowed(session); session.persist(entityName, entity); @@ -864,10 +809,8 @@ public class HibernateTemplate extends HibernateAccessor implements HibernateOpe }); } - @Override public T merge(final T entity) throws DataAccessException { return executeWithNativeSession(new HibernateCallback() { - @Override @SuppressWarnings("unchecked") public T doInHibernate(Session session) throws HibernateException { checkWriteOperationAllowed(session); @@ -876,10 +819,8 @@ public class HibernateTemplate extends HibernateAccessor implements HibernateOpe }); } - @Override public T merge(final String entityName, final T entity) throws DataAccessException { return executeWithNativeSession(new HibernateCallback() { - @Override @SuppressWarnings("unchecked") public T doInHibernate(Session session) throws HibernateException { checkWriteOperationAllowed(session); @@ -888,15 +829,12 @@ public class HibernateTemplate extends HibernateAccessor implements HibernateOpe }); } - @Override public void delete(Object entity) throws DataAccessException { delete(entity, null); } - @Override public void delete(final Object entity, final LockMode lockMode) throws DataAccessException { executeWithNativeSession(new HibernateCallback() { - @Override public Object doInHibernate(Session session) throws HibernateException { checkWriteOperationAllowed(session); if (lockMode != null) { @@ -908,17 +846,14 @@ public class HibernateTemplate extends HibernateAccessor implements HibernateOpe }); } - @Override public void delete(String entityName, Object entity) throws DataAccessException { delete(entityName, entity, null); } - @Override public void delete(final String entityName, final Object entity, final LockMode lockMode) throws DataAccessException { executeWithNativeSession(new HibernateCallback() { - @Override public Object doInHibernate(Session session) throws HibernateException { checkWriteOperationAllowed(session); if (lockMode != null) { @@ -930,10 +865,8 @@ public class HibernateTemplate extends HibernateAccessor implements HibernateOpe }); } - @Override public void deleteAll(final Collection entities) throws DataAccessException { executeWithNativeSession(new HibernateCallback() { - @Override public Object doInHibernate(Session session) throws HibernateException { checkWriteOperationAllowed(session); for (Object entity : entities) { @@ -944,10 +877,8 @@ public class HibernateTemplate extends HibernateAccessor implements HibernateOpe }); } - @Override public void flush() throws DataAccessException { executeWithNativeSession(new HibernateCallback() { - @Override public Object doInHibernate(Session session) throws HibernateException { session.flush(); return null; @@ -955,10 +886,8 @@ public class HibernateTemplate extends HibernateAccessor implements HibernateOpe }); } - @Override public void clear() throws DataAccessException { executeWithNativeSession(new HibernateCallback() { - @Override public Object doInHibernate(Session session) { session.clear(); return null; @@ -971,20 +900,16 @@ public class HibernateTemplate extends HibernateAccessor implements HibernateOpe // Convenience finder methods for HQL strings //------------------------------------------------------------------------- - @Override public List find(String queryString) throws DataAccessException { return find(queryString, (Object[]) null); } - @Override public List find(String queryString, Object value) throws DataAccessException { return find(queryString, new Object[] {value}); } - @Override public List find(final String queryString, final Object... values) throws DataAccessException { return executeWithNativeSession(new HibernateCallback() { - @Override public List doInHibernate(Session session) throws HibernateException { Query queryObject = session.createQuery(queryString); prepareQuery(queryObject); @@ -998,14 +923,12 @@ public class HibernateTemplate extends HibernateAccessor implements HibernateOpe }); } - @Override public List findByNamedParam(String queryString, String paramName, Object value) throws DataAccessException { return findByNamedParam(queryString, new String[] {paramName}, new Object[] {value}); } - @Override public List findByNamedParam(final String queryString, final String[] paramNames, final Object[] values) throws DataAccessException { @@ -1013,7 +936,6 @@ public class HibernateTemplate extends HibernateAccessor implements HibernateOpe throw new IllegalArgumentException("Length of paramNames array must match length of values array"); } return executeWithNativeSession(new HibernateCallback() { - @Override public List doInHibernate(Session session) throws HibernateException { Query queryObject = session.createQuery(queryString); prepareQuery(queryObject); @@ -1027,12 +949,10 @@ public class HibernateTemplate extends HibernateAccessor implements HibernateOpe }); } - @Override public List findByValueBean(final String queryString, final Object valueBean) throws DataAccessException { return executeWithNativeSession(new HibernateCallback() { - @Override public List doInHibernate(Session session) throws HibernateException { Query queryObject = session.createQuery(queryString); prepareQuery(queryObject); @@ -1047,20 +967,16 @@ public class HibernateTemplate extends HibernateAccessor implements HibernateOpe // Convenience finder methods for named queries //------------------------------------------------------------------------- - @Override public List findByNamedQuery(String queryName) throws DataAccessException { return findByNamedQuery(queryName, (Object[]) null); } - @Override public List findByNamedQuery(String queryName, Object value) throws DataAccessException { return findByNamedQuery(queryName, new Object[] {value}); } - @Override public List findByNamedQuery(final String queryName, final Object... values) throws DataAccessException { return executeWithNativeSession(new HibernateCallback() { - @Override public List doInHibernate(Session session) throws HibernateException { Query queryObject = session.getNamedQuery(queryName); prepareQuery(queryObject); @@ -1074,14 +990,12 @@ public class HibernateTemplate extends HibernateAccessor implements HibernateOpe }); } - @Override public List findByNamedQueryAndNamedParam(String queryName, String paramName, Object value) throws DataAccessException { return findByNamedQueryAndNamedParam(queryName, new String[] {paramName}, new Object[] {value}); } - @Override public List findByNamedQueryAndNamedParam( final String queryName, final String[] paramNames, final Object[] values) throws DataAccessException { @@ -1090,7 +1004,6 @@ public class HibernateTemplate extends HibernateAccessor implements HibernateOpe throw new IllegalArgumentException("Length of paramNames array must match length of values array"); } return executeWithNativeSession(new HibernateCallback() { - @Override public List doInHibernate(Session session) throws HibernateException { Query queryObject = session.getNamedQuery(queryName); prepareQuery(queryObject); @@ -1104,12 +1017,10 @@ public class HibernateTemplate extends HibernateAccessor implements HibernateOpe }); } - @Override public List findByNamedQueryAndValueBean(final String queryName, final Object valueBean) throws DataAccessException { return executeWithNativeSession(new HibernateCallback() { - @Override public List doInHibernate(Session session) throws HibernateException { Query queryObject = session.getNamedQuery(queryName); prepareQuery(queryObject); @@ -1124,18 +1035,15 @@ public class HibernateTemplate extends HibernateAccessor implements HibernateOpe // Convenience finder methods for detached criteria //------------------------------------------------------------------------- - @Override public List findByCriteria(DetachedCriteria criteria) throws DataAccessException { return findByCriteria(criteria, -1, -1); } - @Override public List findByCriteria(final DetachedCriteria criteria, final int firstResult, final int maxResults) throws DataAccessException { Assert.notNull(criteria, "DetachedCriteria must not be null"); return executeWithNativeSession(new HibernateCallback() { - @Override public List doInHibernate(Session session) throws HibernateException { Criteria executableCriteria = criteria.getExecutableCriteria(session); prepareCriteria(executableCriteria); @@ -1150,29 +1058,24 @@ public class HibernateTemplate extends HibernateAccessor implements HibernateOpe }); } - @Override public List findByExample(Object exampleEntity) throws DataAccessException { return findByExample(null, exampleEntity, -1, -1); } - @Override public List findByExample(String entityName, Object exampleEntity) throws DataAccessException { return findByExample(entityName, exampleEntity, -1, -1); } - @Override public List findByExample(Object exampleEntity, int firstResult, int maxResults) throws DataAccessException { return findByExample(null, exampleEntity, firstResult, maxResults); } - @Override public List findByExample( final String entityName, final Object exampleEntity, final int firstResult, final int maxResults) throws DataAccessException { Assert.notNull(exampleEntity, "Example entity must not be null"); return executeWithNativeSession(new HibernateCallback() { - @Override public List doInHibernate(Session session) throws HibernateException { Criteria executableCriteria = (entityName != null ? session.createCriteria(entityName) : session.createCriteria(exampleEntity.getClass())); @@ -1194,20 +1097,16 @@ public class HibernateTemplate extends HibernateAccessor implements HibernateOpe // Convenience query methods for iteration and bulk updates/deletes //------------------------------------------------------------------------- - @Override public Iterator iterate(String queryString) throws DataAccessException { return iterate(queryString, (Object[]) null); } - @Override public Iterator iterate(String queryString, Object value) throws DataAccessException { return iterate(queryString, new Object[] {value}); } - @Override public Iterator iterate(final String queryString, final Object... values) throws DataAccessException { return executeWithNativeSession(new HibernateCallback() { - @Override public Iterator doInHibernate(Session session) throws HibernateException { Query queryObject = session.createQuery(queryString); prepareQuery(queryObject); @@ -1221,7 +1120,6 @@ public class HibernateTemplate extends HibernateAccessor implements HibernateOpe }); } - @Override public void closeIterator(Iterator it) throws DataAccessException { try { Hibernate.close(it); @@ -1231,20 +1129,16 @@ public class HibernateTemplate extends HibernateAccessor implements HibernateOpe } } - @Override public int bulkUpdate(String queryString) throws DataAccessException { return bulkUpdate(queryString, (Object[]) null); } - @Override public int bulkUpdate(String queryString, Object value) throws DataAccessException { return bulkUpdate(queryString, new Object[] {value}); } - @Override public int bulkUpdate(final String queryString, final Object... values) throws DataAccessException { return executeWithNativeSession(new HibernateCallback() { - @Override public Integer doInHibernate(Session session) throws HibernateException { Query queryObject = session.createQuery(queryString); prepareQuery(queryObject); @@ -1367,7 +1261,6 @@ public class HibernateTemplate extends HibernateAccessor implements HibernateOpe this.target = target; } - @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { // Invocation on Session interface coming in... diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateTransactionManager.java b/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateTransactionManager.java index 813d5ea2f4..d3d1e13733 100644 --- a/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateTransactionManager.java +++ b/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateTransactionManager.java @@ -395,12 +395,10 @@ public class HibernateTransactionManager extends AbstractPlatformTransactionMana * bean names. It does not need to be set for any other mode of operation. * @see #setEntityInterceptorBeanName */ - @Override public void setBeanFactory(BeanFactory beanFactory) { this.beanFactory = beanFactory; } - @Override public void afterPropertiesSet() { if (getSessionFactory() == null) { throw new IllegalArgumentException("Property 'sessionFactory' is required"); @@ -424,7 +422,6 @@ public class HibernateTransactionManager extends AbstractPlatformTransactionMana } - @Override public Object getResourceFactory() { return getSessionFactory(); } @@ -885,13 +882,11 @@ public class HibernateTransactionManager extends AbstractPlatformTransactionMana } } - @Override public boolean isRollbackOnly() { return this.sessionHolder.isRollbackOnly() || (hasConnectionHolder() && getConnectionHolder().isRollbackOnly()); } - @Override public void flush() { try { this.sessionHolder.getSession().flush(); diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate3/LocalCacheProviderProxy.java b/spring-orm/src/main/java/org/springframework/orm/hibernate3/LocalCacheProviderProxy.java index ed1f18d1d5..dcf15059d3 100644 --- a/spring-orm/src/main/java/org/springframework/orm/hibernate3/LocalCacheProviderProxy.java +++ b/spring-orm/src/main/java/org/springframework/orm/hibernate3/LocalCacheProviderProxy.java @@ -47,27 +47,22 @@ public class LocalCacheProviderProxy implements CacheProvider { } - @Override public Cache buildCache(String regionName, Properties properties) throws CacheException { return this.cacheProvider.buildCache(regionName, properties); } - @Override public long nextTimestamp() { return this.cacheProvider.nextTimestamp(); } - @Override public void start(Properties properties) throws CacheException { this.cacheProvider.start(properties); } - @Override public void stop() { this.cacheProvider.stop(); } - @Override public boolean isMinimalPutsEnabledByDefault() { return this.cacheProvider.isMinimalPutsEnabledByDefault(); } diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate3/LocalDataSourceConnectionProvider.java b/spring-orm/src/main/java/org/springframework/orm/hibernate3/LocalDataSourceConnectionProvider.java index 17c2312b1d..43d4264ff8 100644 --- a/spring-orm/src/main/java/org/springframework/orm/hibernate3/LocalDataSourceConnectionProvider.java +++ b/spring-orm/src/main/java/org/springframework/orm/hibernate3/LocalDataSourceConnectionProvider.java @@ -44,7 +44,6 @@ public class LocalDataSourceConnectionProvider implements ConnectionProvider { private DataSource dataSourceToUse; - @Override public void configure(Properties props) throws HibernateException { this.dataSource = LocalSessionFactoryBean.getConfigTimeDataSource(); // absolutely needs thread-bound DataSource to initialize @@ -79,7 +78,6 @@ public class LocalDataSourceConnectionProvider implements ConnectionProvider { * This implementation delegates to the underlying DataSource. * @see javax.sql.DataSource#getConnection() */ - @Override public Connection getConnection() throws SQLException { try { return this.dataSourceToUse.getConnection(); @@ -94,7 +92,6 @@ public class LocalDataSourceConnectionProvider implements ConnectionProvider { * This implementation calls {@link DataSourceUtils#doCloseConnection}, * checking against a {@link org.springframework.jdbc.datasource.SmartDataSource}. */ - @Override public void closeConnection(Connection con) throws SQLException { try { DataSourceUtils.doCloseConnection(con, this.dataSourceToUse); @@ -109,7 +106,6 @@ public class LocalDataSourceConnectionProvider implements ConnectionProvider { * This implementation does nothing: * We're dealing with an externally managed DataSource. */ - @Override public void close() { } @@ -118,7 +114,6 @@ public class LocalDataSourceConnectionProvider implements ConnectionProvider { * to receive the same Connection within a transaction, not even when * dealing with a JNDI DataSource. */ - @Override public boolean supportsAggressiveRelease() { return false; } diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate3/LocalRegionFactoryProxy.java b/spring-orm/src/main/java/org/springframework/orm/hibernate3/LocalRegionFactoryProxy.java index b517807708..06ab8f3b26 100644 --- a/spring-orm/src/main/java/org/springframework/orm/hibernate3/LocalRegionFactoryProxy.java +++ b/spring-orm/src/main/java/org/springframework/orm/hibernate3/LocalRegionFactoryProxy.java @@ -70,17 +70,14 @@ public class LocalRegionFactoryProxy implements RegionFactory { } - @Override public void start(Settings settings, Properties properties) throws CacheException { this.regionFactory.start(settings, properties); } - @Override public void stop() { this.regionFactory.stop(); } - @Override public boolean isMinimalPutsEnabledByDefault() { return this.regionFactory.isMinimalPutsEnabledByDefault(); } @@ -95,33 +92,28 @@ public class LocalRegionFactoryProxy implements RegionFactory { } } - @Override public long nextTimestamp() { return this.regionFactory.nextTimestamp(); } - @Override public EntityRegion buildEntityRegion(String regionName, Properties properties, CacheDataDescription metadata) throws CacheException { return this.regionFactory.buildEntityRegion(regionName, properties, metadata); } - @Override public CollectionRegion buildCollectionRegion(String regionName, Properties properties, CacheDataDescription metadata) throws CacheException { return this.regionFactory.buildCollectionRegion(regionName, properties, metadata); } - @Override public QueryResultsRegion buildQueryResultsRegion(String regionName, Properties properties) throws CacheException { return this.regionFactory.buildQueryResultsRegion(regionName, properties); } - @Override public TimestampsRegion buildTimestampsRegion(String regionName, Properties properties) throws CacheException { diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate3/LocalSessionFactoryBean.java b/spring-orm/src/main/java/org/springframework/orm/hibernate3/LocalSessionFactoryBean.java index ae924eecba..9310853b6e 100644 --- a/spring-orm/src/main/java/org/springframework/orm/hibernate3/LocalSessionFactoryBean.java +++ b/spring-orm/src/main/java/org/springframework/orm/hibernate3/LocalSessionFactoryBean.java @@ -540,7 +540,6 @@ public class LocalSessionFactoryBean extends AbstractSessionFactoryBean implemen this.schemaUpdate = schemaUpdate; } - @Override public void setBeanClassLoader(ClassLoader beanClassLoader) { this.beanClassLoader = beanClassLoader; } @@ -940,7 +939,6 @@ public class LocalSessionFactoryBean extends AbstractSessionFactoryBean implemen hibernateTemplate.setFlushMode(HibernateTemplate.FLUSH_NEVER); hibernateTemplate.execute( new HibernateCallback() { - @Override public Object doInHibernate(Session session) throws HibernateException, SQLException { @SuppressWarnings("deprecation") Connection con = session.connection(); @@ -986,7 +984,6 @@ public class LocalSessionFactoryBean extends AbstractSessionFactoryBean implemen hibernateTemplate.setFlushMode(HibernateTemplate.FLUSH_NEVER); hibernateTemplate.execute( new HibernateCallback() { - @Override public Object doInHibernate(Session session) throws HibernateException, SQLException { @SuppressWarnings("deprecation") Connection con = session.connection(); @@ -1024,7 +1021,6 @@ public class LocalSessionFactoryBean extends AbstractSessionFactoryBean implemen HibernateTemplate hibernateTemplate = new HibernateTemplate(sessionFactory); hibernateTemplate.execute( new HibernateCallback() { - @Override public Object doInHibernate(Session session) throws HibernateException, SQLException { @SuppressWarnings("deprecation") Connection con = session.connection(); @@ -1062,7 +1058,6 @@ public class LocalSessionFactoryBean extends AbstractSessionFactoryBean implemen HibernateTemplate hibernateTemplate = new HibernateTemplate(sessionFactory); hibernateTemplate.execute( new HibernateCallback() { - @Override public Object doInHibernate(Session session) throws HibernateException, SQLException { @SuppressWarnings("deprecation") Connection con = session.connection(); diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate3/LocalTransactionManagerLookup.java b/spring-orm/src/main/java/org/springframework/orm/hibernate3/LocalTransactionManagerLookup.java index 37781de5a0..2b46f7ef84 100644 --- a/spring-orm/src/main/java/org/springframework/orm/hibernate3/LocalTransactionManagerLookup.java +++ b/spring-orm/src/main/java/org/springframework/orm/hibernate3/LocalTransactionManagerLookup.java @@ -58,17 +58,14 @@ public class LocalTransactionManagerLookup implements TransactionManagerLookup { this.transactionManager = tm; } - @Override public TransactionManager getTransactionManager(Properties props) { return this.transactionManager; } - @Override public String getUserTransactionName() { return null; } - @Override public Object getTransactionIdentifier(Transaction transaction) { return transaction; } diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate3/SpringSessionContext.java b/spring-orm/src/main/java/org/springframework/orm/hibernate3/SpringSessionContext.java index 0e33b32458..0254d3cce5 100644 --- a/spring-orm/src/main/java/org/springframework/orm/hibernate3/SpringSessionContext.java +++ b/spring-orm/src/main/java/org/springframework/orm/hibernate3/SpringSessionContext.java @@ -56,7 +56,6 @@ public class SpringSessionContext implements CurrentSessionContext { /** * Retrieve the Spring-managed Session for the current thread, if any. */ - @Override public Session currentSession() throws HibernateException { try { return (org.hibernate.classic.Session) SessionFactoryUtils.doGetSession(this.sessionFactory, false); diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate3/SpringSessionSynchronization.java b/spring-orm/src/main/java/org/springframework/orm/hibernate3/SpringSessionSynchronization.java index 28acc3b604..88b80e167f 100644 --- a/spring-orm/src/main/java/org/springframework/orm/hibernate3/SpringSessionSynchronization.java +++ b/spring-orm/src/main/java/org/springframework/orm/hibernate3/SpringSessionSynchronization.java @@ -106,12 +106,10 @@ class SpringSessionSynchronization implements TransactionSynchronization, Ordere } - @Override public int getOrder() { return SessionFactoryUtils.SESSION_SYNCHRONIZATION_ORDER; } - @Override public void suspend() { if (this.holderActive) { TransactionSynchronizationManager.unbindResource(this.sessionFactory); @@ -120,14 +118,12 @@ class SpringSessionSynchronization implements TransactionSynchronization, Ordere } } - @Override public void resume() { if (this.holderActive) { TransactionSynchronizationManager.bindResource(this.sessionFactory, this.sessionHolder); } } - @Override public void flush() { try { SessionFactoryUtils.logger.debug("Flushing Hibernate Session on explicit request"); @@ -138,7 +134,6 @@ class SpringSessionSynchronization implements TransactionSynchronization, Ordere } } - @Override public void beforeCommit(boolean readOnly) throws DataAccessException { if (!readOnly) { Session session = getCurrentSession(); @@ -165,7 +160,6 @@ class SpringSessionSynchronization implements TransactionSynchronization, Ordere return SessionFactoryUtils.convertHibernateAccessException(ex); } - @Override public void beforeCompletion() { if (this.jtaTransaction != null) { // Typically in case of a suspended JTA transaction: @@ -220,11 +214,9 @@ class SpringSessionSynchronization implements TransactionSynchronization, Ordere } } - @Override public void afterCommit() { } - @Override public void afterCompletion(int status) { try { if (!this.hibernateTransactionCompletion || !this.newSession) { diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate3/SpringTransactionFactory.java b/spring-orm/src/main/java/org/springframework/orm/hibernate3/SpringTransactionFactory.java index c0258c7a5f..8fa1e94034 100644 --- a/spring-orm/src/main/java/org/springframework/orm/hibernate3/SpringTransactionFactory.java +++ b/spring-orm/src/main/java/org/springframework/orm/hibernate3/SpringTransactionFactory.java @@ -46,31 +46,25 @@ public class SpringTransactionFactory implements TransactionFactory { * However, for Spring's resource management (in particular for * HibernateTransactionManager), "on_close" is the better default. */ - @Override public ConnectionReleaseMode getDefaultReleaseMode() { return ConnectionReleaseMode.ON_CLOSE; } - @Override public Transaction createTransaction(JDBCContext jdbcContext, Context transactionContext) { return new JDBCTransaction(jdbcContext, transactionContext); } - @Override public void configure(Properties props) { } - @Override public boolean isTransactionManagerRequired() { return false; } - @Override public boolean areCallbacksLocalToHibernateTransactions() { return true; } - @Override public boolean isTransactionInProgress( JDBCContext jdbcContext, Context transactionContext, Transaction transaction) { diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate3/TypeDefinitionBean.java b/spring-orm/src/main/java/org/springframework/orm/hibernate3/TypeDefinitionBean.java index a3fc0ac210..475fe463af 100644 --- a/spring-orm/src/main/java/org/springframework/orm/hibernate3/TypeDefinitionBean.java +++ b/spring-orm/src/main/java/org/springframework/orm/hibernate3/TypeDefinitionBean.java @@ -111,14 +111,12 @@ public class TypeDefinitionBean implements BeanNameAware, InitializingBean { * the TypeDefinitionBean will be used. * @see #setTypeName */ - @Override public void setBeanName(String name) { if (this.typeName == null) { this.typeName = name; } } - @Override public void afterPropertiesSet() { if (this.typeName == null) { throw new IllegalArgumentException("typeName is required"); diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate3/annotation/AnnotationSessionFactoryBean.java b/spring-orm/src/main/java/org/springframework/orm/hibernate3/annotation/AnnotationSessionFactoryBean.java index 4b7e8859d1..d944ef497d 100644 --- a/spring-orm/src/main/java/org/springframework/orm/hibernate3/annotation/AnnotationSessionFactoryBean.java +++ b/spring-orm/src/main/java/org/springframework/orm/hibernate3/annotation/AnnotationSessionFactoryBean.java @@ -150,7 +150,6 @@ public class AnnotationSessionFactoryBean extends LocalSessionFactoryBean implem this.entityTypeFilters = entityTypeFilters; } - @Override public void setResourceLoader(ResourceLoader resourceLoader) { this.resourcePatternResolver = ResourcePatternUtils.getResourcePatternResolver(resourceLoader); } diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/AbstractLobType.java b/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/AbstractLobType.java index 58bea92d6a..e30f1e1f1c 100644 --- a/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/AbstractLobType.java +++ b/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/AbstractLobType.java @@ -87,7 +87,6 @@ public abstract class AbstractLobType implements UserType { /** * This implementation returns false. */ - @Override public boolean isMutable() { return false; } @@ -96,7 +95,6 @@ public abstract class AbstractLobType implements UserType { * This implementation delegates to the Hibernate EqualsHelper. * @see org.hibernate.util.EqualsHelper#equals */ - @Override public boolean equals(Object x, Object y) throws HibernateException { return EqualsHelper.equals(x, y); } @@ -104,7 +102,6 @@ public abstract class AbstractLobType implements UserType { /** * This implementation returns the hashCode of the given objectz. */ - @Override public int hashCode(Object x) throws HibernateException { return x.hashCode(); } @@ -112,7 +109,6 @@ public abstract class AbstractLobType implements UserType { /** * This implementation returns the passed-in value as-is. */ - @Override public Object deepCopy(Object value) throws HibernateException { return value; } @@ -120,7 +116,6 @@ public abstract class AbstractLobType implements UserType { /** * This implementation returns the passed-in value as-is. */ - @Override public Serializable disassemble(Object value) throws HibernateException { return (Serializable) value; } @@ -128,7 +123,6 @@ public abstract class AbstractLobType implements UserType { /** * This implementation returns the passed-in value as-is. */ - @Override public Object assemble(Serializable cached, Object owner) throws HibernateException { return cached; } @@ -136,7 +130,6 @@ public abstract class AbstractLobType implements UserType { /** * This implementation returns the passed-in original as-is. */ - @Override public Object replace(Object original, Object target, Object owner) throws HibernateException { return original; } @@ -147,7 +140,6 @@ public abstract class AbstractLobType implements UserType { * passing in the LobHandler of this type. * @see #nullSafeGetInternal */ - @Override public final Object nullSafeGet(ResultSet rs, String[] names, Object owner) throws HibernateException, SQLException { @@ -170,7 +162,6 @@ public abstract class AbstractLobType implements UserType { * LobHandler of this type. * @see #nullSafeSetInternal */ - @Override public final void nullSafeSet(PreparedStatement st, Object value, int index) throws HibernateException, SQLException { diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/BlobByteArrayType.java b/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/BlobByteArrayType.java index a29ddc8068..bdfaf07bd7 100644 --- a/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/BlobByteArrayType.java +++ b/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/BlobByteArrayType.java @@ -60,12 +60,10 @@ public class BlobByteArrayType extends AbstractLobType { super(lobHandler, jtaTransactionManager); } - @Override public int[] sqlTypes() { return new int[] {Types.BLOB}; } - @Override public Class returnedClass() { return byte[].class; } diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/BlobSerializableType.java b/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/BlobSerializableType.java index 3b560b94f3..ddcf4f5108 100644 --- a/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/BlobSerializableType.java +++ b/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/BlobSerializableType.java @@ -76,12 +76,10 @@ public class BlobSerializableType extends AbstractLobType { super(lobHandler, jtaTransactionManager); } - @Override public int[] sqlTypes() { return new int[] {Types.BLOB}; } - @Override public Class returnedClass() { return Serializable.class; } diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/BlobStringType.java b/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/BlobStringType.java index 5f00c63ba4..3066382286 100644 --- a/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/BlobStringType.java +++ b/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/BlobStringType.java @@ -66,12 +66,10 @@ public class BlobStringType extends AbstractLobType { super(lobHandler, jtaTransactionManager); } - @Override public int[] sqlTypes() { return new int[] {Types.BLOB}; } - @Override public Class returnedClass() { return String.class; } diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/ClobStringType.java b/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/ClobStringType.java index 97814b3fd7..bef035c6f7 100644 --- a/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/ClobStringType.java +++ b/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/ClobStringType.java @@ -62,12 +62,10 @@ public class ClobStringType extends AbstractLobType { super(lobHandler, jtaTransactionManager); } - @Override public int[] sqlTypes() { return new int[] {Types.CLOB}; } - @Override public Class returnedClass() { return String.class; } diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/OpenSessionInViewInterceptor.java b/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/OpenSessionInViewInterceptor.java index 9daf211d50..692db0ba20 100644 --- a/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/OpenSessionInViewInterceptor.java +++ b/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/OpenSessionInViewInterceptor.java @@ -144,7 +144,6 @@ public class OpenSessionInViewInterceptor extends HibernateAccessor implements A * {@link TransactionSynchronizationManager}. * @see org.springframework.orm.hibernate3.SessionFactoryUtils#getSession */ - @Override public void preHandle(WebRequest request) throws DataAccessException { WebAsyncManager asyncManager = WebAsyncUtils.getAsyncManager(request); @@ -190,7 +189,6 @@ public class OpenSessionInViewInterceptor extends HibernateAccessor implements A * assuming that service layer transactions have flushed their changes on commit. * @see #setFlushMode */ - @Override public void postHandle(WebRequest request, ModelMap model) throws DataAccessException { if (isSingleSession()) { // Only potentially flush in single session mode. @@ -212,7 +210,6 @@ public class OpenSessionInViewInterceptor extends HibernateAccessor implements A * been opened during the current request (in deferred close mode). * @see org.springframework.transaction.support.TransactionSynchronizationManager */ - @Override public void afterCompletion(WebRequest request, Exception ex) throws DataAccessException { if (!decrementParticipateCount(request)) { if (isSingleSession()) { @@ -229,7 +226,6 @@ public class OpenSessionInViewInterceptor extends HibernateAccessor implements A } } - @Override public void afterConcurrentHandlingStarted(WebRequest request) { if (!decrementParticipateCount(request)) { if (isSingleSession()) { diff --git a/spring-orm/src/main/java/org/springframework/orm/ibatis/SqlMapClientFactoryBean.java b/spring-orm/src/main/java/org/springframework/orm/ibatis/SqlMapClientFactoryBean.java index 6af4d7e500..8d10aadf8f 100644 --- a/spring-orm/src/main/java/org/springframework/orm/ibatis/SqlMapClientFactoryBean.java +++ b/spring-orm/src/main/java/org/springframework/orm/ibatis/SqlMapClientFactoryBean.java @@ -282,7 +282,6 @@ public class SqlMapClientFactoryBean implements FactoryBean, Initi } - @Override public void afterPropertiesSet() throws Exception { if (this.lobHandler != null) { // Make given LobHandler available for SqlMapClient configuration. @@ -383,17 +382,14 @@ public class SqlMapClientFactoryBean implements FactoryBean, Initi } - @Override public SqlMapClient getObject() { return this.sqlMapClient; } - @Override public Class getObjectType() { return (this.sqlMapClient != null ? this.sqlMapClient.getClass() : SqlMapClient.class); } - @Override public boolean isSingleton() { return true; } diff --git a/spring-orm/src/main/java/org/springframework/orm/ibatis/SqlMapClientTemplate.java b/spring-orm/src/main/java/org/springframework/orm/ibatis/SqlMapClientTemplate.java index ddcf1f198a..fce0f2ad19 100644 --- a/spring-orm/src/main/java/org/springframework/orm/ibatis/SqlMapClientTemplate.java +++ b/spring-orm/src/main/java/org/springframework/orm/ibatis/SqlMapClientTemplate.java @@ -261,87 +261,73 @@ public class SqlMapClientTemplate extends JdbcAccessor implements SqlMapClientOp } - @Override public Object queryForObject(String statementName) throws DataAccessException { return queryForObject(statementName, null); } - @Override public Object queryForObject(final String statementName, final Object parameterObject) throws DataAccessException { return execute(new SqlMapClientCallback() { - @Override public Object doInSqlMapClient(SqlMapExecutor executor) throws SQLException { return executor.queryForObject(statementName, parameterObject); } }); } - @Override public Object queryForObject( final String statementName, final Object parameterObject, final Object resultObject) throws DataAccessException { return execute(new SqlMapClientCallback() { - @Override public Object doInSqlMapClient(SqlMapExecutor executor) throws SQLException { return executor.queryForObject(statementName, parameterObject, resultObject); } }); } - @Override public List queryForList(String statementName) throws DataAccessException { return queryForList(statementName, null); } - @Override public List queryForList(final String statementName, final Object parameterObject) throws DataAccessException { return execute(new SqlMapClientCallback() { - @Override public List doInSqlMapClient(SqlMapExecutor executor) throws SQLException { return executor.queryForList(statementName, parameterObject); } }); } - @Override public List queryForList(String statementName, int skipResults, int maxResults) throws DataAccessException { return queryForList(statementName, null, skipResults, maxResults); } - @Override public List queryForList( final String statementName, final Object parameterObject, final int skipResults, final int maxResults) throws DataAccessException { return execute(new SqlMapClientCallback() { - @Override public List doInSqlMapClient(SqlMapExecutor executor) throws SQLException { return executor.queryForList(statementName, parameterObject, skipResults, maxResults); } }); } - @Override public void queryWithRowHandler(String statementName, RowHandler rowHandler) throws DataAccessException { queryWithRowHandler(statementName, null, rowHandler); } - @Override public void queryWithRowHandler( final String statementName, final Object parameterObject, final RowHandler rowHandler) throws DataAccessException { execute(new SqlMapClientCallback() { - @Override public Object doInSqlMapClient(SqlMapExecutor executor) throws SQLException { executor.queryWithRowHandler(statementName, parameterObject, rowHandler); return null; @@ -349,67 +335,56 @@ public class SqlMapClientTemplate extends JdbcAccessor implements SqlMapClientOp }); } - @Override public Map queryForMap( final String statementName, final Object parameterObject, final String keyProperty) throws DataAccessException { return execute(new SqlMapClientCallback() { - @Override public Map doInSqlMapClient(SqlMapExecutor executor) throws SQLException { return executor.queryForMap(statementName, parameterObject, keyProperty); } }); } - @Override public Map queryForMap( final String statementName, final Object parameterObject, final String keyProperty, final String valueProperty) throws DataAccessException { return execute(new SqlMapClientCallback() { - @Override public Map doInSqlMapClient(SqlMapExecutor executor) throws SQLException { return executor.queryForMap(statementName, parameterObject, keyProperty, valueProperty); } }); } - @Override public Object insert(String statementName) throws DataAccessException { return insert(statementName, null); } - @Override public Object insert(final String statementName, final Object parameterObject) throws DataAccessException { return execute(new SqlMapClientCallback() { - @Override public Object doInSqlMapClient(SqlMapExecutor executor) throws SQLException { return executor.insert(statementName, parameterObject); } }); } - @Override public int update(String statementName) throws DataAccessException { return update(statementName, null); } - @Override public int update(final String statementName, final Object parameterObject) throws DataAccessException { return execute(new SqlMapClientCallback() { - @Override public Integer doInSqlMapClient(SqlMapExecutor executor) throws SQLException { return executor.update(statementName, parameterObject); } }); } - @Override public void update(String statementName, Object parameterObject, int requiredRowsAffected) throws DataAccessException { @@ -420,24 +395,20 @@ public class SqlMapClientTemplate extends JdbcAccessor implements SqlMapClientOp } } - @Override public int delete(String statementName) throws DataAccessException { return delete(statementName, null); } - @Override public int delete(final String statementName, final Object parameterObject) throws DataAccessException { return execute(new SqlMapClientCallback() { - @Override public Integer doInSqlMapClient(SqlMapExecutor executor) throws SQLException { return executor.delete(statementName, parameterObject); } }); } - @Override public void delete(String statementName, Object parameterObject, int requiredRowsAffected) throws DataAccessException { diff --git a/spring-orm/src/main/java/org/springframework/orm/ibatis/support/AbstractLobTypeHandler.java b/spring-orm/src/main/java/org/springframework/orm/ibatis/support/AbstractLobTypeHandler.java index 5f2a3600d1..77189f9de7 100644 --- a/spring-orm/src/main/java/org/springframework/orm/ibatis/support/AbstractLobTypeHandler.java +++ b/spring-orm/src/main/java/org/springframework/orm/ibatis/support/AbstractLobTypeHandler.java @@ -91,7 +91,6 @@ public abstract class AbstractLobTypeHandler extends BaseTypeHandler { * LobHandler of this type. * @see #setParameterInternal */ - @Override public final void setParameter(PreparedStatement ps, int i, Object parameter, String jdbcType) throws SQLException { @@ -117,7 +116,6 @@ public abstract class AbstractLobTypeHandler extends BaseTypeHandler { * @see #getResult(java.sql.ResultSet, String) * @see java.sql.ResultSet#findColumn */ - @Override public final Object getResult(ResultSet rs, String columnName) throws SQLException { return getResult(rs, rs.findColumn(columnName)); } @@ -127,7 +125,6 @@ public abstract class AbstractLobTypeHandler extends BaseTypeHandler { * passing in the LobHandler of this type. * @see #getResultInternal */ - @Override public final Object getResult(ResultSet rs, int columnIndex) throws SQLException { try { return getResultInternal(rs, columnIndex, this.lobHandler); @@ -142,7 +139,6 @@ public abstract class AbstractLobTypeHandler extends BaseTypeHandler { * This implementation always throws a SQLException: * retrieving LOBs from a CallableStatement is not supported. */ - @Override public Object getResult(CallableStatement cs, int columnIndex) throws SQLException { throw new SQLException("Retrieving LOBs from a CallableStatement is not supported"); } diff --git a/spring-orm/src/main/java/org/springframework/orm/ibatis/support/BlobByteArrayTypeHandler.java b/spring-orm/src/main/java/org/springframework/orm/ibatis/support/BlobByteArrayTypeHandler.java index f41cbaae8f..8c9447fa43 100644 --- a/spring-orm/src/main/java/org/springframework/orm/ibatis/support/BlobByteArrayTypeHandler.java +++ b/spring-orm/src/main/java/org/springframework/orm/ibatis/support/BlobByteArrayTypeHandler.java @@ -70,7 +70,6 @@ public class BlobByteArrayTypeHandler extends AbstractLobTypeHandler { return lobHandler.getBlobAsBytes(rs, index); } - @Override public Object valueOf(String s) { return s.getBytes(); } diff --git a/spring-orm/src/main/java/org/springframework/orm/ibatis/support/BlobSerializableTypeHandler.java b/spring-orm/src/main/java/org/springframework/orm/ibatis/support/BlobSerializableTypeHandler.java index aded9e5ce3..6c07ed5b22 100644 --- a/spring-orm/src/main/java/org/springframework/orm/ibatis/support/BlobSerializableTypeHandler.java +++ b/spring-orm/src/main/java/org/springframework/orm/ibatis/support/BlobSerializableTypeHandler.java @@ -106,7 +106,6 @@ public class BlobSerializableTypeHandler extends AbstractLobTypeHandler { } } - @Override public Object valueOf(String s) { return s; } diff --git a/spring-orm/src/main/java/org/springframework/orm/ibatis/support/ClobStringTypeHandler.java b/spring-orm/src/main/java/org/springframework/orm/ibatis/support/ClobStringTypeHandler.java index a65f884bbe..e2d80e70f0 100644 --- a/spring-orm/src/main/java/org/springframework/orm/ibatis/support/ClobStringTypeHandler.java +++ b/spring-orm/src/main/java/org/springframework/orm/ibatis/support/ClobStringTypeHandler.java @@ -73,7 +73,6 @@ public class ClobStringTypeHandler extends AbstractLobTypeHandler { return lobHandler.getClobAsString(rs, index); } - @Override public Object valueOf(String s) { return s; } diff --git a/spring-orm/src/main/java/org/springframework/orm/jdo/DefaultJdoDialect.java b/spring-orm/src/main/java/org/springframework/orm/jdo/DefaultJdoDialect.java index 348ca0811d..38d0f7263a 100644 --- a/spring-orm/src/main/java/org/springframework/orm/jdo/DefaultJdoDialect.java +++ b/spring-orm/src/main/java/org/springframework/orm/jdo/DefaultJdoDialect.java @@ -128,7 +128,6 @@ public class DefaultJdoDialect implements JdoDialect, PersistenceExceptionTransl * @see javax.jdo.Transaction#begin * @see org.springframework.transaction.InvalidIsolationLevelException */ - @Override public Object beginTransaction(Transaction transaction, TransactionDefinition definition) throws JDOException, SQLException, TransactionException { @@ -146,7 +145,6 @@ public class DefaultJdoDialect implements JdoDialect, PersistenceExceptionTransl * does not require any cleanup. * @see #beginTransaction */ - @Override public void cleanupTransaction(Object transactionData) { } @@ -171,7 +169,6 @@ public class DefaultJdoDialect implements JdoDialect, PersistenceExceptionTransl * @see org.springframework.jdbc.support.nativejdbc.NativeJdbcExtractor * @see org.springframework.jdbc.datasource.DataSourceUtils#releaseConnection */ - @Override public ConnectionHandle getJdbcConnection(PersistenceManager pm, boolean readOnly) throws JDOException, SQLException { @@ -186,7 +183,6 @@ public class DefaultJdoDialect implements JdoDialect, PersistenceExceptionTransl * {@code Connection.close} here. * @see java.sql.Connection#close() */ - @Override public void releaseJdbcConnection(ConnectionHandle conHandle, PersistenceManager pm) throws JDOException, SQLException { } @@ -197,7 +193,6 @@ public class DefaultJdoDialect implements JdoDialect, PersistenceExceptionTransl * "javax.persistence.query.timeout", assuming that JDO providers are often * JPA providers as well. */ - @Override public void applyQueryTimeout(Query query, int remainingTimeInSeconds) throws JDOException { if (setTimeoutMillisMethod != null) { ReflectionUtils.invokeMethod(setTimeoutMillisMethod, query, remainingTimeInSeconds); @@ -221,7 +216,6 @@ public class DefaultJdoDialect implements JdoDialect, PersistenceExceptionTransl * @see org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor * @see #translateException */ - @Override public DataAccessException translateExceptionIfPossible(RuntimeException ex) { if (ex instanceof JDOException) { return translateException((JDOException) ex); @@ -233,7 +227,6 @@ public class DefaultJdoDialect implements JdoDialect, PersistenceExceptionTransl * This implementation delegates to PersistenceManagerFactoryUtils. * @see PersistenceManagerFactoryUtils#convertJdoAccessException */ - @Override public DataAccessException translateException(JDOException ex) { if (getJdbcExceptionTranslator() != null && ex.getCause() instanceof SQLException) { return getJdbcExceptionTranslator().translate("JDO operation: " + ex.getMessage(), @@ -269,12 +262,10 @@ public class DefaultJdoDialect implements JdoDialect, PersistenceExceptionTransl this.persistenceManager = persistenceManager; } - @Override public Connection getConnection() { return (Connection) this.persistenceManager.getDataStoreConnection(); } - @Override public void releaseConnection(Connection con) { JdbcUtils.closeConnection(con); } diff --git a/spring-orm/src/main/java/org/springframework/orm/jdo/JdoAccessor.java b/spring-orm/src/main/java/org/springframework/orm/jdo/JdoAccessor.java index 00e35acded..25d466f612 100644 --- a/spring-orm/src/main/java/org/springframework/orm/jdo/JdoAccessor.java +++ b/spring-orm/src/main/java/org/springframework/orm/jdo/JdoAccessor.java @@ -131,7 +131,6 @@ public abstract class JdoAccessor implements InitializingBean { * Eagerly initialize the JDO dialect, creating a default one * for the specified PersistenceManagerFactory if none set. */ - @Override public void afterPropertiesSet() { if (getPersistenceManagerFactory() == null) { throw new IllegalArgumentException("Property 'persistenceManagerFactory' is required"); diff --git a/spring-orm/src/main/java/org/springframework/orm/jdo/JdoInterceptor.java b/spring-orm/src/main/java/org/springframework/orm/jdo/JdoInterceptor.java index 1c7229d79b..ff105e48ab 100644 --- a/spring-orm/src/main/java/org/springframework/orm/jdo/JdoInterceptor.java +++ b/spring-orm/src/main/java/org/springframework/orm/jdo/JdoInterceptor.java @@ -90,7 +90,6 @@ public class JdoInterceptor extends JdoAccessor implements MethodInterceptor { } - @Override public Object invoke(MethodInvocation methodInvocation) throws Throwable { boolean existingTransaction = false; PersistenceManager pm = PersistenceManagerFactoryUtils.getPersistenceManager(getPersistenceManagerFactory(), true); diff --git a/spring-orm/src/main/java/org/springframework/orm/jdo/JdoTemplate.java b/spring-orm/src/main/java/org/springframework/orm/jdo/JdoTemplate.java index c2d5ddf405..ce0f61aefc 100644 --- a/spring-orm/src/main/java/org/springframework/orm/jdo/JdoTemplate.java +++ b/spring-orm/src/main/java/org/springframework/orm/jdo/JdoTemplate.java @@ -175,12 +175,10 @@ public class JdoTemplate extends JdoAccessor implements JdoOperations { } - @Override public T execute(JdoCallback action) throws DataAccessException { return execute(action, isExposeNativePersistenceManager()); } - @Override public Collection executeFind(JdoCallback action) throws DataAccessException { Object result = execute(action, isExposeNativePersistenceManager()); if (result != null && !(result instanceof Collection)) { @@ -264,30 +262,24 @@ public class JdoTemplate extends JdoAccessor implements JdoOperations { // Convenience methods for load, save, delete //------------------------------------------------------------------------- - @Override public Object getObjectById(final Object objectId) throws DataAccessException { return execute(new JdoCallback() { - @Override public Object doInJdo(PersistenceManager pm) throws JDOException { return pm.getObjectById(objectId, true); } }, true); } - @Override public T getObjectById(final Class entityClass, final Object idValue) throws DataAccessException { return execute(new JdoCallback() { - @Override public T doInJdo(PersistenceManager pm) throws JDOException { return pm.getObjectById(entityClass, idValue); } }, true); } - @Override public void evict(final Object entity) throws DataAccessException { execute(new JdoCallback() { - @Override public Object doInJdo(PersistenceManager pm) throws JDOException { pm.evict(entity); return null; @@ -295,10 +287,8 @@ public class JdoTemplate extends JdoAccessor implements JdoOperations { }, true); } - @Override public void evictAll(final Collection entities) throws DataAccessException { execute(new JdoCallback() { - @Override public Object doInJdo(PersistenceManager pm) throws JDOException { pm.evictAll(entities); return null; @@ -306,10 +296,8 @@ public class JdoTemplate extends JdoAccessor implements JdoOperations { }, true); } - @Override public void evictAll() throws DataAccessException { execute(new JdoCallback() { - @Override public Object doInJdo(PersistenceManager pm) throws JDOException { pm.evictAll(); return null; @@ -317,10 +305,8 @@ public class JdoTemplate extends JdoAccessor implements JdoOperations { }, true); } - @Override public void refresh(final Object entity) throws DataAccessException { execute(new JdoCallback() { - @Override public Object doInJdo(PersistenceManager pm) throws JDOException { pm.refresh(entity); return null; @@ -328,10 +314,8 @@ public class JdoTemplate extends JdoAccessor implements JdoOperations { }, true); } - @Override public void refreshAll(final Collection entities) throws DataAccessException { execute(new JdoCallback() { - @Override public Object doInJdo(PersistenceManager pm) throws JDOException { pm.refreshAll(entities); return null; @@ -339,10 +323,8 @@ public class JdoTemplate extends JdoAccessor implements JdoOperations { }, true); } - @Override public void refreshAll() throws DataAccessException { execute(new JdoCallback() { - @Override public Object doInJdo(PersistenceManager pm) throws JDOException { pm.refreshAll(); return null; @@ -350,30 +332,24 @@ public class JdoTemplate extends JdoAccessor implements JdoOperations { }, true); } - @Override public T makePersistent(final T entity) throws DataAccessException { return execute(new JdoCallback() { - @Override public T doInJdo(PersistenceManager pm) throws JDOException { return pm.makePersistent(entity); } }, true); } - @Override public Collection makePersistentAll(final Collection entities) throws DataAccessException { return execute(new JdoCallback>() { - @Override public Collection doInJdo(PersistenceManager pm) throws JDOException { return pm.makePersistentAll(entities); } }, true); } - @Override public void deletePersistent(final Object entity) throws DataAccessException { execute(new JdoCallback() { - @Override public Object doInJdo(PersistenceManager pm) throws JDOException { pm.deletePersistent(entity); return null; @@ -381,10 +357,8 @@ public class JdoTemplate extends JdoAccessor implements JdoOperations { }, true); } - @Override public void deletePersistentAll(final Collection entities) throws DataAccessException { execute(new JdoCallback() { - @Override public Object doInJdo(PersistenceManager pm) throws JDOException { pm.deletePersistentAll(entities); return null; @@ -392,30 +366,24 @@ public class JdoTemplate extends JdoAccessor implements JdoOperations { }, true); } - @Override public T detachCopy(final T entity) { return execute(new JdoCallback() { - @Override public T doInJdo(PersistenceManager pm) throws JDOException { return pm.detachCopy(entity); } }, true); } - @Override public Collection detachCopyAll(final Collection entities) { return execute(new JdoCallback>() { - @Override public Collection doInJdo(PersistenceManager pm) throws JDOException { return pm.detachCopyAll(entities); } }, true); } - @Override public void flush() throws DataAccessException { execute(new JdoCallback() { - @Override public Object doInJdo(PersistenceManager pm) throws JDOException { pm.flush(); return null; @@ -428,22 +396,18 @@ public class JdoTemplate extends JdoAccessor implements JdoOperations { // Convenience finder methods //------------------------------------------------------------------------- - @Override public Collection find(Class entityClass) throws DataAccessException { return find(entityClass, null, null); } - @Override public Collection find(Class entityClass, String filter) throws DataAccessException { return find(entityClass, filter, null); } - @Override public Collection find(final Class entityClass, final String filter, final String ordering) throws DataAccessException { return execute(new JdoCallback>() { - @Override @SuppressWarnings("unchecked") public Collection doInJdo(PersistenceManager pm) throws JDOException { Query query = (filter != null ? pm.newQuery(entityClass, filter) : pm.newQuery(entityClass)); @@ -456,20 +420,17 @@ public class JdoTemplate extends JdoAccessor implements JdoOperations { }, true); } - @Override public Collection find(Class entityClass, String filter, String parameters, Object... values) throws DataAccessException { return find(entityClass, filter, parameters, values, null); } - @Override public Collection find( final Class entityClass, final String filter, final String parameters, final Object[] values, final String ordering) throws DataAccessException { return execute(new JdoCallback>() { - @Override @SuppressWarnings("unchecked") public Collection doInJdo(PersistenceManager pm) throws JDOException { Query query = pm.newQuery(entityClass, filter); @@ -483,7 +444,6 @@ public class JdoTemplate extends JdoAccessor implements JdoOperations { }, true); } - @Override public Collection find( Class entityClass, String filter, String parameters, Map values) throws DataAccessException { @@ -491,13 +451,11 @@ public class JdoTemplate extends JdoAccessor implements JdoOperations { return find(entityClass, filter, parameters, values, null); } - @Override public Collection find( final Class entityClass, final String filter, final String parameters, final Map values, final String ordering) throws DataAccessException { return execute(new JdoCallback>() { - @Override @SuppressWarnings("unchecked") public Collection doInJdo(PersistenceManager pm) throws JDOException { Query query = pm.newQuery(entityClass, filter); @@ -511,10 +469,8 @@ public class JdoTemplate extends JdoAccessor implements JdoOperations { }, true); } - @Override public Collection find(final String language, final Object queryObject) throws DataAccessException { return execute(new JdoCallback() { - @Override public Collection doInJdo(PersistenceManager pm) throws JDOException { Query query = pm.newQuery(language, queryObject); prepareQuery(query); @@ -523,10 +479,8 @@ public class JdoTemplate extends JdoAccessor implements JdoOperations { }, true); } - @Override public Collection find(final String queryString) throws DataAccessException { return execute(new JdoCallback() { - @Override @SuppressWarnings("unchecked") public Collection doInJdo(PersistenceManager pm) throws JDOException { Query query = pm.newQuery(queryString); @@ -536,10 +490,8 @@ public class JdoTemplate extends JdoAccessor implements JdoOperations { }, true); } - @Override public Collection find(final String queryString, final Object... values) throws DataAccessException { return execute(new JdoCallback() { - @Override public Collection doInJdo(PersistenceManager pm) throws JDOException { Query query = pm.newQuery(queryString); prepareQuery(query); @@ -548,10 +500,8 @@ public class JdoTemplate extends JdoAccessor implements JdoOperations { }, true); } - @Override public Collection find(final String queryString, final Map values) throws DataAccessException { return execute(new JdoCallback() { - @Override public Collection doInJdo(PersistenceManager pm) throws JDOException { Query query = pm.newQuery(queryString); prepareQuery(query); @@ -560,12 +510,10 @@ public class JdoTemplate extends JdoAccessor implements JdoOperations { }, true); } - @Override public Collection findByNamedQuery(final Class entityClass, final String queryName) throws DataAccessException { return execute(new JdoCallback>() { - @Override @SuppressWarnings("unchecked") public Collection doInJdo(PersistenceManager pm) throws JDOException { Query query = pm.newNamedQuery(entityClass, queryName); @@ -575,12 +523,10 @@ public class JdoTemplate extends JdoAccessor implements JdoOperations { }, true); } - @Override public Collection findByNamedQuery(final Class entityClass, final String queryName, final Object... values) throws DataAccessException { return execute(new JdoCallback>() { - @Override @SuppressWarnings("unchecked") public Collection doInJdo(PersistenceManager pm) throws JDOException { Query query = pm.newNamedQuery(entityClass, queryName); @@ -590,13 +536,11 @@ public class JdoTemplate extends JdoAccessor implements JdoOperations { }, true); } - @Override public Collection findByNamedQuery( final Class entityClass, final String queryName, final Map values) throws DataAccessException { return execute(new JdoCallback>() { - @Override @SuppressWarnings("unchecked") public Collection doInJdo(PersistenceManager pm) throws JDOException { Query query = pm.newNamedQuery(entityClass, queryName); @@ -641,7 +585,6 @@ public class JdoTemplate extends JdoAccessor implements JdoOperations { this.target = target; } - @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { // Invocation on PersistenceManager interface (or provider-specific extension) coming in... diff --git a/spring-orm/src/main/java/org/springframework/orm/jdo/JdoTransactionManager.java b/spring-orm/src/main/java/org/springframework/orm/jdo/JdoTransactionManager.java index 52876dfab1..412a12087a 100644 --- a/spring-orm/src/main/java/org/springframework/orm/jdo/JdoTransactionManager.java +++ b/spring-orm/src/main/java/org/springframework/orm/jdo/JdoTransactionManager.java @@ -232,7 +232,6 @@ public class JdoTransactionManager extends AbstractPlatformTransactionManager * for the specified PersistenceManagerFactory if none set. * Auto-detect the PersistenceManagerFactory's DataSource, if any. */ - @Override public void afterPropertiesSet() { if (getPersistenceManagerFactory() == null) { throw new IllegalArgumentException("Property 'persistenceManagerFactory' is required"); @@ -257,7 +256,6 @@ public class JdoTransactionManager extends AbstractPlatformTransactionManager } - @Override public Object getResourceFactory() { return getPersistenceManagerFactory(); } @@ -573,13 +571,11 @@ public class JdoTransactionManager extends AbstractPlatformTransactionManager } } - @Override public boolean isRollbackOnly() { Transaction tx = this.persistenceManagerHolder.getPersistenceManager().currentTransaction(); return tx.getRollbackOnly(); } - @Override public void flush() { try { this.persistenceManagerHolder.getPersistenceManager().flush(); diff --git a/spring-orm/src/main/java/org/springframework/orm/jdo/LocalPersistenceManagerFactoryBean.java b/spring-orm/src/main/java/org/springframework/orm/jdo/LocalPersistenceManagerFactoryBean.java index a1e63ca4a2..112a1c5758 100644 --- a/spring-orm/src/main/java/org/springframework/orm/jdo/LocalPersistenceManagerFactoryBean.java +++ b/spring-orm/src/main/java/org/springframework/orm/jdo/LocalPersistenceManagerFactoryBean.java @@ -196,7 +196,6 @@ public class LocalPersistenceManagerFactoryBean implements FactoryBean getObjectType() { return (this.persistenceManagerFactory != null ? this.persistenceManagerFactory.getClass() : PersistenceManagerFactory.class); } - @Override public boolean isSingleton() { return true; } @@ -303,7 +298,6 @@ public class LocalPersistenceManagerFactoryBean implements FactoryBean getObjectType() { return PersistenceManagerFactory.class; } - @Override public boolean isSingleton() { return true; } @@ -145,7 +142,6 @@ public class TransactionAwarePersistenceManagerFactoryProxy implements FactoryBe */ private class PersistenceManagerFactoryInvocationHandler implements InvocationHandler { - @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { // Invocation on PersistenceManagerFactory interface coming in... @@ -192,7 +188,6 @@ public class TransactionAwarePersistenceManagerFactoryProxy implements FactoryBe this.persistenceManagerFactory = pmf; } - @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { // Invocation on PersistenceManager interface coming in... diff --git a/spring-orm/src/main/java/org/springframework/orm/jdo/support/OpenPersistenceManagerInViewInterceptor.java b/spring-orm/src/main/java/org/springframework/orm/jdo/support/OpenPersistenceManagerInViewInterceptor.java index f54c081023..6e7ad31b23 100644 --- a/spring-orm/src/main/java/org/springframework/orm/jdo/support/OpenPersistenceManagerInViewInterceptor.java +++ b/spring-orm/src/main/java/org/springframework/orm/jdo/support/OpenPersistenceManagerInViewInterceptor.java @@ -89,7 +89,6 @@ public class OpenPersistenceManagerInViewInterceptor implements WebRequestInterc } - @Override public void preHandle(WebRequest request) throws DataAccessException { if (TransactionSynchronizationManager.hasResource(getPersistenceManagerFactory())) { // Do not modify the PersistenceManager: just mark the request accordingly. @@ -107,11 +106,9 @@ public class OpenPersistenceManagerInViewInterceptor implements WebRequestInterc } } - @Override public void postHandle(WebRequest request, ModelMap model) { } - @Override public void afterCompletion(WebRequest request, Exception ex) throws DataAccessException { String participateAttributeName = getParticipateAttributeName(); Integer count = (Integer) request.getAttribute(participateAttributeName, WebRequest.SCOPE_REQUEST); diff --git a/spring-orm/src/main/java/org/springframework/orm/jdo/support/SpringPersistenceManagerProxyBean.java b/spring-orm/src/main/java/org/springframework/orm/jdo/support/SpringPersistenceManagerProxyBean.java index 1923d01efa..9176c63791 100644 --- a/spring-orm/src/main/java/org/springframework/orm/jdo/support/SpringPersistenceManagerProxyBean.java +++ b/spring-orm/src/main/java/org/springframework/orm/jdo/support/SpringPersistenceManagerProxyBean.java @@ -144,7 +144,6 @@ public class SpringPersistenceManagerProxyBean implements FactoryBean getObjectType() { return getPersistenceManagerInterface(); } - @Override public boolean isSingleton() { return true; } @@ -181,7 +177,6 @@ public class SpringPersistenceManagerProxyBean implements FactoryBean getObjectType() { return (this.proxy != null ? this.proxy.getClass() : PersistenceManager.class); } - @Override public boolean isSingleton() { return true; } diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/AbstractEntityManagerFactoryBean.java b/spring-orm/src/main/java/org/springframework/orm/jpa/AbstractEntityManagerFactoryBean.java index aa4bd5ef93..6d20ec34d9 100644 --- a/spring-orm/src/main/java/org/springframework/orm/jpa/AbstractEntityManagerFactoryBean.java +++ b/spring-orm/src/main/java/org/springframework/orm/jpa/AbstractEntityManagerFactoryBean.java @@ -142,7 +142,6 @@ public abstract class AbstractEntityManagerFactoryBean implements this.persistenceProvider = persistenceProvider; } - @Override public PersistenceProvider getPersistenceProvider() { return this.persistenceProvider; } @@ -158,7 +157,6 @@ public abstract class AbstractEntityManagerFactoryBean implements this.persistenceUnitName = persistenceUnitName; } - @Override public String getPersistenceUnitName() { return this.persistenceUnitName; } @@ -225,7 +223,6 @@ public abstract class AbstractEntityManagerFactoryBean implements this.entityManagerInterface = emInterface; } - @Override public Class getEntityManagerInterface() { return this.entityManagerInterface; } @@ -241,7 +238,6 @@ public abstract class AbstractEntityManagerFactoryBean implements this.jpaDialect = jpaDialect; } - @Override public JpaDialect getJpaDialect() { return this.jpaDialect; } @@ -264,28 +260,23 @@ public abstract class AbstractEntityManagerFactoryBean implements return this.jpaVendorAdapter; } - @Override public void setBeanClassLoader(ClassLoader classLoader) { this.beanClassLoader = classLoader; } - @Override public ClassLoader getBeanClassLoader() { return this.beanClassLoader; } - @Override public void setBeanFactory(BeanFactory beanFactory) { this.beanFactory = beanFactory; } - @Override public void setBeanName(String name) { this.beanName = name; } - @Override public final void afterPropertiesSet() throws PersistenceException { if (this.jpaVendorAdapter != null) { if (this.persistenceProvider == null) { @@ -408,23 +399,19 @@ public abstract class AbstractEntityManagerFactoryBean implements * @see JpaDialect#translateExceptionIfPossible * @see EntityManagerFactoryUtils#convertJpaAccessExceptionIfPossible */ - @Override public DataAccessException translateExceptionIfPossible(RuntimeException ex) { return (this.jpaDialect != null ? this.jpaDialect.translateExceptionIfPossible(ex) : EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(ex)); } - @Override public EntityManagerFactory getNativeEntityManagerFactory() { return this.nativeEntityManagerFactory; } - @Override public PersistenceUnitInfo getPersistenceUnitInfo() { return null; } - @Override public DataSource getDataSource() { return null; } @@ -433,17 +420,14 @@ public abstract class AbstractEntityManagerFactoryBean implements /** * Return the singleton EntityManagerFactory. */ - @Override public EntityManagerFactory getObject() { return this.entityManagerFactory; } - @Override public Class getObjectType() { return (this.entityManagerFactory != null ? this.entityManagerFactory.getClass() : EntityManagerFactory.class); } - @Override public boolean isSingleton() { return true; } @@ -452,7 +436,6 @@ public abstract class AbstractEntityManagerFactoryBean implements /** * Close the EntityManagerFactory on bean factory shutdown. */ - @Override public void destroy() { if (logger.isInfoEnabled()) { logger.info("Closing JPA EntityManagerFactory for persistence unit '" + getPersistenceUnitName() + "'"); @@ -516,7 +499,6 @@ public abstract class AbstractEntityManagerFactoryBean implements this.entityManagerFactoryBean = emfb; } - @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { try { if (method.getName().equals("equals")) { diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/DefaultJpaDialect.java b/spring-orm/src/main/java/org/springframework/orm/jpa/DefaultJpaDialect.java index 5e211a011f..63df63e531 100644 --- a/spring-orm/src/main/java/org/springframework/orm/jpa/DefaultJpaDialect.java +++ b/spring-orm/src/main/java/org/springframework/orm/jpa/DefaultJpaDialect.java @@ -60,7 +60,6 @@ public class DefaultJpaDialect implements JpaDialect, Serializable { * @see org.springframework.transaction.InvalidIsolationLevelException * @see #cleanupTransaction */ - @Override public Object beginTransaction(EntityManager entityManager, TransactionDefinition definition) throws PersistenceException, SQLException, TransactionException { @@ -73,7 +72,6 @@ public class DefaultJpaDialect implements JpaDialect, Serializable { return null; } - @Override public Object prepareTransaction(EntityManager entityManager, boolean readOnly, String name) throws PersistenceException { @@ -85,7 +83,6 @@ public class DefaultJpaDialect implements JpaDialect, Serializable { * implementation does not require any cleanup. * @see #beginTransaction */ - @Override public void cleanupTransaction(Object transactionData) { } @@ -93,7 +90,6 @@ public class DefaultJpaDialect implements JpaDialect, Serializable { * This implementation always returns {@code null}, * indicating that no JDBC Connection can be provided. */ - @Override public ConnectionHandle getJdbcConnection(EntityManager entityManager, boolean readOnly) throws PersistenceException, SQLException { @@ -108,7 +104,6 @@ public class DefaultJpaDialect implements JpaDialect, Serializable { * {@code Connection.close()} (or some other method with similar effect) here. * @see java.sql.Connection#close() */ - @Override public void releaseJdbcConnection(ConnectionHandle conHandle, EntityManager em) throws PersistenceException, SQLException { } @@ -122,28 +117,23 @@ public class DefaultJpaDialect implements JpaDialect, Serializable { * This implementation delegates to EntityManagerFactoryUtils. * @see EntityManagerFactoryUtils#convertJpaAccessExceptionIfPossible */ - @Override public DataAccessException translateExceptionIfPossible(RuntimeException ex) { return EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(ex); } - @Override public boolean supportsEntityManagerFactoryPlusOperations() { return false; } - @Override public boolean supportsEntityManagerPlusOperations() { return false; } - @Override public EntityManagerFactoryPlusOperations getEntityManagerFactoryPlusOperations(EntityManagerFactory rawEntityManager) { throw new UnsupportedOperationException(getClass().getName() + " does not support EntityManagerFactoryPlusOperations"); } - @Override public EntityManagerPlusOperations getEntityManagerPlusOperations(EntityManager rawEntityManager) { throw new UnsupportedOperationException(getClass().getName() + " does not support EntityManagerPlusOperations"); } diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/EntityManagerFactoryAccessor.java b/spring-orm/src/main/java/org/springframework/orm/jpa/EntityManagerFactoryAccessor.java index a7bba4d678..3d7c0041be 100644 --- a/spring-orm/src/main/java/org/springframework/orm/jpa/EntityManagerFactoryAccessor.java +++ b/spring-orm/src/main/java/org/springframework/orm/jpa/EntityManagerFactoryAccessor.java @@ -129,7 +129,6 @@ public abstract class EntityManagerFactoryAccessor implements BeanFactoryAware { * Falls back to a default EntityManagerFactory bean if no persistence unit specified. * @see #setPersistenceUnitName */ - @Override public void setBeanFactory(BeanFactory beanFactory) throws BeansException { if (getEntityManagerFactory() == null) { if (!(beanFactory instanceof ListableBeanFactory)) { diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/EntityManagerFactoryUtils.java b/spring-orm/src/main/java/org/springframework/orm/jpa/EntityManagerFactoryUtils.java index 4b36277563..9419950001 100644 --- a/spring-orm/src/main/java/org/springframework/orm/jpa/EntityManagerFactoryUtils.java +++ b/spring-orm/src/main/java/org/springframework/orm/jpa/EntityManagerFactoryUtils.java @@ -372,7 +372,6 @@ public abstract class EntityManagerFactoryUtils { this.newEntityManager = newEm; } - @Override public int getOrder() { return ENTITY_MANAGER_SYNCHRONIZATION_ORDER; } diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/ExtendedEntityManagerCreator.java b/spring-orm/src/main/java/org/springframework/orm/jpa/ExtendedEntityManagerCreator.java index 5612eedf81..5f9783d2a1 100644 --- a/spring-orm/src/main/java/org/springframework/orm/jpa/ExtendedEntityManagerCreator.java +++ b/spring-orm/src/main/java/org/springframework/orm/jpa/ExtendedEntityManagerCreator.java @@ -309,7 +309,6 @@ public abstract class ExtendedEntityManagerCreator { } } - @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { // Invocation on EntityManager interface coming in... @@ -453,7 +452,6 @@ public abstract class ExtendedEntityManagerCreator { this.exceptionTranslator = exceptionTranslator; } - @Override public int getOrder() { return EntityManagerFactoryUtils.ENTITY_MANAGER_SYNCHRONIZATION_ORDER + 1; } diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/JpaAccessor.java b/spring-orm/src/main/java/org/springframework/orm/jpa/JpaAccessor.java index a749dd0de8..cb4b282a84 100644 --- a/spring-orm/src/main/java/org/springframework/orm/jpa/JpaAccessor.java +++ b/spring-orm/src/main/java/org/springframework/orm/jpa/JpaAccessor.java @@ -112,7 +112,6 @@ public abstract class JpaAccessor extends EntityManagerFactoryAccessor implement * Eagerly initialize the JPA dialect, creating a default one * for the specified EntityManagerFactory if none set. */ - @Override public void afterPropertiesSet() { EntityManagerFactory emf = getEntityManagerFactory(); if (emf == null && getEntityManager() == null) { diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/JpaInterceptor.java b/spring-orm/src/main/java/org/springframework/orm/jpa/JpaInterceptor.java index 4cf05816e6..cdb4830d3d 100644 --- a/spring-orm/src/main/java/org/springframework/orm/jpa/JpaInterceptor.java +++ b/spring-orm/src/main/java/org/springframework/orm/jpa/JpaInterceptor.java @@ -85,7 +85,6 @@ public class JpaInterceptor extends JpaAccessor implements MethodInterceptor { } - @Override public Object invoke(MethodInvocation methodInvocation) throws Throwable { // Determine current EntityManager: either the transactional one // managed by the factory or a temporary one for the given invocation. diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/JpaTemplate.java b/spring-orm/src/main/java/org/springframework/orm/jpa/JpaTemplate.java index 1773402303..1b039f6573 100644 --- a/spring-orm/src/main/java/org/springframework/orm/jpa/JpaTemplate.java +++ b/spring-orm/src/main/java/org/springframework/orm/jpa/JpaTemplate.java @@ -146,12 +146,10 @@ public class JpaTemplate extends JpaAccessor implements JpaOperations { } - @Override public T execute(JpaCallback action) throws DataAccessException { return execute(action, isExposeNativeEntityManager()); } - @Override public List executeFind(JpaCallback action) throws DataAccessException { Object result = execute(action, isExposeNativeEntityManager()); if (!(result instanceof List)) { @@ -231,40 +229,32 @@ public class JpaTemplate extends JpaAccessor implements JpaOperations { // Convenience methods for load, save, delete //------------------------------------------------------------------------- - @Override public T find(final Class entityClass, final Object id) throws DataAccessException { return execute(new JpaCallback() { - @Override public T doInJpa(EntityManager em) throws PersistenceException { return em.find(entityClass, id); } }, true); } - @Override public T getReference(final Class entityClass, final Object id) throws DataAccessException { return execute(new JpaCallback() { - @Override public T doInJpa(EntityManager em) throws PersistenceException { return em.getReference(entityClass, id); } }, true); } - @Override public boolean contains(final Object entity) throws DataAccessException { return execute(new JpaCallback() { - @Override public Boolean doInJpa(EntityManager em) throws PersistenceException { return em.contains(entity); } }, true); } - @Override public void refresh(final Object entity) throws DataAccessException { execute(new JpaCallback() { - @Override public Object doInJpa(EntityManager em) throws PersistenceException { em.refresh(entity); return null; @@ -272,10 +262,8 @@ public class JpaTemplate extends JpaAccessor implements JpaOperations { }, true); } - @Override public void persist(final Object entity) throws DataAccessException { execute(new JpaCallback() { - @Override public Object doInJpa(EntityManager em) throws PersistenceException { em.persist(entity); return null; @@ -283,20 +271,16 @@ public class JpaTemplate extends JpaAccessor implements JpaOperations { }, true); } - @Override public T merge(final T entity) throws DataAccessException { return execute(new JpaCallback() { - @Override public T doInJpa(EntityManager em) throws PersistenceException { return em.merge(entity); } }, true); } - @Override public void remove(final Object entity) throws DataAccessException { execute(new JpaCallback() { - @Override public Object doInJpa(EntityManager em) throws PersistenceException { em.remove(entity); return null; @@ -304,10 +288,8 @@ public class JpaTemplate extends JpaAccessor implements JpaOperations { }, true); } - @Override public void flush() throws DataAccessException { execute(new JpaCallback() { - @Override public Object doInJpa(EntityManager em) throws PersistenceException { em.flush(); return null; @@ -320,15 +302,12 @@ public class JpaTemplate extends JpaAccessor implements JpaOperations { // Convenience finder methods //------------------------------------------------------------------------- - @Override public List find(String queryString) throws DataAccessException { return find(queryString, (Object[]) null); } - @Override public List find(final String queryString, final Object... values) throws DataAccessException { return execute(new JpaCallback() { - @Override public List doInJpa(EntityManager em) throws PersistenceException { Query queryObject = em.createQuery(queryString); prepareQuery(queryObject); @@ -342,10 +321,8 @@ public class JpaTemplate extends JpaAccessor implements JpaOperations { }); } - @Override public List findByNamedParams(final String queryString, final Map params) throws DataAccessException { return execute(new JpaCallback() { - @Override public List doInJpa(EntityManager em) throws PersistenceException { Query queryObject = em.createQuery(queryString); prepareQuery(queryObject); @@ -359,15 +336,12 @@ public class JpaTemplate extends JpaAccessor implements JpaOperations { }); } - @Override public List findByNamedQuery(String queryName) throws DataAccessException { return findByNamedQuery(queryName, (Object[]) null); } - @Override public List findByNamedQuery(final String queryName, final Object... values) throws DataAccessException { return execute(new JpaCallback() { - @Override public List doInJpa(EntityManager em) throws PersistenceException { Query queryObject = em.createNamedQuery(queryName); prepareQuery(queryObject); @@ -381,12 +355,10 @@ public class JpaTemplate extends JpaAccessor implements JpaOperations { }); } - @Override public List findByNamedQueryAndNamedParams(final String queryName, final Map params) throws DataAccessException { return execute(new JpaCallback() { - @Override public List doInJpa(EntityManager em) throws PersistenceException { Query queryObject = em.createNamedQuery(queryName); prepareQuery(queryObject); @@ -436,7 +408,6 @@ public class JpaTemplate extends JpaAccessor implements JpaOperations { this.target = target; } - @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { // Invocation on EntityManager interface (or provider-specific extension) coming in... diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/JpaTransactionManager.java b/spring-orm/src/main/java/org/springframework/orm/jpa/JpaTransactionManager.java index 05de1ea092..259c6e3756 100644 --- a/spring-orm/src/main/java/org/springframework/orm/jpa/JpaTransactionManager.java +++ b/spring-orm/src/main/java/org/springframework/orm/jpa/JpaTransactionManager.java @@ -282,7 +282,6 @@ public class JpaTransactionManager extends AbstractPlatformTransactionManager * Falls back to a default EntityManagerFactory bean if no persistence unit specified. * @see #setPersistenceUnitName */ - @Override public void setBeanFactory(BeanFactory beanFactory) throws BeansException { if (getEntityManagerFactory() == null) { if (!(beanFactory instanceof ListableBeanFactory)) { @@ -299,7 +298,6 @@ public class JpaTransactionManager extends AbstractPlatformTransactionManager * for the specified EntityManagerFactory if none set. * Auto-detect the EntityManagerFactory's DataSource, if any. */ - @Override public void afterPropertiesSet() { if (getEntityManagerFactory() == null) { throw new IllegalArgumentException("'entityManagerFactory' or 'persistenceUnitName' is required"); @@ -318,7 +316,6 @@ public class JpaTransactionManager extends AbstractPlatformTransactionManager } - @Override public Object getResourceFactory() { return getEntityManagerFactory(); } @@ -656,13 +653,11 @@ public class JpaTransactionManager extends AbstractPlatformTransactionManager } } - @Override public boolean isRollbackOnly() { EntityTransaction tx = this.entityManagerHolder.getEntityManager().getTransaction(); return tx.getRollbackOnly(); } - @Override public void flush() { try { this.entityManagerHolder.getEntityManager().flush(); diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/LocalContainerEntityManagerFactoryBean.java b/spring-orm/src/main/java/org/springframework/orm/jpa/LocalContainerEntityManagerFactoryBean.java index 284f443b0d..7cef875f28 100644 --- a/spring-orm/src/main/java/org/springframework/orm/jpa/LocalContainerEntityManagerFactoryBean.java +++ b/spring-orm/src/main/java/org/springframework/orm/jpa/LocalContainerEntityManagerFactoryBean.java @@ -240,12 +240,10 @@ public class LocalContainerEntityManagerFactoryBean extends AbstractEntityManage * @see org.springframework.instrument.classloading.ReflectiveLoadTimeWeaver * @see org.springframework.instrument.classloading.tomcat.TomcatInstrumentableClassLoader */ - @Override public void setLoadTimeWeaver(LoadTimeWeaver loadTimeWeaver) { this.internalPersistenceUnitManager.setLoadTimeWeaver(loadTimeWeaver); } - @Override public void setResourceLoader(ResourceLoader resourceLoader) { this.internalPersistenceUnitManager.setResourceLoader(resourceLoader); } diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/SharedEntityManagerCreator.java b/spring-orm/src/main/java/org/springframework/orm/jpa/SharedEntityManagerCreator.java index 2075ffe256..00f15cfa4c 100644 --- a/spring-orm/src/main/java/org/springframework/orm/jpa/SharedEntityManagerCreator.java +++ b/spring-orm/src/main/java/org/springframework/orm/jpa/SharedEntityManagerCreator.java @@ -152,7 +152,6 @@ public abstract class SharedEntityManagerCreator { } } - @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { // Invocation on EntityManager interface coming in... @@ -288,7 +287,6 @@ public abstract class SharedEntityManagerCreator { this.em = em; } - @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { // Invocation on Query interface coming in... diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/persistenceunit/ClassFileTransformerAdapter.java b/spring-orm/src/main/java/org/springframework/orm/jpa/persistenceunit/ClassFileTransformerAdapter.java index f75450d8c3..b96413c512 100644 --- a/spring-orm/src/main/java/org/springframework/orm/jpa/persistenceunit/ClassFileTransformerAdapter.java +++ b/spring-orm/src/main/java/org/springframework/orm/jpa/persistenceunit/ClassFileTransformerAdapter.java @@ -48,7 +48,6 @@ class ClassFileTransformerAdapter implements ClassFileTransformer { } - @Override public byte[] transform( ClassLoader loader, String className, Class classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) { diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/persistenceunit/DefaultPersistenceUnitManager.java b/spring-orm/src/main/java/org/springframework/orm/jpa/persistenceunit/DefaultPersistenceUnitManager.java index 48b90436d7..233ae1fbf5 100644 --- a/spring-orm/src/main/java/org/springframework/orm/jpa/persistenceunit/DefaultPersistenceUnitManager.java +++ b/spring-orm/src/main/java/org/springframework/orm/jpa/persistenceunit/DefaultPersistenceUnitManager.java @@ -322,7 +322,6 @@ public class DefaultPersistenceUnitManager * @see org.springframework.instrument.classloading.ReflectiveLoadTimeWeaver * @see org.springframework.instrument.classloading.tomcat.TomcatInstrumentableClassLoader */ - @Override public void setLoadTimeWeaver(LoadTimeWeaver loadTimeWeaver) { this.loadTimeWeaver = loadTimeWeaver; } @@ -335,13 +334,11 @@ public class DefaultPersistenceUnitManager return this.loadTimeWeaver; } - @Override public void setResourceLoader(ResourceLoader resourceLoader) { this.resourcePatternResolver = ResourcePatternUtils.getResourcePatternResolver(resourceLoader); } - @Override public void afterPropertiesSet() { if (this.loadTimeWeaver == null && InstrumentationLoadTimeWeaver.isInstrumentationAvailable()) { this.loadTimeWeaver = new InstrumentationLoadTimeWeaver(this.resourcePatternResolver.getClassLoader()); @@ -545,7 +542,6 @@ public class DefaultPersistenceUnitManager } - @Override public PersistenceUnitInfo obtainDefaultPersistenceUnitInfo() { if (this.persistenceUnitInfoNames.isEmpty()) { throw new IllegalStateException("No persistence units parsed from " + @@ -563,7 +559,6 @@ public class DefaultPersistenceUnitManager return pui; } - @Override public PersistenceUnitInfo obtainPersistenceUnitInfo(String persistenceUnitName) { PersistenceUnitInfo pui = this.persistenceUnitInfos.remove(persistenceUnitName); if (pui == null) { @@ -611,7 +606,6 @@ public class DefaultPersistenceUnitManager return this.target; } - @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { if (method.getName().equals("getSharedCacheMode")) { return Enum.valueOf(this.sharedCacheModeEnum, this.target.getSharedCacheModeName()); diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/persistenceunit/MutablePersistenceUnitInfo.java b/spring-orm/src/main/java/org/springframework/orm/jpa/persistenceunit/MutablePersistenceUnitInfo.java index b077f1132f..423af5f026 100644 --- a/spring-orm/src/main/java/org/springframework/orm/jpa/persistenceunit/MutablePersistenceUnitInfo.java +++ b/spring-orm/src/main/java/org/springframework/orm/jpa/persistenceunit/MutablePersistenceUnitInfo.java @@ -72,7 +72,6 @@ public class MutablePersistenceUnitInfo implements SmartPersistenceUnitInfo { this.persistenceUnitName = persistenceUnitName; } - @Override public String getPersistenceUnitName() { return this.persistenceUnitName; } @@ -81,7 +80,6 @@ public class MutablePersistenceUnitInfo implements SmartPersistenceUnitInfo { this.persistenceProviderClassName = persistenceProviderClassName; } - @Override public String getPersistenceProviderClassName() { return this.persistenceProviderClassName; } @@ -90,7 +88,6 @@ public class MutablePersistenceUnitInfo implements SmartPersistenceUnitInfo { this.transactionType = transactionType; } - @Override public PersistenceUnitTransactionType getTransactionType() { if (this.transactionType != null) { return this.transactionType; @@ -105,7 +102,6 @@ public class MutablePersistenceUnitInfo implements SmartPersistenceUnitInfo { this.jtaDataSource = jtaDataSource; } - @Override public DataSource getJtaDataSource() { return this.jtaDataSource; } @@ -114,7 +110,6 @@ public class MutablePersistenceUnitInfo implements SmartPersistenceUnitInfo { this.nonJtaDataSource = nonJtaDataSource; } - @Override public DataSource getNonJtaDataSource() { return this.nonJtaDataSource; } @@ -123,7 +118,6 @@ public class MutablePersistenceUnitInfo implements SmartPersistenceUnitInfo { this.mappingFileNames.add(mappingFileName); } - @Override public List getMappingFileNames() { return this.mappingFileNames; } @@ -132,7 +126,6 @@ public class MutablePersistenceUnitInfo implements SmartPersistenceUnitInfo { this.jarFileUrls.add(jarFileUrl); } - @Override public List getJarFileUrls() { return this.jarFileUrls; } @@ -141,7 +134,6 @@ public class MutablePersistenceUnitInfo implements SmartPersistenceUnitInfo { this.persistenceUnitRootUrl = persistenceUnitRootUrl; } - @Override public URL getPersistenceUnitRootUrl() { return this.persistenceUnitRootUrl; } @@ -150,7 +142,6 @@ public class MutablePersistenceUnitInfo implements SmartPersistenceUnitInfo { this.managedClassNames.add(managedClassName); } - @Override public List getManagedClassNames() { return this.managedClassNames; } @@ -159,7 +150,6 @@ public class MutablePersistenceUnitInfo implements SmartPersistenceUnitInfo { this.excludeUnlistedClasses = excludeUnlistedClasses; } - @Override public boolean excludeUnlistedClasses() { return this.excludeUnlistedClasses; } @@ -175,7 +165,6 @@ public class MutablePersistenceUnitInfo implements SmartPersistenceUnitInfo { this.properties = properties; } - @Override public Properties getProperties() { return this.properties; } @@ -188,7 +177,6 @@ public class MutablePersistenceUnitInfo implements SmartPersistenceUnitInfo { return this.persistenceXMLSchemaVersion; } - @Override public void setPersistenceProviderPackageName(String persistenceProviderPackageName) { this.persistenceProviderPackageName = persistenceProviderPackageName; } @@ -202,7 +190,6 @@ public class MutablePersistenceUnitInfo implements SmartPersistenceUnitInfo { * This implementation returns the default ClassLoader. * @see org.springframework.util.ClassUtils#getDefaultClassLoader() */ - @Override public ClassLoader getClassLoader() { return ClassUtils.getDefaultClassLoader(); } @@ -210,7 +197,6 @@ public class MutablePersistenceUnitInfo implements SmartPersistenceUnitInfo { /** * This implementation throws an UnsupportedOperationException. */ - @Override public void addTransformer(ClassTransformer classTransformer) { throw new UnsupportedOperationException("addTransformer not supported"); } @@ -218,7 +204,6 @@ public class MutablePersistenceUnitInfo implements SmartPersistenceUnitInfo { /** * This implementation throws an UnsupportedOperationException. */ - @Override public ClassLoader getNewTempClassLoader() { throw new UnsupportedOperationException("getNewTempClassLoader not supported"); } diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/support/OpenEntityManagerInViewInterceptor.java b/spring-orm/src/main/java/org/springframework/orm/jpa/support/OpenEntityManagerInViewInterceptor.java index 80a0581561..8c9cf595ca 100644 --- a/spring-orm/src/main/java/org/springframework/orm/jpa/support/OpenEntityManagerInViewInterceptor.java +++ b/spring-orm/src/main/java/org/springframework/orm/jpa/support/OpenEntityManagerInViewInterceptor.java @@ -73,7 +73,6 @@ public class OpenEntityManagerInViewInterceptor extends EntityManagerFactoryAcce public static final String PARTICIPATE_SUFFIX = ".PARTICIPATE"; - @Override public void preHandle(WebRequest request) throws DataAccessException { String participateAttributeName = getParticipateAttributeName(); @@ -107,11 +106,9 @@ public class OpenEntityManagerInViewInterceptor extends EntityManagerFactoryAcce } } - @Override public void postHandle(WebRequest request, ModelMap model) { } - @Override public void afterCompletion(WebRequest request, Exception ex) throws DataAccessException { if (!decrementParticipateCount(request)) { EntityManagerHolder emHolder = (EntityManagerHolder) @@ -137,7 +134,6 @@ public class OpenEntityManagerInViewInterceptor extends EntityManagerFactoryAcce return true; } - @Override public void afterConcurrentHandlingStarted(WebRequest request) { if (!decrementParticipateCount(request)) { TransactionSynchronizationManager.unbindResource(getEntityManagerFactory()); diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/support/PersistenceAnnotationBeanPostProcessor.java b/spring-orm/src/main/java/org/springframework/orm/jpa/support/PersistenceAnnotationBeanPostProcessor.java index 9927ac7a2f..ac9c408f02 100644 --- a/spring-orm/src/main/java/org/springframework/orm/jpa/support/PersistenceAnnotationBeanPostProcessor.java +++ b/spring-orm/src/main/java/org/springframework/orm/jpa/support/PersistenceAnnotationBeanPostProcessor.java @@ -306,12 +306,10 @@ public class PersistenceAnnotationBeanPostProcessor this.order = order; } - @Override public int getOrder() { return this.order; } - @Override public void setBeanFactory(BeanFactory beanFactory) { if (beanFactory instanceof ListableBeanFactory) { this.beanFactory = (ListableBeanFactory) beanFactory; @@ -319,7 +317,6 @@ public class PersistenceAnnotationBeanPostProcessor } - @Override public void postProcessMergedBeanDefinition(RootBeanDefinition beanDefinition, Class beanType, String beanName) { if (beanType != null) { InjectionMetadata metadata = findPersistenceMetadata(beanType); @@ -327,17 +324,14 @@ public class PersistenceAnnotationBeanPostProcessor } } - @Override public Object postProcessBeforeInstantiation(Class beanClass, String beanName) throws BeansException { return null; } - @Override public boolean postProcessAfterInstantiation(Object bean, String beanName) throws BeansException { return true; } - @Override public PropertyValues postProcessPropertyValues( PropertyValues pvs, PropertyDescriptor[] pds, Object bean, String beanName) throws BeansException { @@ -351,17 +345,14 @@ public class PersistenceAnnotationBeanPostProcessor return pvs; } - @Override public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { return bean; } - @Override public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { return bean; } - @Override public void postProcessBeforeDestruction(Object bean, String beanName) throws BeansException { EntityManager emToClose = this.extendedEntityManagersToClose.remove(bean); EntityManagerFactoryUtils.closeEntityManager(emToClose); diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/support/SharedEntityManagerBean.java b/spring-orm/src/main/java/org/springframework/orm/jpa/support/SharedEntityManagerBean.java index 7b2cf600df..14864f4d0d 100644 --- a/spring-orm/src/main/java/org/springframework/orm/jpa/support/SharedEntityManagerBean.java +++ b/spring-orm/src/main/java/org/springframework/orm/jpa/support/SharedEntityManagerBean.java @@ -73,7 +73,6 @@ public class SharedEntityManagerBean extends EntityManagerFactoryAccessor } - @Override public final void afterPropertiesSet() { EntityManagerFactory emf = getEntityManagerFactory(); if (emf == null) { @@ -106,17 +105,14 @@ public class SharedEntityManagerBean extends EntityManagerFactoryAccessor } - @Override public EntityManager getObject() { return this.shared; } - @Override public Class getObjectType() { return (this.entityManagerInterface != null ? this.entityManagerInterface : EntityManager.class); } - @Override public boolean isSingleton() { return true; } diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/AbstractJpaVendorAdapter.java b/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/AbstractJpaVendorAdapter.java index 99041f2dc9..18499e412d 100644 --- a/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/AbstractJpaVendorAdapter.java +++ b/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/AbstractJpaVendorAdapter.java @@ -110,27 +110,22 @@ public abstract class AbstractJpaVendorAdapter implements JpaVendorAdapter { } - @Override public String getPersistenceProviderRootPackage() { return null; } - @Override public Map getJpaPropertyMap() { return null; } - @Override public JpaDialect getJpaDialect() { return null; } - @Override public Class getEntityManagerFactoryInterface() { return EntityManagerFactory.class; } - @Override public Class getEntityManagerInterface() { return EntityManager.class; } @@ -139,7 +134,6 @@ public abstract class AbstractJpaVendorAdapter implements JpaVendorAdapter { * Post-process the EntityManagerFactory after it has been initialized. * @param emf the EntityManagerFactory to process */ - @Override public void postProcessEntityManagerFactory(EntityManagerFactory emf) { } diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/EclipseLinkJpaVendorAdapter.java b/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/EclipseLinkJpaVendorAdapter.java index 6bfc37c0a8..1dd5764059 100644 --- a/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/EclipseLinkJpaVendorAdapter.java +++ b/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/EclipseLinkJpaVendorAdapter.java @@ -56,7 +56,6 @@ public class EclipseLinkJpaVendorAdapter extends AbstractJpaVendorAdapter { private final JpaDialect jpaDialect = new EclipseLinkJpaDialect(); - @Override public PersistenceProvider getPersistenceProvider() { return this.persistenceProvider; } diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/HibernateJpaDialect.java b/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/HibernateJpaDialect.java index cfb86f8fcc..1293b335d4 100644 --- a/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/HibernateJpaDialect.java +++ b/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/HibernateJpaDialect.java @@ -153,7 +153,6 @@ public class HibernateJpaDialect extends DefaultJpaDialect { this.session = session; } - @Override public Connection getConnection() { try { if (connectionMethod == null) { @@ -167,7 +166,6 @@ public class HibernateJpaDialect extends DefaultJpaDialect { } } - @Override public void releaseConnection(Connection con) { JdbcUtils.closeConnection(con); } diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/HibernateJpaSessionFactoryBean.java b/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/HibernateJpaSessionFactoryBean.java index 511cd91c58..065cf759a7 100644 --- a/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/HibernateJpaSessionFactoryBean.java +++ b/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/HibernateJpaSessionFactoryBean.java @@ -39,19 +39,16 @@ import org.springframework.util.Assert; */ public class HibernateJpaSessionFactoryBean extends EntityManagerFactoryAccessor implements FactoryBean { - @Override public SessionFactory getObject() { EntityManagerFactory emf = getEntityManagerFactory(); Assert.isInstanceOf(HibernateEntityManagerFactory.class, emf); return ((HibernateEntityManagerFactory) emf).getSessionFactory(); } - @Override public Class getObjectType() { return SessionFactory.class; } - @Override public boolean isSingleton() { return true; } diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/HibernateJpaVendorAdapter.java b/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/HibernateJpaVendorAdapter.java index 37c636c363..d48a7b762e 100644 --- a/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/HibernateJpaVendorAdapter.java +++ b/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/HibernateJpaVendorAdapter.java @@ -59,7 +59,6 @@ public class HibernateJpaVendorAdapter extends AbstractJpaVendorAdapter { private final JpaDialect jpaDialect = new HibernateJpaDialect(); - @Override public PersistenceProvider getPersistenceProvider() { return this.persistenceProvider; } diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/OpenJpaDialect.java b/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/OpenJpaDialect.java index 45f572716a..e7db382d0e 100644 --- a/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/OpenJpaDialect.java +++ b/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/OpenJpaDialect.java @@ -88,7 +88,6 @@ public class OpenJpaDialect extends DefaultJpaDialect { this.entityManager = entityManager; } - @Override public Object createSavepoint() throws TransactionException { this.savepointCounter++; String savepointName = ConnectionHolder.SAVEPOINT_NAME_PREFIX + this.savepointCounter; @@ -96,12 +95,10 @@ public class OpenJpaDialect extends DefaultJpaDialect { return savepointName; } - @Override public void rollbackToSavepoint(Object savepoint) throws TransactionException { this.entityManager.rollbackToSavepoint((String) savepoint); } - @Override public void releaseSavepoint(Object savepoint) throws TransactionException { this.entityManager.releaseSavepoint((String) savepoint); } @@ -123,12 +120,10 @@ public class OpenJpaDialect extends DefaultJpaDialect { this.entityManager = entityManager; } - @Override public Connection getConnection() { return (Connection) this.entityManager.getConnection(); } - @Override public void releaseConnection(Connection con) { JdbcUtils.closeConnection(con); } diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/OpenJpaVendorAdapter.java b/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/OpenJpaVendorAdapter.java index 17cda4d8a1..34fc0d4a1c 100644 --- a/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/OpenJpaVendorAdapter.java +++ b/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/OpenJpaVendorAdapter.java @@ -48,7 +48,6 @@ public class OpenJpaVendorAdapter extends AbstractJpaVendorAdapter { private final OpenJpaDialect jpaDialect = new OpenJpaDialect(); - @Override public PersistenceProvider getPersistenceProvider() { return this.persistenceProvider; } diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/TopLinkJpaVendorAdapter.java b/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/TopLinkJpaVendorAdapter.java index 6b6572c0b5..36e18be4ef 100644 --- a/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/TopLinkJpaVendorAdapter.java +++ b/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/TopLinkJpaVendorAdapter.java @@ -51,7 +51,6 @@ public class TopLinkJpaVendorAdapter extends AbstractJpaVendorAdapter { private final JpaDialect jpaDialect = new TopLinkJpaDialect(); - @Override public PersistenceProvider getPersistenceProvider() { return this.persistenceProvider; } diff --git a/spring-oxm/src/main/java/org/springframework/oxm/castor/CastorMarshaller.java b/spring-oxm/src/main/java/org/springframework/oxm/castor/CastorMarshaller.java index dd3e82dfab..0405e8272e 100644 --- a/spring-oxm/src/main/java/org/springframework/oxm/castor/CastorMarshaller.java +++ b/spring-oxm/src/main/java/org/springframework/oxm/castor/CastorMarshaller.java @@ -380,12 +380,10 @@ public class CastorMarshaller extends AbstractMarshaller implements Initializing this.clearCollections = clearCollections; } - @Override public void setBeanClassLoader(ClassLoader classLoader) { this.classLoader = classLoader; } - @Override public final void afterPropertiesSet() throws CastorMappingException, IOException { if (logger.isInfoEnabled()) { if (!ObjectUtils.isEmpty(this.mappingLocations)) { @@ -450,7 +448,6 @@ public class CastorMarshaller extends AbstractMarshaller implements Initializing /** * Returns {@code true} for all classes, i.e. Castor supports arbitrary classes. */ - @Override public boolean supports(Class clazz) { return true; } diff --git a/spring-oxm/src/main/java/org/springframework/oxm/config/OxmNamespaceHandler.java b/spring-oxm/src/main/java/org/springframework/oxm/config/OxmNamespaceHandler.java index c11bc0bdd5..19bf683cae 100644 --- a/spring-oxm/src/main/java/org/springframework/oxm/config/OxmNamespaceHandler.java +++ b/spring-oxm/src/main/java/org/springframework/oxm/config/OxmNamespaceHandler.java @@ -27,7 +27,6 @@ import org.springframework.beans.factory.xml.NamespaceHandlerSupport; */ public class OxmNamespaceHandler extends NamespaceHandlerSupport { - @Override public void init() { registerBeanDefinitionParser("jaxb2-marshaller", new Jaxb2MarshallerBeanDefinitionParser()); registerBeanDefinitionParser("jibx-marshaller", new JibxMarshallerBeanDefinitionParser()); diff --git a/spring-oxm/src/main/java/org/springframework/oxm/jaxb/Jaxb2Marshaller.java b/spring-oxm/src/main/java/org/springframework/oxm/jaxb/Jaxb2Marshaller.java index a210bc582b..956c003233 100644 --- a/spring-oxm/src/main/java/org/springframework/oxm/jaxb/Jaxb2Marshaller.java +++ b/spring-oxm/src/main/java/org/springframework/oxm/jaxb/Jaxb2Marshaller.java @@ -376,17 +376,14 @@ public class Jaxb2Marshaller this.checkForXmlRootElement = checkForXmlRootElement; } - @Override public void setBeanClassLoader(ClassLoader classLoader) { this.beanClassLoader = classLoader; } - @Override public void setResourceLoader(ResourceLoader resourceLoader) { this.resourceLoader = resourceLoader; } - @Override public final void afterPropertiesSet() throws Exception { boolean hasContextPath = StringUtils.hasLength(this.contextPath); boolean hasClassesToBeBound = !ObjectUtils.isEmpty(this.classesToBeBound); @@ -516,7 +513,6 @@ public class Jaxb2Marshaller } - @Override public boolean supports(Class clazz) { if (this.supportJaxbElementClass && JAXBElement.class.isAssignableFrom(clazz)) { return true; @@ -524,7 +520,6 @@ public class Jaxb2Marshaller return supportsInternal(clazz, this.checkForXmlRootElement); } - @Override public boolean supports(Type genericType) { if (genericType instanceof ParameterizedType) { ParameterizedType parameterizedType = (ParameterizedType) genericType; @@ -614,12 +609,10 @@ public class Jaxb2Marshaller // Marshalling - @Override public void marshal(Object graph, Result result) throws XmlMappingException { marshal(graph, result, null); } - @Override public void marshal(Object graph, Result result, MimeContainer mimeContainer) throws XmlMappingException { try { Marshaller marshaller = createMarshaller(); @@ -701,12 +694,10 @@ public class Jaxb2Marshaller // Unmarshalling - @Override public Object unmarshal(Source source) throws XmlMappingException { return unmarshal(source, null); } - @Override public Object unmarshal(Source source, MimeContainer mimeContainer) throws XmlMappingException { try { Unmarshaller unmarshaller = createUnmarshaller(); @@ -924,22 +915,18 @@ public class Jaxb2Marshaller this.length = length; } - @Override public InputStream getInputStream() throws IOException { return new ByteArrayInputStream(this.data, this.offset, this.length); } - @Override public OutputStream getOutputStream() throws IOException { throw new UnsupportedOperationException(); } - @Override public String getContentType() { return this.contentType; } - @Override public String getName() { return "ByteArrayDataSource"; } diff --git a/spring-oxm/src/main/java/org/springframework/oxm/jibx/JibxMarshaller.java b/spring-oxm/src/main/java/org/springframework/oxm/jibx/JibxMarshaller.java index b374b52f09..2ded691c8b 100644 --- a/spring-oxm/src/main/java/org/springframework/oxm/jibx/JibxMarshaller.java +++ b/spring-oxm/src/main/java/org/springframework/oxm/jibx/JibxMarshaller.java @@ -200,7 +200,6 @@ public class JibxMarshaller extends AbstractMarshaller implements InitializingBe this.docTypeInternalSubset = docTypeInternalSubset; } - @Override public void afterPropertiesSet() throws JiBXException { if (this.targetClass != null) { if (StringUtils.hasLength(this.bindingName)) { @@ -229,7 +228,6 @@ public class JibxMarshaller extends AbstractMarshaller implements InitializingBe } - @Override public boolean supports(Class clazz) { Assert.notNull(clazz, "'clazz' must not be null"); if (this.targetClass != null) { diff --git a/spring-oxm/src/main/java/org/springframework/oxm/support/AbstractMarshaller.java b/spring-oxm/src/main/java/org/springframework/oxm/support/AbstractMarshaller.java index d42cb72a49..cf584efa88 100644 --- a/spring-oxm/src/main/java/org/springframework/oxm/support/AbstractMarshaller.java +++ b/spring-oxm/src/main/java/org/springframework/oxm/support/AbstractMarshaller.java @@ -88,7 +88,6 @@ public abstract class AbstractMarshaller implements Marshaller, Unmarshaller { * @see #marshalSaxResult(Object, javax.xml.transform.sax.SAXResult) * @see #marshalStreamResult(Object, javax.xml.transform.stream.StreamResult) */ - @Override public final void marshal(Object graph, Result result) throws IOException, XmlMappingException { if (result instanceof DOMResult) { marshalDomResult(graph, (DOMResult) result); @@ -121,7 +120,6 @@ public abstract class AbstractMarshaller implements Marshaller, Unmarshaller { * @see #unmarshalSaxSource(javax.xml.transform.sax.SAXSource) * @see #unmarshalStreamSource(javax.xml.transform.stream.StreamSource) */ - @Override public final Object unmarshal(Source source) throws IOException, XmlMappingException { if (source instanceof DOMSource) { return unmarshalDomSource((DOMSource) source); diff --git a/spring-oxm/src/main/java/org/springframework/oxm/support/MarshallingSource.java b/spring-oxm/src/main/java/org/springframework/oxm/support/MarshallingSource.java index 24e239c733..7fbe4b4745 100644 --- a/spring-oxm/src/main/java/org/springframework/oxm/support/MarshallingSource.java +++ b/spring-oxm/src/main/java/org/springframework/oxm/support/MarshallingSource.java @@ -124,42 +124,34 @@ public class MarshallingSource extends SAXSource { this.content = content; } - @Override public void setContentHandler(ContentHandler contentHandler) { this.contentHandler = contentHandler; } - @Override public ContentHandler getContentHandler() { return this.contentHandler; } - @Override public void setDTDHandler(DTDHandler dtdHandler) { this.dtdHandler = dtdHandler; } - @Override public DTDHandler getDTDHandler() { return this.dtdHandler; } - @Override public void setEntityResolver(EntityResolver entityResolver) { this.entityResolver = entityResolver; } - @Override public EntityResolver getEntityResolver() { return this.entityResolver; } - @Override public void setErrorHandler(ErrorHandler errorHandler) { this.errorHandler = errorHandler; } - @Override public ErrorHandler getErrorHandler() { return this.errorHandler; } @@ -168,17 +160,14 @@ public class MarshallingSource extends SAXSource { return this.lexicalHandler; } - @Override public boolean getFeature(String name) throws SAXNotRecognizedException { throw new SAXNotRecognizedException(name); } - @Override public void setFeature(String name, boolean value) throws SAXNotRecognizedException { throw new SAXNotRecognizedException(name); } - @Override public Object getProperty(String name) throws SAXNotRecognizedException { if ("http://xml.org/sax/properties/lexical-handler".equals(name)) { return lexicalHandler; @@ -188,7 +177,6 @@ public class MarshallingSource extends SAXSource { } } - @Override public void setProperty(String name, Object value) throws SAXNotRecognizedException { if ("http://xml.org/sax/properties/lexical-handler".equals(name)) { this.lexicalHandler = (LexicalHandler) value; @@ -198,12 +186,10 @@ public class MarshallingSource extends SAXSource { } } - @Override public void parse(InputSource input) throws SAXException { parse(); } - @Override public void parse(String systemId) throws SAXException { parse(); } diff --git a/spring-oxm/src/main/java/org/springframework/oxm/xmlbeans/XmlBeansMarshaller.java b/spring-oxm/src/main/java/org/springframework/oxm/xmlbeans/XmlBeansMarshaller.java index 83a4639363..991d262645 100644 --- a/spring-oxm/src/main/java/org/springframework/oxm/xmlbeans/XmlBeansMarshaller.java +++ b/spring-oxm/src/main/java/org/springframework/oxm/xmlbeans/XmlBeansMarshaller.java @@ -117,7 +117,6 @@ public class XmlBeansMarshaller extends AbstractMarshaller { /** * This implementation returns true if the given class is an implementation of {@link XmlObject}. */ - @Override public boolean supports(Class clazz) { return XmlObject.class.isAssignableFrom(clazz); } diff --git a/spring-oxm/src/main/java/org/springframework/oxm/xmlbeans/XmlOptionsFactoryBean.java b/spring-oxm/src/main/java/org/springframework/oxm/xmlbeans/XmlOptionsFactoryBean.java index ca092b2172..d5d668bac6 100644 --- a/spring-oxm/src/main/java/org/springframework/oxm/xmlbeans/XmlOptionsFactoryBean.java +++ b/spring-oxm/src/main/java/org/springframework/oxm/xmlbeans/XmlOptionsFactoryBean.java @@ -58,17 +58,14 @@ public class XmlOptionsFactoryBean implements FactoryBean { } - @Override public XmlOptions getObject() { return this.xmlOptions; } - @Override public Class getObjectType() { return XmlOptions.class; } - @Override public boolean isSingleton() { return true; } diff --git a/spring-oxm/src/main/java/org/springframework/oxm/xstream/XStreamMarshaller.java b/spring-oxm/src/main/java/org/springframework/oxm/xstream/XStreamMarshaller.java index b2717b0411..b53c20a5b9 100644 --- a/spring-oxm/src/main/java/org/springframework/oxm/xstream/XStreamMarshaller.java +++ b/spring-oxm/src/main/java/org/springframework/oxm/xstream/XStreamMarshaller.java @@ -357,13 +357,11 @@ public class XStreamMarshaller extends AbstractMarshaller implements Initializin this.supportedClasses = supportedClasses; } - @Override public void setBeanClassLoader(ClassLoader classLoader) { this.classLoader = classLoader; } - @Override public final void afterPropertiesSet() throws Exception { customizeXStream(getXStream()); } @@ -377,7 +375,6 @@ public class XStreamMarshaller extends AbstractMarshaller implements Initializin } - @Override public boolean supports(Class clazz) { if (ObjectUtils.isEmpty(this.supportedClasses)) { return true; diff --git a/spring-struts/src/main/java/org/springframework/web/servlet/view/tiles/TilesConfigurer.java b/spring-struts/src/main/java/org/springframework/web/servlet/view/tiles/TilesConfigurer.java index 184d4195e5..4905e411f0 100644 --- a/spring-struts/src/main/java/org/springframework/web/servlet/view/tiles/TilesConfigurer.java +++ b/spring-struts/src/main/java/org/springframework/web/servlet/view/tiles/TilesConfigurer.java @@ -111,7 +111,6 @@ public class TilesConfigurer extends WebApplicationObjectSupport implements Init * @throws DefinitionsFactoryException if an error occurs * @see #createDefinitionsFactory */ - @Override public void afterPropertiesSet() throws DefinitionsFactoryException { logger.debug("TilesConfigurer: initializion started"); diff --git a/spring-struts/src/main/java/org/springframework/web/struts/ActionServletAwareProcessor.java b/spring-struts/src/main/java/org/springframework/web/struts/ActionServletAwareProcessor.java index 320a17a7d9..54c46c76a2 100644 --- a/spring-struts/src/main/java/org/springframework/web/struts/ActionServletAwareProcessor.java +++ b/spring-struts/src/main/java/org/springframework/web/struts/ActionServletAwareProcessor.java @@ -52,7 +52,6 @@ class ActionServletAwareProcessor implements DestructionAwareBeanPostProcessor { } - @Override public Object postProcessBeforeInitialization(Object bean, String beanName) { if (bean instanceof Action) { ((Action) bean).setServlet(this.actionServlet); @@ -60,12 +59,10 @@ class ActionServletAwareProcessor implements DestructionAwareBeanPostProcessor { return bean; } - @Override public Object postProcessAfterInitialization(Object bean, String beanName) { return bean; } - @Override public void postProcessBeforeDestruction(Object bean, String beanName) { if (bean instanceof Action) { ((Action) bean).setServlet(null); diff --git a/spring-struts/src/main/java/org/springframework/web/struts/ContextLoaderPlugIn.java b/spring-struts/src/main/java/org/springframework/web/struts/ContextLoaderPlugIn.java index 3b6912b51e..d1d68e6995 100644 --- a/spring-struts/src/main/java/org/springframework/web/struts/ContextLoaderPlugIn.java +++ b/spring-struts/src/main/java/org/springframework/web/struts/ContextLoaderPlugIn.java @@ -213,7 +213,6 @@ public class ContextLoaderPlugIn implements PlugIn { /** * Create the ActionServlet's WebApplicationContext. */ - @Override public final void init(ActionServlet actionServlet, ModuleConfig moduleConfig) throws ServletException { long startTime = System.currentTimeMillis(); if (logger.isInfoEnabled()) { @@ -346,7 +345,6 @@ public class ContextLoaderPlugIn implements PlugIn { } wac.addBeanFactoryPostProcessor( new BeanFactoryPostProcessor() { - @Override public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) { beanFactory.addBeanPostProcessor(new ActionServletAwareProcessor(getActionServlet())); beanFactory.ignoreDependencyType(ActionServlet.class); @@ -387,7 +385,6 @@ public class ContextLoaderPlugIn implements PlugIn { * Close the WebApplicationContext of the ActionServlet. * @see org.springframework.context.ConfigurableApplicationContext#close() */ - @Override public void destroy() { getServletContext().log("Closing WebApplicationContext of Struts ActionServlet '" + getServletName() + "', module '" + getModulePrefix() + "'"); diff --git a/spring-test-mvc/src/main/java/org/springframework/test/web/client/MockMvcClientHttpRequestFactory.java b/spring-test-mvc/src/main/java/org/springframework/test/web/client/MockMvcClientHttpRequestFactory.java index bad3d49090..914f949d0c 100644 --- a/spring-test-mvc/src/main/java/org/springframework/test/web/client/MockMvcClientHttpRequestFactory.java +++ b/spring-test-mvc/src/main/java/org/springframework/test/web/client/MockMvcClientHttpRequestFactory.java @@ -49,7 +49,6 @@ public class MockMvcClientHttpRequestFactory implements ClientHttpRequestFactory this.mockMvc = mockMvc; } - @Override public ClientHttpRequest createRequest(final URI uri, final HttpMethod httpMethod) throws IOException { return new MockClientHttpRequest(httpMethod, uri) { diff --git a/spring-test-mvc/src/main/java/org/springframework/test/web/client/MockRestServiceServer.java b/spring-test-mvc/src/main/java/org/springframework/test/web/client/MockRestServiceServer.java index bb821063df..4d708ddd18 100644 --- a/spring-test-mvc/src/main/java/org/springframework/test/web/client/MockRestServiceServer.java +++ b/spring-test-mvc/src/main/java/org/springframework/test/web/client/MockRestServiceServer.java @@ -184,7 +184,6 @@ public class MockRestServiceServer { private Iterator requestIterator; - @Override public ClientHttpRequest createRequest(URI uri, HttpMethod httpMethod) throws IOException { Assert.notNull(uri, "'uri' must not be null"); Assert.notNull(httpMethod, "'httpMethod' must not be null"); diff --git a/spring-test-mvc/src/main/java/org/springframework/test/web/client/RequestMatcherClientHttpRequest.java b/spring-test-mvc/src/main/java/org/springframework/test/web/client/RequestMatcherClientHttpRequest.java index aa923c7b66..a0553cfd8d 100644 --- a/spring-test-mvc/src/main/java/org/springframework/test/web/client/RequestMatcherClientHttpRequest.java +++ b/spring-test-mvc/src/main/java/org/springframework/test/web/client/RequestMatcherClientHttpRequest.java @@ -45,20 +45,17 @@ class RequestMatcherClientHttpRequest extends MockClientHttpRequest implements R this.requestMatchers.add(requestMatcher); } - @Override public ResponseActions andExpect(RequestMatcher requestMatcher) { Assert.notNull(requestMatcher, "RequestMatcher is required"); this.requestMatchers.add(requestMatcher); return this; } - @Override public void andRespond(ResponseCreator responseCreator) { Assert.notNull(responseCreator, "ResponseCreator is required"); this.responseCreator = responseCreator; } - @Override public ClientHttpResponse executeInternal() throws IOException { if (this.requestMatchers.isEmpty()) { diff --git a/spring-test-mvc/src/main/java/org/springframework/test/web/client/match/ContentRequestMatchers.java b/spring-test-mvc/src/main/java/org/springframework/test/web/client/match/ContentRequestMatchers.java index dcb5576bab..5b89cef1a7 100644 --- a/spring-test-mvc/src/main/java/org/springframework/test/web/client/match/ContentRequestMatchers.java +++ b/spring-test-mvc/src/main/java/org/springframework/test/web/client/match/ContentRequestMatchers.java @@ -64,7 +64,6 @@ public class ContentRequestMatchers { */ public RequestMatcher contentType(final MediaType expectedContentType) { return new RequestMatcher() { - @Override public void match(ClientHttpRequest request) throws IOException, AssertionError { MediaType actualContentType = request.getHeaders().getContentType(); assertTrue("Content type not set", actualContentType != null); @@ -78,7 +77,6 @@ public class ContentRequestMatchers { */ public RequestMatcher string(final Matcher matcher) { return new RequestMatcher() { - @Override public void match(ClientHttpRequest request) throws IOException, AssertionError { MockClientHttpRequest mockRequest = (MockClientHttpRequest) request; assertThat("Request content", mockRequest.getBodyAsString(), matcher); @@ -91,7 +89,6 @@ public class ContentRequestMatchers { */ public RequestMatcher string(final String expectedContent) { return new RequestMatcher() { - @Override public void match(ClientHttpRequest request) throws IOException, AssertionError { MockClientHttpRequest mockRequest = (MockClientHttpRequest) request; assertEquals("Request content", expectedContent, mockRequest.getBodyAsString()); @@ -104,7 +101,6 @@ public class ContentRequestMatchers { */ public RequestMatcher bytes(final byte[] expectedContent) { return new RequestMatcher() { - @Override public void match(ClientHttpRequest request) throws IOException, AssertionError { MockClientHttpRequest mockRequest = (MockClientHttpRequest) request; assertEquals("Request content", expectedContent, mockRequest.getBodyAsBytes()); @@ -161,7 +157,6 @@ public class ContentRequestMatchers { */ private abstract static class AbstractXmlRequestMatcher implements RequestMatcher { - @Override public final void match(ClientHttpRequest request) throws IOException, AssertionError { try { MockClientHttpRequest mockRequest = (MockClientHttpRequest) request; diff --git a/spring-test-mvc/src/main/java/org/springframework/test/web/client/match/JsonPathRequestMatchers.java b/spring-test-mvc/src/main/java/org/springframework/test/web/client/match/JsonPathRequestMatchers.java index 14be640a32..d4da756185 100644 --- a/spring-test-mvc/src/main/java/org/springframework/test/web/client/match/JsonPathRequestMatchers.java +++ b/spring-test-mvc/src/main/java/org/springframework/test/web/client/match/JsonPathRequestMatchers.java @@ -118,7 +118,6 @@ public class JsonPathRequestMatchers { */ private abstract static class AbstractJsonPathRequestMatcher implements RequestMatcher { - @Override public final void match(ClientHttpRequest request) throws IOException, AssertionError { try { MockClientHttpRequest mockRequest = (MockClientHttpRequest) request; diff --git a/spring-test-mvc/src/main/java/org/springframework/test/web/client/match/MockRestRequestMatchers.java b/spring-test-mvc/src/main/java/org/springframework/test/web/client/match/MockRestRequestMatchers.java index 4f7df08790..ce3c7fb80d 100644 --- a/spring-test-mvc/src/main/java/org/springframework/test/web/client/match/MockRestRequestMatchers.java +++ b/spring-test-mvc/src/main/java/org/springframework/test/web/client/match/MockRestRequestMatchers.java @@ -59,7 +59,6 @@ public abstract class MockRestRequestMatchers { */ public static RequestMatcher anything() { return new RequestMatcher() { - @Override public void match(ClientHttpRequest request) throws AssertionError { } }; @@ -74,7 +73,6 @@ public abstract class MockRestRequestMatchers { public static RequestMatcher requestTo(final Matcher matcher) { Assert.notNull(matcher, "'matcher' must not be null"); return new RequestMatcher() { - @Override public void match(ClientHttpRequest request) throws IOException, AssertionError { assertThat("Request URI", request.getURI().toString(), matcher); } @@ -90,7 +88,6 @@ public abstract class MockRestRequestMatchers { public static RequestMatcher requestTo(final String expectedUri) { Assert.notNull(expectedUri, "'uri' must not be null"); return new RequestMatcher() { - @Override public void match(ClientHttpRequest request) throws IOException, AssertionError { assertEquals("Request URI", expectedUri, request.getURI().toString()); } @@ -106,7 +103,6 @@ public abstract class MockRestRequestMatchers { public static RequestMatcher method(final HttpMethod method) { Assert.notNull(method, "'method' must not be null"); return new RequestMatcher() { - @Override public void match(ClientHttpRequest request) throws AssertionError { AssertionErrors.assertEquals("Unexpected HttpMethod", method, request.getMethod()); } @@ -122,7 +118,6 @@ public abstract class MockRestRequestMatchers { public static RequestMatcher requestTo(final URI uri) { Assert.notNull(uri, "'uri' must not be null"); return new RequestMatcher() { - @Override public void match(ClientHttpRequest request) throws IOException, AssertionError { AssertionErrors.assertEquals("Unexpected request", uri, request.getURI()); } @@ -134,7 +129,6 @@ public abstract class MockRestRequestMatchers { */ public static RequestMatcher header(final String name, final Matcher... matchers) { return new RequestMatcher() { - @Override public void match(ClientHttpRequest request) { assertHeaderValueCount(name, request.getHeaders(), matchers.length); for (int i = 0 ; i < matchers.length; i++) { @@ -149,7 +143,6 @@ public abstract class MockRestRequestMatchers { */ public static RequestMatcher header(final String name, final String... expectedValues) { return new RequestMatcher() { - @Override public void match(ClientHttpRequest request) { assertHeaderValueCount(name, request.getHeaders(), expectedValues.length); for (int i = 0 ; i < expectedValues.length; i++) { diff --git a/spring-test-mvc/src/main/java/org/springframework/test/web/client/match/XpathRequestMatchers.java b/spring-test-mvc/src/main/java/org/springframework/test/web/client/match/XpathRequestMatchers.java index f983235be9..9c3ac04c41 100644 --- a/spring-test-mvc/src/main/java/org/springframework/test/web/client/match/XpathRequestMatchers.java +++ b/spring-test-mvc/src/main/java/org/springframework/test/web/client/match/XpathRequestMatchers.java @@ -185,7 +185,6 @@ public class XpathRequestMatchers { */ private abstract static class AbstractXpathRequestMatcher implements RequestMatcher { - @Override public final void match(ClientHttpRequest request) throws IOException, AssertionError { try { MockClientHttpRequest mockRequest = (MockClientHttpRequest) request; diff --git a/spring-test-mvc/src/main/java/org/springframework/test/web/client/response/DefaultResponseCreator.java b/spring-test-mvc/src/main/java/org/springframework/test/web/client/response/DefaultResponseCreator.java index 3f2be1ae4c..7518f14f64 100644 --- a/spring-test-mvc/src/main/java/org/springframework/test/web/client/response/DefaultResponseCreator.java +++ b/spring-test-mvc/src/main/java/org/springframework/test/web/client/response/DefaultResponseCreator.java @@ -56,7 +56,6 @@ public class DefaultResponseCreator implements ResponseCreator { this.statusCode = statusCode; } - @Override public ClientHttpResponse createResponse(ClientHttpRequest request) throws IOException { MockClientHttpResponse response; if (this.contentResource != null ){ diff --git a/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/DefaultMvcResult.java b/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/DefaultMvcResult.java index e9951189be..117a95c2bf 100644 --- a/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/DefaultMvcResult.java +++ b/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/DefaultMvcResult.java @@ -61,17 +61,14 @@ class DefaultMvcResult implements MvcResult { this.mockResponse = response; } - @Override public MockHttpServletResponse getResponse() { return mockResponse; } - @Override public MockHttpServletRequest getRequest() { return mockRequest; } - @Override public Object getHandler() { return this.handler; } @@ -80,7 +77,6 @@ class DefaultMvcResult implements MvcResult { this.handler = handler; } - @Override public HandlerInterceptor[] getInterceptors() { return this.interceptors; } @@ -89,7 +85,6 @@ class DefaultMvcResult implements MvcResult { this.interceptors = interceptors; } - @Override public Exception getResolvedException() { return this.resolvedException; } @@ -98,7 +93,6 @@ class DefaultMvcResult implements MvcResult { this.resolvedException = resolvedException; } - @Override public ModelAndView getModelAndView() { return this.modelAndView; } @@ -107,7 +101,6 @@ class DefaultMvcResult implements MvcResult { this.modelAndView = mav; } - @Override public FlashMap getFlashMap() { return RequestContextUtils.getOutputFlashMap(mockRequest); } @@ -116,12 +109,10 @@ class DefaultMvcResult implements MvcResult { this.asyncResult = asyncResult; } - @Override public Object getAsyncResult() { return getAsyncResult(-1); } - @Override public Object getAsyncResult(long timeout) { // MockHttpServletRequest type doesn't have async methods HttpServletRequest request = this.mockRequest; diff --git a/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/MockMvc.java b/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/MockMvc.java index bf700fecfb..a074ff6d14 100644 --- a/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/MockMvc.java +++ b/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/MockMvc.java @@ -137,19 +137,16 @@ public final class MockMvc { return new ResultActions() { - @Override public ResultActions andExpect(ResultMatcher matcher) throws Exception { matcher.match(mvcResult); return this; } - @Override public ResultActions andDo(ResultHandler printer) throws Exception { printer.handle(mvcResult); return this; } - @Override public MvcResult andReturn() { return mvcResult; } diff --git a/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/TestDispatcherServlet.java b/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/TestDispatcherServlet.java index 96389241c0..8c57fae247 100644 --- a/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/TestDispatcherServlet.java +++ b/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/TestDispatcherServlet.java @@ -73,14 +73,12 @@ final class TestDispatcherServlet extends DispatcherServlet { WebAsyncManager asyncManager = WebAsyncUtils.getAsyncManager(servletRequest); asyncManager.registerCallableInterceptor(KEY, new CallableProcessingInterceptorAdapter() { - @Override public void postProcess(NativeWebRequest request, Callable task, Object value) throws Exception { getMvcResult(servletRequest).setAsyncResult(value); asyncResultLatch.countDown(); } }); asyncManager.registerDeferredResultInterceptor(KEY, new DeferredResultProcessingInterceptorAdapter() { - @Override public void postProcess(NativeWebRequest request, DeferredResult result, Object value) throws Exception { getMvcResult(servletRequest).setAsyncResult(value); asyncResultLatch.countDown(); diff --git a/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/request/MockAsyncContext.java b/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/request/MockAsyncContext.java index 753d63db5b..e6d97658c7 100644 --- a/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/request/MockAsyncContext.java +++ b/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/request/MockAsyncContext.java @@ -58,17 +58,14 @@ class MockAsyncContext implements AsyncContext { this.response = (HttpServletResponse) response; } - @Override public ServletRequest getRequest() { return this.request; } - @Override public ServletResponse getResponse() { return this.response; } - @Override public boolean hasOriginalRequestAndResponse() { return (this.request instanceof MockHttpServletRequest) && (this.response instanceof MockHttpServletResponse); } @@ -77,22 +74,18 @@ class MockAsyncContext implements AsyncContext { return this.dispatchedPath; } - @Override public void dispatch() { dispatch(this.request.getRequestURI()); } - @Override public void dispatch(String path) { dispatch(null, path); } - @Override public void dispatch(ServletContext context, String path) { this.dispatchedPath = path; } - @Override public void complete() { Servlet3MockHttpServletRequest mockRequest = WebUtils.getNativeRequest(request, Servlet3MockHttpServletRequest.class); if (mockRequest != null) { @@ -108,7 +101,6 @@ class MockAsyncContext implements AsyncContext { } } - @Override public void start(Runnable runnable) { runnable.run(); } @@ -117,27 +109,22 @@ class MockAsyncContext implements AsyncContext { return this.listeners; } - @Override public void addListener(AsyncListener listener) { this.listeners.add(listener); } - @Override public void addListener(AsyncListener listener, ServletRequest request, ServletResponse response) { this.listeners.add(listener); } - @Override public T createListener(Class clazz) throws ServletException { return BeanUtils.instantiateClass(clazz); } - @Override public long getTimeout() { return this.timeout; } - @Override public void setTimeout(long timeout) { this.timeout = timeout; } diff --git a/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/request/MockHttpServletRequestBuilder.java b/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/request/MockHttpServletRequestBuilder.java index bf00e3271d..dbd9ac1d88 100644 --- a/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/request/MockHttpServletRequestBuilder.java +++ b/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/request/MockHttpServletRequestBuilder.java @@ -432,7 +432,6 @@ public class MockHttpServletRequestBuilder implements RequestBuilder, Mergeable * {@inheritDoc} * @return always returns {@code true}. */ - @Override public boolean isMergeEnabled() { return true; } @@ -444,7 +443,6 @@ public class MockHttpServletRequestBuilder implements RequestBuilder, Mergeable * @param parent the parent {@code RequestBuilder} to inherit properties from * @return the result of the merge */ - @Override public Object merge(Object parent) { if (parent == null) { return this; @@ -548,7 +546,6 @@ public class MockHttpServletRequestBuilder implements RequestBuilder, Mergeable /** * Build a {@link MockHttpServletRequest}. */ - @Override public final MockHttpServletRequest buildRequest(ServletContext servletContext) { MockHttpServletRequest request = createServletRequest(servletContext); diff --git a/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/request/MockMvcRequestBuilders.java b/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/request/MockMvcRequestBuilders.java index 0ded2474cb..da96fd9cd2 100644 --- a/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/request/MockMvcRequestBuilders.java +++ b/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/request/MockMvcRequestBuilders.java @@ -124,7 +124,6 @@ public abstract class MockMvcRequestBuilders { */ public static RequestBuilder asyncDispatch(final MvcResult mvcResult) { return new RequestBuilder() { - @Override public MockHttpServletRequest buildRequest(ServletContext servletContext) { MockHttpServletRequest request = mvcResult.getRequest(); Method method = ReflectionUtils.findMethod(request.getClass(), "setAsyncStarted", boolean.class); diff --git a/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/request/Servlet3MockHttpServletRequest.java b/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/request/Servlet3MockHttpServletRequest.java index 4a8a5c48cb..ec4fafd59a 100644 --- a/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/request/Servlet3MockHttpServletRequest.java +++ b/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/request/Servlet3MockHttpServletRequest.java @@ -50,24 +50,20 @@ class Servlet3MockHttpServletRequest extends MockHttpServletRequest { super(servletContext); } - @Override public boolean isAsyncSupported() { return true; } - @Override public AsyncContext startAsync() { return startAsync(this, null); } - @Override public AsyncContext startAsync(ServletRequest request, ServletResponse response) { this.asyncStarted = true; this.asyncContext = new MockAsyncContext(request, response); return this.asyncContext; } - @Override public AsyncContext getAsyncContext() { return this.asyncContext; } @@ -76,12 +72,10 @@ class Servlet3MockHttpServletRequest extends MockHttpServletRequest { this.asyncContext = asyncContext; } - @Override public DispatcherType getDispatcherType() { return DispatcherType.REQUEST; } - @Override public boolean isAsyncStarted() { return this.asyncStarted; } @@ -94,17 +88,14 @@ class Servlet3MockHttpServletRequest extends MockHttpServletRequest { this.parts.put(part.getName(), part); } - @Override public Part getPart(String key) throws IOException, IllegalStateException, ServletException { return this.parts.get(key); } - @Override public Collection getParts() throws IOException, IllegalStateException, ServletException { return this.parts.values(); } - @Override public boolean authenticate(HttpServletResponse response) throws IOException, ServletException { throw new UnsupportedOperationException(); } diff --git a/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/request/Servlet3MockMultipartHttpServletRequest.java b/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/request/Servlet3MockMultipartHttpServletRequest.java index ed09b572ae..ef27070151 100644 --- a/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/request/Servlet3MockMultipartHttpServletRequest.java +++ b/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/request/Servlet3MockMultipartHttpServletRequest.java @@ -45,24 +45,20 @@ class Servlet3MockMultipartHttpServletRequest extends MockMultipartHttpServletRe private Map parts = new HashMap(); - @Override public boolean isAsyncSupported() { return true; } - @Override public AsyncContext startAsync() { return startAsync(this, null); } - @Override public AsyncContext startAsync(ServletRequest request, ServletResponse response) { this.asyncStarted = true; this.asyncContext = new MockAsyncContext(request, response); return this.asyncContext; } - @Override public AsyncContext getAsyncContext() { return this.asyncContext; } @@ -71,12 +67,10 @@ class Servlet3MockMultipartHttpServletRequest extends MockMultipartHttpServletRe this.asyncContext = asyncContext; } - @Override public DispatcherType getDispatcherType() { return DispatcherType.REQUEST; } - @Override public boolean isAsyncStarted() { return this.asyncStarted; } @@ -89,17 +83,14 @@ class Servlet3MockMultipartHttpServletRequest extends MockMultipartHttpServletRe this.parts.put(part.getName(), part); } - @Override public Part getPart(String key) throws IOException, IllegalStateException, ServletException { return this.parts.get(key); } - @Override public Collection getParts() throws IOException, IllegalStateException, ServletException { return this.parts.values(); } - @Override public boolean authenticate(HttpServletResponse response) throws IOException, ServletException { throw new UnsupportedOperationException(); } diff --git a/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/ContentResultMatchers.java b/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/ContentResultMatchers.java index 33b65a90f8..b39875baaa 100644 --- a/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/ContentResultMatchers.java +++ b/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/ContentResultMatchers.java @@ -65,7 +65,6 @@ public class ContentResultMatchers { */ public ResultMatcher contentType(final MediaType contentType) { return new ResultMatcher() { - @Override public void match(MvcResult result) throws Exception { String actual = result.getResponse().getContentType(); assertTrue("Content type not set", actual != null); @@ -80,7 +79,6 @@ public class ContentResultMatchers { */ public ResultMatcher encoding(final String characterEncoding) { return new ResultMatcher() { - @Override public void match(MvcResult result) { String actual = result.getResponse().getCharacterEncoding(); assertEquals("Character encoding", characterEncoding, actual); @@ -97,7 +95,6 @@ public class ContentResultMatchers { */ public ResultMatcher string(final Matcher matcher) { return new ResultMatcher() { - @Override public void match(MvcResult result) throws Exception { assertThat("Response content", result.getResponse().getContentAsString(), matcher); } @@ -109,7 +106,6 @@ public class ContentResultMatchers { */ public ResultMatcher string(final String expectedContent) { return new ResultMatcher() { - @Override public void match(MvcResult result) throws Exception { assertEquals("Response content", expectedContent, result.getResponse().getContentAsString()); } @@ -121,7 +117,6 @@ public class ContentResultMatchers { */ public ResultMatcher bytes(final byte[] expectedContent) { return new ResultMatcher() { - @Override public void match(MvcResult result) throws Exception { assertEquals("Response content", expectedContent, result.getResponse().getContentAsByteArray()); } @@ -142,7 +137,6 @@ public class ContentResultMatchers { */ public ResultMatcher xml(final String xmlContent) { return new ResultMatcher() { - @Override public void match(MvcResult result) throws Exception { String content = result.getResponse().getContentAsString(); xmlHelper.assertXmlEqual(xmlContent, content); @@ -156,7 +150,6 @@ public class ContentResultMatchers { */ public ResultMatcher node(final Matcher matcher) { return new ResultMatcher() { - @Override public void match(MvcResult result) throws Exception { String content = result.getResponse().getContentAsString(); xmlHelper.assertNode(content, matcher); @@ -172,7 +165,6 @@ public class ContentResultMatchers { */ public ResultMatcher source(final Matcher matcher) { return new ResultMatcher() { - @Override public void match(MvcResult result) throws Exception { String content = result.getResponse().getContentAsString(); xmlHelper.assertSource(content, matcher); diff --git a/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/CookieResultMatchers.java b/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/CookieResultMatchers.java index 967a361c20..338777882a 100644 --- a/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/CookieResultMatchers.java +++ b/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/CookieResultMatchers.java @@ -49,7 +49,6 @@ public class CookieResultMatchers { */ public ResultMatcher value(final String name, final Matcher matcher) { return new ResultMatcher() { - @Override public void match(MvcResult result) { Cookie cookie = result.getResponse().getCookie(name); assertTrue("Response cookie not found: " + name, cookie != null); @@ -63,7 +62,6 @@ public class CookieResultMatchers { */ public ResultMatcher value(final String name, final String expectedValue) { return new ResultMatcher() { - @Override public void match(MvcResult result) { Cookie cookie = result.getResponse().getCookie(name); assertTrue("Response cookie not found: " + name, cookie != null); @@ -78,7 +76,6 @@ public class CookieResultMatchers { */ public ResultMatcher exists(final String name) { return new ResultMatcher() { - @Override public void match(MvcResult result) { Cookie cookie = result.getResponse().getCookie(name); assertTrue("No cookie with name: " + name, cookie != null); @@ -92,7 +89,6 @@ public class CookieResultMatchers { */ public ResultMatcher doesNotExist(final String name) { return new ResultMatcher() { - @Override public void match(MvcResult result) { Cookie cookie = result.getResponse().getCookie(name); assertTrue("Unexpected cookie with name " + name, cookie == null); @@ -105,7 +101,6 @@ public class CookieResultMatchers { */ public ResultMatcher maxAge(final String name, final Matcher matcher) { return new ResultMatcher() { - @Override public void match(MvcResult result) { Cookie cookie = result.getResponse().getCookie(name); assertTrue("No cookie with name: " + name, cookie != null); @@ -119,7 +114,6 @@ public class CookieResultMatchers { */ public ResultMatcher maxAge(final String name, final int maxAge) { return new ResultMatcher() { - @Override public void match(MvcResult result) { Cookie cookie = result.getResponse().getCookie(name); assertTrue("No cookie with name: " + name, cookie != null); @@ -133,7 +127,6 @@ public class CookieResultMatchers { */ public ResultMatcher path(final String name, final Matcher matcher) { return new ResultMatcher() { - @Override public void match(MvcResult result) throws Exception { Cookie cookie = result.getResponse().getCookie(name); assertThat("Response cookie path", cookie.getPath(), matcher); @@ -143,7 +136,6 @@ public class CookieResultMatchers { public ResultMatcher path(final String name, final String path) { return new ResultMatcher() { - @Override public void match(MvcResult result) throws Exception { Cookie cookie = result.getResponse().getCookie(name); assertEquals("Response cookie path", path, cookie.getPath()); @@ -156,7 +148,6 @@ public class CookieResultMatchers { */ public ResultMatcher domain(final String name, final Matcher matcher) { return new ResultMatcher() { - @Override public void match(MvcResult result) throws Exception { Cookie cookie = result.getResponse().getCookie(name); assertThat("Response cookie domain", cookie.getDomain(), matcher); @@ -169,7 +160,6 @@ public class CookieResultMatchers { */ public ResultMatcher domain(final String name, final String domain) { return new ResultMatcher() { - @Override public void match(MvcResult result) throws Exception { Cookie cookie = result.getResponse().getCookie(name); assertEquals("Response cookie domain", domain, cookie.getDomain()); @@ -182,7 +172,6 @@ public class CookieResultMatchers { */ public ResultMatcher comment(final String name, final Matcher matcher) { return new ResultMatcher() { - @Override public void match(MvcResult result) throws Exception { Cookie cookie = result.getResponse().getCookie(name); assertThat("Response cookie comment", cookie.getComment(), matcher); @@ -195,7 +184,6 @@ public class CookieResultMatchers { */ public ResultMatcher comment(final String name, final String comment) { return new ResultMatcher() { - @Override public void match(MvcResult result) throws Exception { Cookie cookie = result.getResponse().getCookie(name); assertEquals("Response cookie comment", comment, cookie.getComment()); @@ -208,7 +196,6 @@ public class CookieResultMatchers { */ public ResultMatcher version(final String name, final Matcher matcher) { return new ResultMatcher() { - @Override public void match(MvcResult result) throws Exception { Cookie cookie = result.getResponse().getCookie(name); assertThat("Response cookie version", cookie.getVersion(), matcher); @@ -221,7 +208,6 @@ public class CookieResultMatchers { */ public ResultMatcher version(final String name, final int version) { return new ResultMatcher() { - @Override public void match(MvcResult result) throws Exception { Cookie cookie = result.getResponse().getCookie(name); assertEquals("Response cookie version", version, cookie.getVersion()); @@ -234,7 +220,6 @@ public class CookieResultMatchers { */ public ResultMatcher secure(final String name, final boolean secure) { return new ResultMatcher() { - @Override public void match(MvcResult result) throws Exception { Cookie cookie = result.getResponse().getCookie(name); assertEquals("Response cookie secure", secure, cookie.getSecure()); diff --git a/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/FlashAttributeResultMatchers.java b/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/FlashAttributeResultMatchers.java index f591a18307..61c2f37df6 100644 --- a/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/FlashAttributeResultMatchers.java +++ b/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/FlashAttributeResultMatchers.java @@ -45,7 +45,6 @@ public class FlashAttributeResultMatchers { */ public ResultMatcher attribute(final String name, final Matcher matcher) { return new ResultMatcher() { - @Override @SuppressWarnings("unchecked") public void match(MvcResult result) throws Exception { assertThat("Flash attribute", (T) result.getFlashMap().get(name), matcher); @@ -58,7 +57,6 @@ public class FlashAttributeResultMatchers { */ public ResultMatcher attribute(final String name, final Object value) { return new ResultMatcher() { - @Override @SuppressWarnings("unchecked") public void match(MvcResult result) throws Exception { assertEquals("Flash attribute", value, result.getFlashMap().get(name)); @@ -71,7 +69,6 @@ public class FlashAttributeResultMatchers { */ public ResultMatcher attributeExists(final String... names) { return new ResultMatcher() { - @Override public void match(MvcResult result) throws Exception { for (String name : names) { assertTrue("Flash attribute [" + name + "] does not exist", result.getFlashMap().get(name) != null); @@ -85,7 +82,6 @@ public class FlashAttributeResultMatchers { */ public ResultMatcher attributeCount(final int count) { return new ResultMatcher() { - @Override public void match(MvcResult result) throws Exception { assertEquals("FlashMap size", count, result.getFlashMap().size()); } diff --git a/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/HandlerResultMatchers.java b/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/HandlerResultMatchers.java index 502199fbd5..bcd5ea75ae 100644 --- a/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/HandlerResultMatchers.java +++ b/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/HandlerResultMatchers.java @@ -52,7 +52,6 @@ public class HandlerResultMatchers { */ public ResultMatcher handlerType(final Class type) { return new ResultMatcher() { - @Override public void match(MvcResult result) throws Exception { Object handler = result.getHandler(); assertTrue("No handler: ", handler != null); @@ -74,7 +73,6 @@ public class HandlerResultMatchers { */ public ResultMatcher methodName(final Matcher matcher) { return new ResultMatcher() { - @Override public void match(MvcResult result) throws Exception { Object handler = assertHandlerMethod(result); assertThat("HandlerMethod", ((HandlerMethod) handler).getMethod().getName(), matcher); @@ -90,7 +88,6 @@ public class HandlerResultMatchers { */ public ResultMatcher methodName(final String name) { return new ResultMatcher() { - @Override public void match(MvcResult result) throws Exception { Object handler = assertHandlerMethod(result); assertEquals("HandlerMethod", name, ((HandlerMethod) handler).getMethod().getName()); @@ -106,7 +103,6 @@ public class HandlerResultMatchers { */ public ResultMatcher method(final Method method) { return new ResultMatcher() { - @Override public void match(MvcResult result) throws Exception { Object handler = assertHandlerMethod(result); assertEquals("HandlerMethod", method, ((HandlerMethod) handler).getMethod()); diff --git a/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/HeaderResultMatchers.java b/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/HeaderResultMatchers.java index 5e0f5b2a1d..5acee2dbd7 100644 --- a/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/HeaderResultMatchers.java +++ b/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/HeaderResultMatchers.java @@ -45,7 +45,6 @@ public class HeaderResultMatchers { */ public ResultMatcher string(final String name, final Matcher matcher) { return new ResultMatcher() { - @Override public void match(MvcResult result) { assertThat("Response header", result.getResponse().getHeader(name), matcher); } @@ -57,7 +56,6 @@ public class HeaderResultMatchers { */ public ResultMatcher string(final String name, final String value) { return new ResultMatcher() { - @Override public void match(MvcResult result) { assertEquals("Response header", value, result.getResponse().getHeader(name)); } @@ -69,7 +67,6 @@ public class HeaderResultMatchers { */ public ResultMatcher longValue(final String name, final long value) { return new ResultMatcher() { - @Override public void match(MvcResult result) { assertEquals("Response header " + name, value, Long.parseLong(result.getResponse().getHeader(name))); } diff --git a/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/JsonPathResultMatchers.java b/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/JsonPathResultMatchers.java index 17e9803808..0d68d365ac 100644 --- a/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/JsonPathResultMatchers.java +++ b/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/JsonPathResultMatchers.java @@ -49,7 +49,6 @@ public class JsonPathResultMatchers { */ public ResultMatcher value(final Matcher matcher) { return new ResultMatcher() { - @Override public void match(MvcResult result) throws Exception { String content = result.getResponse().getContentAsString(); jsonPathHelper.assertValue(content, matcher); @@ -62,7 +61,6 @@ public class JsonPathResultMatchers { */ public ResultMatcher value(final Object expectedValue) { return new ResultMatcher() { - @Override public void match(MvcResult result) throws Exception { jsonPathHelper.assertValue(result.getResponse().getContentAsString(), expectedValue); } @@ -74,7 +72,6 @@ public class JsonPathResultMatchers { */ public ResultMatcher exists() { return new ResultMatcher() { - @Override public void match(MvcResult result) throws Exception { String content = result.getResponse().getContentAsString(); jsonPathHelper.exists(content); @@ -87,7 +84,6 @@ public class JsonPathResultMatchers { */ public ResultMatcher doesNotExist() { return new ResultMatcher() { - @Override public void match(MvcResult result) throws Exception { String content = result.getResponse().getContentAsString(); jsonPathHelper.doesNotExist(content); @@ -100,7 +96,6 @@ public class JsonPathResultMatchers { */ public ResultMatcher isArray() { return new ResultMatcher() { - @Override public void match(MvcResult result) throws Exception { String content = result.getResponse().getContentAsString(); jsonPathHelper.assertValueIsArray(content); diff --git a/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/MockMvcResultHandlers.java b/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/MockMvcResultHandlers.java index cfe96ca518..cb491c9537 100644 --- a/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/MockMvcResultHandlers.java +++ b/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/MockMvcResultHandlers.java @@ -49,13 +49,11 @@ public abstract class MockMvcResultHandlers { public ConsolePrintingResultHandler() { super(new ResultValuePrinter() { - @Override public void printHeading(String heading) { System.out.println(); System.out.println(String.format("%20s:", heading)); } - @Override public void printValue(String label, Object value) { if (value != null && value.getClass().isArray()) { value = CollectionUtils.arrayToList(value); diff --git a/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/MockMvcResultMatchers.java b/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/MockMvcResultMatchers.java index 1549719598..fb34c36ffd 100644 --- a/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/MockMvcResultMatchers.java +++ b/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/MockMvcResultMatchers.java @@ -81,7 +81,6 @@ public abstract class MockMvcResultMatchers { */ public static ResultMatcher forwardedUrl(final String expectedUrl) { return new ResultMatcher() { - @Override public void match(MvcResult result) { assertEquals("Forwarded URL", expectedUrl, result.getResponse().getForwardedUrl()); } @@ -93,7 +92,6 @@ public abstract class MockMvcResultMatchers { */ public static ResultMatcher redirectedUrl(final String expectedUrl) { return new ResultMatcher() { - @Override public void match(MvcResult result) { assertEquals("Redirected URL", expectedUrl, result.getResponse().getRedirectedUrl()); } diff --git a/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/ModelResultMatchers.java b/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/ModelResultMatchers.java index 012812f74c..6ec1d9346b 100644 --- a/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/ModelResultMatchers.java +++ b/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/ModelResultMatchers.java @@ -50,7 +50,6 @@ public class ModelResultMatchers { */ public ResultMatcher attribute(final String name, final Matcher matcher) { return new ResultMatcher() { - @Override @SuppressWarnings("unchecked") public void match(MvcResult result) throws Exception { ModelAndView mav = getModelAndView(result); @@ -64,7 +63,6 @@ public class ModelResultMatchers { */ public ResultMatcher attribute(final String name, final Object value) { return new ResultMatcher() { - @Override public void match(MvcResult result) throws Exception { ModelAndView mav = getModelAndView(result); assertEquals("Model attribute '" + name + "'", value, mav.getModel().get(name)); @@ -77,7 +75,6 @@ public class ModelResultMatchers { */ public ResultMatcher attributeExists(final String... names) { return new ResultMatcher() { - @Override public void match(MvcResult result) throws Exception { ModelAndView mav = getModelAndView(result); for (String name : names) { @@ -92,7 +89,6 @@ public class ModelResultMatchers { */ public ResultMatcher attributeErrorCount(final String name, final int expectedCount) { return new ResultMatcher() { - @Override public void match(MvcResult result) throws Exception { ModelAndView mav = getModelAndView(result); Errors errors = getBindingResult(mav, name); @@ -107,7 +103,6 @@ public class ModelResultMatchers { */ public ResultMatcher attributeHasErrors(final String... names) { return new ResultMatcher() { - @Override public void match(MvcResult mvcResult) throws Exception { ModelAndView mav = getModelAndView(mvcResult); for (String name : names) { @@ -123,7 +118,6 @@ public class ModelResultMatchers { */ public ResultMatcher attributeHasNoErrors(final String... names) { return new ResultMatcher() { - @Override public void match(MvcResult mvcResult) throws Exception { ModelAndView mav = getModelAndView(mvcResult); for (String name : names) { @@ -139,7 +133,6 @@ public class ModelResultMatchers { */ public ResultMatcher attributeHasFieldErrors(final String name, final String... fieldNames) { return new ResultMatcher() { - @Override public void match(MvcResult mvcResult) throws Exception { ModelAndView mav = getModelAndView(mvcResult); BindingResult result = getBindingResult(mav, name); @@ -157,7 +150,6 @@ public class ModelResultMatchers { */ public ResultMatcher errorCount(final int expectedCount) { return new ResultMatcher() { - @Override public void match(MvcResult result) throws Exception { int actualCount = getErrorCount(getModelAndView(result).getModelMap()); assertEquals("Binding/validation error count", expectedCount, actualCount); @@ -170,7 +162,6 @@ public class ModelResultMatchers { */ public ResultMatcher hasErrors() { return new ResultMatcher() { - @Override public void match(MvcResult result) throws Exception { int count = getErrorCount(getModelAndView(result).getModelMap()); assertTrue("Expected binding/validation errors", count != 0); @@ -183,7 +174,6 @@ public class ModelResultMatchers { */ public ResultMatcher hasNoErrors() { return new ResultMatcher() { - @Override public void match(MvcResult result) throws Exception { ModelAndView mav = getModelAndView(result); for (Object value : mav.getModel().values()) { @@ -201,7 +191,6 @@ public class ModelResultMatchers { */ public ResultMatcher size(final int size) { return new ResultMatcher() { - @Override public void match(MvcResult result) throws Exception { ModelAndView mav = getModelAndView(result); int actual = 0; diff --git a/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/PrintingResultHandler.java b/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/PrintingResultHandler.java index 3796841d6a..1a5f07f6e9 100644 --- a/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/PrintingResultHandler.java +++ b/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/PrintingResultHandler.java @@ -71,7 +71,6 @@ public class PrintingResultHandler implements ResultHandler { /** * Print {@link MvcResult} details to the "standard" output stream. */ - @Override public final void handle(MvcResult result) throws Exception { this.printer.printHeading("MockHttpServletRequest"); diff --git a/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/RequestResultMatchers.java b/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/RequestResultMatchers.java index cf929d5efe..15990939ee 100644 --- a/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/RequestResultMatchers.java +++ b/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/RequestResultMatchers.java @@ -59,7 +59,6 @@ public class RequestResultMatchers { */ public ResultMatcher asyncStarted() { return new ResultMatcher() { - @Override public void match(MvcResult result) { HttpServletRequest request = result.getRequest(); assertEquals("Async started", true, request.isAsyncStarted()); @@ -73,7 +72,6 @@ public class RequestResultMatchers { */ public ResultMatcher asyncNotStarted() { return new ResultMatcher() { - @Override public void match(MvcResult result) { HttpServletRequest request = result.getRequest(); assertEquals("Async started", false, request.isAsyncStarted()); @@ -86,7 +84,6 @@ public class RequestResultMatchers { */ public ResultMatcher asyncResult(final Matcher matcher) { return new ResultMatcher() { - @Override @SuppressWarnings("unchecked") public void match(MvcResult result) { HttpServletRequest request = result.getRequest(); @@ -104,7 +101,6 @@ public class RequestResultMatchers { */ public ResultMatcher asyncResult(final Object expectedResult) { return new ResultMatcher() { - @Override public void match(MvcResult result) { HttpServletRequest request = result.getRequest(); assertEquals("Async started", true, request.isAsyncStarted()); @@ -118,7 +114,6 @@ public class RequestResultMatchers { */ public ResultMatcher attribute(final String name, final Matcher matcher) { return new ResultMatcher() { - @Override @SuppressWarnings("unchecked") public void match(MvcResult result) { T value = (T) result.getRequest().getAttribute(name); @@ -132,7 +127,6 @@ public class RequestResultMatchers { */ public ResultMatcher attribute(final String name, final Object expectedValue) { return new ResultMatcher() { - @Override public void match(MvcResult result) { assertEquals("Request attribute", expectedValue, result.getRequest().getAttribute(name)); } @@ -144,7 +138,6 @@ public class RequestResultMatchers { */ public ResultMatcher sessionAttribute(final String name, final Matcher matcher) { return new ResultMatcher() { - @Override @SuppressWarnings("unchecked") public void match(MvcResult result) { T value = (T) result.getRequest().getSession().getAttribute(name); @@ -158,7 +151,6 @@ public class RequestResultMatchers { */ public ResultMatcher sessionAttribute(final String name, final Object value) { return new ResultMatcher() { - @Override public void match(MvcResult result) { assertEquals("Request attribute", value, result.getRequest().getSession().getAttribute(name)); } diff --git a/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/StatusResultMatchers.java b/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/StatusResultMatchers.java index b8549bca3b..88c4083b6c 100644 --- a/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/StatusResultMatchers.java +++ b/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/StatusResultMatchers.java @@ -46,7 +46,6 @@ public class StatusResultMatchers { */ public ResultMatcher is(final Matcher matcher) { return new ResultMatcher() { - @Override public void match(MvcResult result) throws Exception { assertThat("Response status", result.getResponse().getStatus(), matcher); } @@ -58,7 +57,6 @@ public class StatusResultMatchers { */ public ResultMatcher is(final int status) { return new ResultMatcher() { - @Override public void match(MvcResult result) throws Exception { assertEquals("Response status", status, result.getResponse().getStatus()); } @@ -71,7 +69,6 @@ public class StatusResultMatchers { */ public ResultMatcher reason(final Matcher matcher) { return new ResultMatcher() { - @Override public void match(MvcResult result) throws Exception { assertThat("Response status reason", result.getResponse().getErrorMessage(), matcher); } @@ -83,7 +80,6 @@ public class StatusResultMatchers { */ public ResultMatcher reason(final String reason) { return new ResultMatcher() { - @Override public void match(MvcResult result) throws Exception { assertEquals("Response status reason", reason, result.getResponse().getErrorMessage()); } @@ -549,7 +545,6 @@ public class StatusResultMatchers { */ private ResultMatcher matcher(final HttpStatus status) { return new ResultMatcher() { - @Override public void match(MvcResult result) { assertEquals("Status", status.value(), result.getResponse().getStatus()); } diff --git a/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/ViewResultMatchers.java b/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/ViewResultMatchers.java index c665d7a1d0..f2f5217dfa 100644 --- a/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/ViewResultMatchers.java +++ b/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/ViewResultMatchers.java @@ -44,7 +44,6 @@ public class ViewResultMatchers { */ public ResultMatcher name(final Matcher matcher) { return new ResultMatcher() { - @Override public void match(MvcResult result) throws Exception { ModelAndView mav = result.getModelAndView(); assertTrue("No ModelAndView found", mav != null); @@ -58,7 +57,6 @@ public class ViewResultMatchers { */ public ResultMatcher name(final String expectedViewName) { return new ResultMatcher() { - @Override public void match(MvcResult result) throws Exception { ModelAndView mav = result.getModelAndView(); assertTrue("No ModelAndView found", mav != null); diff --git a/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/XpathResultMatchers.java b/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/XpathResultMatchers.java index 36cdf5fc86..5e7a75368e 100644 --- a/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/XpathResultMatchers.java +++ b/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/XpathResultMatchers.java @@ -63,7 +63,6 @@ public class XpathResultMatchers { */ public ResultMatcher node(final Matcher matcher) { return new ResultMatcher() { - @Override public void match(MvcResult result) throws Exception { String content = result.getResponse().getContentAsString(); xpathHelper.assertNode(content, matcher); @@ -76,7 +75,6 @@ public class XpathResultMatchers { */ public ResultMatcher exists() { return new ResultMatcher() { - @Override public void match(MvcResult result) throws Exception { String content = result.getResponse().getContentAsString(); xpathHelper.exists(content); @@ -89,7 +87,6 @@ public class XpathResultMatchers { */ public ResultMatcher doesNotExist() { return new ResultMatcher() { - @Override public void match(MvcResult result) throws Exception { String content = result.getResponse().getContentAsString(); xpathHelper.doesNotExist(content); @@ -103,7 +100,6 @@ public class XpathResultMatchers { */ public ResultMatcher nodeCount(final Matcher matcher) { return new ResultMatcher() { - @Override public void match(MvcResult result) throws Exception { String content = result.getResponse().getContentAsString(); xpathHelper.assertNodeCount(content, matcher); @@ -116,7 +112,6 @@ public class XpathResultMatchers { */ public ResultMatcher nodeCount(final int expectedCount) { return new ResultMatcher() { - @Override public void match(MvcResult result) throws Exception { String content = result.getResponse().getContentAsString(); xpathHelper.assertNodeCount(content, expectedCount); @@ -130,7 +125,6 @@ public class XpathResultMatchers { */ public ResultMatcher string(final Matcher matcher) { return new ResultMatcher() { - @Override public void match(MvcResult result) throws Exception { String content = result.getResponse().getContentAsString(); xpathHelper.assertString(content, matcher); @@ -143,7 +137,6 @@ public class XpathResultMatchers { */ public ResultMatcher string(final String expectedValue) { return new ResultMatcher() { - @Override public void match(MvcResult result) throws Exception { String content = result.getResponse().getContentAsString(); xpathHelper.assertString(content, expectedValue); @@ -157,7 +150,6 @@ public class XpathResultMatchers { */ public ResultMatcher number(final Matcher matcher) { return new ResultMatcher() { - @Override public void match(MvcResult result) throws Exception { String content = result.getResponse().getContentAsString(); xpathHelper.assertNumber(content, matcher); @@ -170,7 +162,6 @@ public class XpathResultMatchers { */ public ResultMatcher number(final Double expectedValue) { return new ResultMatcher() { - @Override public void match(MvcResult result) throws Exception { String content = result.getResponse().getContentAsString(); xpathHelper.assertNumber(content, expectedValue); @@ -183,7 +174,6 @@ public class XpathResultMatchers { */ public ResultMatcher booleanValue(final Boolean value) { return new ResultMatcher() { - @Override public void match(MvcResult result) throws Exception { String content = result.getResponse().getContentAsString(); xpathHelper.assertBoolean(content, value); diff --git a/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/setup/DefaultMockMvcBuilder.java b/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/setup/DefaultMockMvcBuilder.java index 57c7d019d0..a97b38aeee 100644 --- a/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/setup/DefaultMockMvcBuilder.java +++ b/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/setup/DefaultMockMvcBuilder.java @@ -181,7 +181,6 @@ public class DefaultMockMvcBuilder extends MockMvcB /** * Build a {@link MockMvc} instance. */ - @Override public final MockMvc build() { initWebAppContext(this.webAppContext); diff --git a/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/setup/PatternMappingFilterProxy.java b/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/setup/PatternMappingFilterProxy.java index 29e2845be3..b582b3b68c 100644 --- a/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/setup/PatternMappingFilterProxy.java +++ b/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/setup/PatternMappingFilterProxy.java @@ -84,7 +84,6 @@ final class PatternMappingFilterProxy implements Filter { } } - @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain) throws IOException, ServletException { @@ -120,12 +119,10 @@ final class PatternMappingFilterProxy implements Filter { return false; } - @Override public void init(FilterConfig filterConfig) throws ServletException { this.delegate.init(filterConfig); } - @Override public void destroy() { this.delegate.destroy(); } diff --git a/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/setup/StandaloneMockMvcBuilder.java b/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/setup/StandaloneMockMvcBuilder.java index c7035767e8..b9597c196e 100644 --- a/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/setup/StandaloneMockMvcBuilder.java +++ b/spring-test-mvc/src/main/java/org/springframework/test/web/servlet/setup/StandaloneMockMvcBuilder.java @@ -267,7 +267,6 @@ public class StandaloneMockMvcBuilder extends DefaultMockMvcBuilder T getBean(String name, Class requiredType) throws BeansException { return this.beanFactory.getBean(name, requiredType); } - @Override public T getBean(Class requiredType) throws BeansException { return this.beanFactory.getBean(requiredType); } - @Override public Object getBean(String name, Object... args) throws BeansException { return this.beanFactory.getBean(name, args); } - @Override public boolean containsBean(String name) { return this.beanFactory.containsBean(name); } - @Override public boolean isSingleton(String name) throws NoSuchBeanDefinitionException { return this.beanFactory.isSingleton(name); } - @Override public boolean isPrototype(String name) throws NoSuchBeanDefinitionException { return this.beanFactory.isPrototype(name); } - @Override public boolean isTypeMatch(String name, Class targetType) throws NoSuchBeanDefinitionException { return this.beanFactory.isTypeMatch(name, targetType); } - @Override public Class getType(String name) throws NoSuchBeanDefinitionException { return this.beanFactory.getType(name); } - @Override public String[] getAliases(String name) { return this.beanFactory.getAliases(name); } @@ -202,51 +184,42 @@ class StubWebApplicationContext implements WebApplicationContext { // Implementation of ListableBeanFactory interface //--------------------------------------------------------------------- - @Override public boolean containsBeanDefinition(String beanName) { return this.beanFactory.containsBeanDefinition(beanName); } - @Override public int getBeanDefinitionCount() { return this.beanFactory.getBeanDefinitionCount(); } - @Override public String[] getBeanDefinitionNames() { return this.beanFactory.getBeanDefinitionNames(); } - @Override public String[] getBeanNamesForType(Class type) { return this.beanFactory.getBeanNamesForType(type); } - @Override public String[] getBeanNamesForType(Class type, boolean includeNonSingletons, boolean allowEagerInit) { return this.beanFactory.getBeanNamesForType(type, includeNonSingletons, allowEagerInit); } - @Override public Map getBeansOfType(Class type) throws BeansException { return this.beanFactory.getBeansOfType(type); } - @Override public Map getBeansOfType(Class type, boolean includeNonSingletons, boolean allowEagerInit) throws BeansException { return this.beanFactory.getBeansOfType(type, includeNonSingletons, allowEagerInit); } - @Override public Map getBeansWithAnnotation(Class annotationType) throws BeansException { return this.beanFactory.getBeansWithAnnotation(annotationType); } - @Override public A findAnnotationOnBean(String beanName, Class annotationType) { return this.beanFactory.findAnnotationOnBean(beanName, annotationType); } @@ -255,12 +228,10 @@ class StubWebApplicationContext implements WebApplicationContext { // Implementation of HierarchicalBeanFactory interface //--------------------------------------------------------------------- - @Override public BeanFactory getParentBeanFactory() { return null; } - @Override public boolean containsLocalBean(String name) { return this.beanFactory.containsBean(name); } @@ -269,17 +240,14 @@ class StubWebApplicationContext implements WebApplicationContext { // Implementation of MessageSource interface //--------------------------------------------------------------------- - @Override public String getMessage(String code, Object args[], String defaultMessage, Locale locale) { return this.messageSource.getMessage(code, args, defaultMessage, locale); } - @Override public String getMessage(String code, Object args[], Locale locale) throws NoSuchMessageException { return this.messageSource.getMessage(code, args, locale); } - @Override public String getMessage(MessageSourceResolvable resolvable, Locale locale) throws NoSuchMessageException { return this.messageSource.getMessage(resolvable, locale); } @@ -288,12 +256,10 @@ class StubWebApplicationContext implements WebApplicationContext { // Implementation of ResourceLoader interface //--------------------------------------------------------------------- - @Override public ClassLoader getClassLoader() { return null; } - @Override public Resource getResource(String location) { return this.resourcePatternResolver.getResource(location); } @@ -302,11 +268,9 @@ class StubWebApplicationContext implements WebApplicationContext { // Other //--------------------------------------------------------------------- - @Override public void publishEvent(ApplicationEvent event) { } - @Override public Resource[] getResources(String locationPattern) throws IOException { return this.resourcePatternResolver.getResources(locationPattern); } @@ -319,7 +283,6 @@ class StubWebApplicationContext implements WebApplicationContext { */ private class StubBeanFactory extends StaticListableBeanFactory implements AutowireCapableBeanFactory { - @Override public Object initializeBean(Object existingBean, String beanName) throws BeansException { if (existingBean instanceof ApplicationContextAware) { ((ApplicationContextAware) existingBean).setApplicationContext(StubWebApplicationContext.this); @@ -327,61 +290,50 @@ class StubWebApplicationContext implements WebApplicationContext { return existingBean; } - @Override public T createBean(Class beanClass) throws BeansException { throw new UnsupportedOperationException("Bean creation is not supported"); } - @Override @SuppressWarnings("rawtypes") public Object createBean(Class beanClass, int autowireMode, boolean dependencyCheck) throws BeansException { throw new UnsupportedOperationException("Bean creation is not supported"); } - @Override @SuppressWarnings("rawtypes") public Object autowire(Class beanClass, int autowireMode, boolean dependencyCheck) throws BeansException { return null; } - @Override public void autowireBean(Object existingBean) throws BeansException { throw new UnsupportedOperationException("Autowiring is not supported"); } - @Override public void autowireBeanProperties(Object existingBean, int autowireMode, boolean dependencyCheck) throws BeansException { throw new UnsupportedOperationException("Autowiring is not supported"); } - @Override public Object configureBean(Object existingBean, String beanName) throws BeansException { throw new UnsupportedOperationException("Configuring a bean is not supported"); } - @Override public Object resolveDependency(DependencyDescriptor descriptor, String beanName) throws BeansException { throw new UnsupportedOperationException("Dependency resolution is not supported"); } - @Override public Object resolveDependency(DependencyDescriptor descriptor, String beanName, Set autowiredBeanNames, TypeConverter typeConverter) throws BeansException { throw new UnsupportedOperationException("Dependency resolution is not supported"); } - @Override public void applyBeanPropertyValues(Object existingBean, String beanName) throws BeansException { throw new UnsupportedOperationException("Bean property initialization is not supported"); } - @Override public Object applyBeanPostProcessorsBeforeInitialization(Object existingBean, String beanName) throws BeansException { throw new UnsupportedOperationException("Post processing is not supported"); } - @Override public Object applyBeanPostProcessorsAfterInitialization(Object existingBean, String beanName) throws BeansException { throw new UnsupportedOperationException("Post processing is not supported"); diff --git a/spring-test/src/main/java/org/springframework/mock/http/MockHttpInputMessage.java b/spring-test/src/main/java/org/springframework/mock/http/MockHttpInputMessage.java index 7e62e827fe..5de14e9954 100644 --- a/spring-test/src/main/java/org/springframework/mock/http/MockHttpInputMessage.java +++ b/spring-test/src/main/java/org/springframework/mock/http/MockHttpInputMessage.java @@ -45,12 +45,10 @@ public class MockHttpInputMessage implements HttpInputMessage { this.body = body; } - @Override public HttpHeaders getHeaders() { return this.headers; } - @Override public InputStream getBody() throws IOException { return this.body; } diff --git a/spring-test/src/main/java/org/springframework/mock/http/MockHttpOutputMessage.java b/spring-test/src/main/java/org/springframework/mock/http/MockHttpOutputMessage.java index 8f31f553bb..43fa1b3e7e 100644 --- a/spring-test/src/main/java/org/springframework/mock/http/MockHttpOutputMessage.java +++ b/spring-test/src/main/java/org/springframework/mock/http/MockHttpOutputMessage.java @@ -42,7 +42,6 @@ public class MockHttpOutputMessage implements HttpOutputMessage { /** * Return the headers. */ - @Override public HttpHeaders getHeaders() { return this.headers; } @@ -50,7 +49,6 @@ public class MockHttpOutputMessage implements HttpOutputMessage { /** * Return the body content. */ - @Override public OutputStream getBody() throws IOException { return this.body; } diff --git a/spring-test/src/main/java/org/springframework/mock/http/client/MockClientHttpRequest.java b/spring-test/src/main/java/org/springframework/mock/http/client/MockClientHttpRequest.java index c6896d277c..0f46bbbcf3 100644 --- a/spring-test/src/main/java/org/springframework/mock/http/client/MockClientHttpRequest.java +++ b/spring-test/src/main/java/org/springframework/mock/http/client/MockClientHttpRequest.java @@ -56,7 +56,6 @@ public class MockClientHttpRequest extends MockHttpOutputMessage implements Clie this.uri = uri; } - @Override public URI getURI() { return this.uri; } @@ -65,7 +64,6 @@ public class MockClientHttpRequest extends MockHttpOutputMessage implements Clie this.uri = uri; } - @Override public HttpMethod getMethod() { return this.httpMethod; } @@ -87,7 +85,6 @@ public class MockClientHttpRequest extends MockHttpOutputMessage implements Clie * configured {@link #setResponse(ClientHttpResponse) response}. * @see #executeInternal() */ - @Override public final ClientHttpResponse execute() throws IOException { this.executed = true; return executeInternal(); diff --git a/spring-test/src/main/java/org/springframework/mock/http/client/MockClientHttpResponse.java b/spring-test/src/main/java/org/springframework/mock/http/client/MockClientHttpResponse.java index 64b229e558..9ed40774f1 100644 --- a/spring-test/src/main/java/org/springframework/mock/http/client/MockClientHttpResponse.java +++ b/spring-test/src/main/java/org/springframework/mock/http/client/MockClientHttpResponse.java @@ -52,22 +52,18 @@ public class MockClientHttpResponse extends MockHttpInputMessage implements Clie this.status = statusCode; } - @Override public HttpStatus getStatusCode() throws IOException { return this.status; } - @Override public int getRawStatusCode() throws IOException { return this.status.value(); } - @Override public String getStatusText() throws IOException { return this.status.getReasonPhrase(); } - @Override public void close() { } diff --git a/spring-test/src/main/java/org/springframework/mock/jndi/ExpectedLookupTemplate.java b/spring-test/src/main/java/org/springframework/mock/jndi/ExpectedLookupTemplate.java index 7bffe4de13..b19aaf5c54 100644 --- a/spring-test/src/main/java/org/springframework/mock/jndi/ExpectedLookupTemplate.java +++ b/spring-test/src/main/java/org/springframework/mock/jndi/ExpectedLookupTemplate.java @@ -67,7 +67,6 @@ public class ExpectedLookupTemplate extends JndiTemplate { * object provided in the constructor. If the name is unexpected, a * respective NamingException gets thrown. */ - @Override public Object lookup(String name) throws NamingException { Object object = this.jndiObjects.get(name); if (object == null) { diff --git a/spring-test/src/main/java/org/springframework/mock/jndi/SimpleNamingContext.java b/spring-test/src/main/java/org/springframework/mock/jndi/SimpleNamingContext.java index 4e1641b2cd..d35fbdc865 100644 --- a/spring-test/src/main/java/org/springframework/mock/jndi/SimpleNamingContext.java +++ b/spring-test/src/main/java/org/springframework/mock/jndi/SimpleNamingContext.java @@ -91,7 +91,6 @@ public class SimpleNamingContext implements Context { // Actual implementations of Context methods follow - @Override public NamingEnumeration list(String root) throws NamingException { if (logger.isDebugEnabled()) { logger.debug("Listing name/class pairs under [" + root + "]"); @@ -99,7 +98,6 @@ public class SimpleNamingContext implements Context { return new NameClassPairEnumeration(this, root); } - @Override public NamingEnumeration listBindings(String root) throws NamingException { if (logger.isDebugEnabled()) { logger.debug("Listing bindings under [" + root + "]"); @@ -113,7 +111,6 @@ public class SimpleNamingContext implements Context { * Will be used by any standard InitialContext JNDI lookups. * @throws javax.naming.NameNotFoundException if the object could not be found */ - @Override public Object lookup(String lookupName) throws NameNotFoundException { String name = this.root + lookupName; if (logger.isDebugEnabled()) { @@ -139,7 +136,6 @@ public class SimpleNamingContext implements Context { return found; } - @Override public Object lookupLink(String name) throws NameNotFoundException { return lookup(name); } @@ -151,7 +147,6 @@ public class SimpleNamingContext implements Context { * Use SimpleNamingContextBuilder to set up JNDI bindings then. * @see org.springframework.mock.jndi.SimpleNamingContextBuilder#bind */ - @Override public void bind(String name, Object obj) { if (logger.isInfoEnabled()) { logger.info("Static JNDI binding: [" + this.root + name + "] = [" + obj + "]"); @@ -159,7 +154,6 @@ public class SimpleNamingContext implements Context { this.boundObjects.put(this.root + name, obj); } - @Override public void unbind(String name) { if (logger.isInfoEnabled()) { logger.info("Static JNDI remove: [" + this.root + name + "]"); @@ -167,19 +161,16 @@ public class SimpleNamingContext implements Context { this.boundObjects.remove(this.root + name); } - @Override public void rebind(String name, Object obj) { bind(name, obj); } - @Override public void rename(String oldName, String newName) throws NameNotFoundException { Object obj = lookup(oldName); unbind(oldName); bind(newName, obj); } - @Override public Context createSubcontext(String name) { String subcontextName = this.root + name; if (!subcontextName.endsWith("/")) { @@ -190,104 +181,84 @@ public class SimpleNamingContext implements Context { return subcontext; } - @Override public void destroySubcontext(String name) { unbind(name); } - @Override public String composeName(String name, String prefix) { return prefix + name; } - @Override public Hashtable getEnvironment() { return this.environment; } - @Override public Object addToEnvironment(String propName, Object propVal) { return this.environment.put(propName, propVal); } - @Override public Object removeFromEnvironment(String propName) { return this.environment.remove(propName); } - @Override public void close() { } // Unsupported methods follow: no support for javax.naming.Name - @Override public NamingEnumeration list(Name name) throws NamingException { throw new OperationNotSupportedException("SimpleNamingContext does not support [javax.naming.Name]"); } - @Override public NamingEnumeration listBindings(Name name) throws NamingException { throw new OperationNotSupportedException("SimpleNamingContext does not support [javax.naming.Name]"); } - @Override public Object lookup(Name name) throws NamingException { throw new OperationNotSupportedException("SimpleNamingContext does not support [javax.naming.Name]"); } - @Override public Object lookupLink(Name name) throws NamingException { throw new OperationNotSupportedException("SimpleNamingContext does not support [javax.naming.Name]"); } - @Override public void bind(Name name, Object obj) throws NamingException { throw new OperationNotSupportedException("SimpleNamingContext does not support [javax.naming.Name]"); } - @Override public void unbind(Name name) throws NamingException { throw new OperationNotSupportedException("SimpleNamingContext does not support [javax.naming.Name]"); } - @Override public void rebind(Name name, Object obj) throws NamingException { throw new OperationNotSupportedException("SimpleNamingContext does not support [javax.naming.Name]"); } - @Override public void rename(Name oldName, Name newName) throws NamingException { throw new OperationNotSupportedException("SimpleNamingContext does not support [javax.naming.Name]"); } - @Override public Context createSubcontext(Name name) throws NamingException { throw new OperationNotSupportedException("SimpleNamingContext does not support [javax.naming.Name]"); } - @Override public void destroySubcontext(Name name) throws NamingException { throw new OperationNotSupportedException("SimpleNamingContext does not support [javax.naming.Name]"); } - @Override public String getNameInNamespace() throws NamingException { throw new OperationNotSupportedException("SimpleNamingContext does not support [javax.naming.Name]"); } - @Override public NameParser getNameParser(Name name) throws NamingException { throw new OperationNotSupportedException("SimpleNamingContext does not support [javax.naming.Name]"); } - @Override public NameParser getNameParser(String name) throws NamingException { throw new OperationNotSupportedException("SimpleNamingContext does not support [javax.naming.Name]"); } - @Override public Name composeName(Name name, Name prefix) throws NamingException { throw new OperationNotSupportedException("SimpleNamingContext does not support [javax.naming.Name]"); } @@ -327,27 +298,22 @@ public class SimpleNamingContext implements Context { protected abstract T createObject(String strippedName, Object obj); - @Override public boolean hasMore() { return this.iterator.hasNext(); } - @Override public T next() { return this.iterator.next(); } - @Override public boolean hasMoreElements() { return this.iterator.hasNext(); } - @Override public T nextElement() { return this.iterator.next(); } - @Override public void close() { } } @@ -359,7 +325,6 @@ public class SimpleNamingContext implements Context { super(context, root); } - @Override protected NameClassPair createObject(String strippedName, Object obj) { return new NameClassPair(strippedName, obj.getClass().getName()); } @@ -372,7 +337,6 @@ public class SimpleNamingContext implements Context { super(context, root); } - @Override protected Binding createObject(String strippedName, Object obj) { return new Binding(strippedName, obj); } diff --git a/spring-test/src/main/java/org/springframework/mock/jndi/SimpleNamingContextBuilder.java b/spring-test/src/main/java/org/springframework/mock/jndi/SimpleNamingContextBuilder.java index 883db7bfd3..449c45faca 100644 --- a/spring-test/src/main/java/org/springframework/mock/jndi/SimpleNamingContextBuilder.java +++ b/spring-test/src/main/java/org/springframework/mock/jndi/SimpleNamingContextBuilder.java @@ -192,7 +192,6 @@ public class SimpleNamingContextBuilder implements InitialContextFactoryBuilder * creating a new SimpleNamingContext instance. * @see SimpleNamingContext */ - @Override public InitialContextFactory createInitialContextFactory(Hashtable environment) { if (activated == null && environment != null) { Object icf = environment.get(Context.INITIAL_CONTEXT_FACTORY); @@ -226,7 +225,6 @@ public class SimpleNamingContextBuilder implements InitialContextFactoryBuilder // Default case... return new InitialContextFactory() { - @Override @SuppressWarnings("unchecked") public Context getInitialContext(Hashtable environment) { return new SimpleNamingContext("", boundObjects, (Hashtable) environment); diff --git a/spring-test/src/main/java/org/springframework/mock/web/DelegatingServletInputStream.java b/spring-test/src/main/java/org/springframework/mock/web/DelegatingServletInputStream.java index 1b8cf3eeba..f97e60e2eb 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/DelegatingServletInputStream.java +++ b/spring-test/src/main/java/org/springframework/mock/web/DelegatingServletInputStream.java @@ -54,12 +54,10 @@ public class DelegatingServletInputStream extends ServletInputStream { } - @Override public int read() throws IOException { return this.sourceStream.read(); } - @Override public void close() throws IOException { super.close(); this.sourceStream.close(); diff --git a/spring-test/src/main/java/org/springframework/mock/web/DelegatingServletOutputStream.java b/spring-test/src/main/java/org/springframework/mock/web/DelegatingServletOutputStream.java index d580974a60..2369417030 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/DelegatingServletOutputStream.java +++ b/spring-test/src/main/java/org/springframework/mock/web/DelegatingServletOutputStream.java @@ -54,18 +54,15 @@ public class DelegatingServletOutputStream extends ServletOutputStream { } - @Override public void write(int b) throws IOException { this.targetStream.write(b); } - @Override public void flush() throws IOException { super.flush(); this.targetStream.flush(); } - @Override public void close() throws IOException { super.close(); this.targetStream.close(); diff --git a/spring-test/src/main/java/org/springframework/mock/web/MockBodyContent.java b/spring-test/src/main/java/org/springframework/mock/web/MockBodyContent.java index 3b98e2edb5..0e6449bcb0 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/MockBodyContent.java +++ b/spring-test/src/main/java/org/springframework/mock/web/MockBodyContent.java @@ -77,17 +77,14 @@ public class MockBodyContent extends BodyContent { } - @Override public Reader getReader() { return new StringReader(this.content); } - @Override public String getString() { return this.content; } - @Override public void writeOut(Writer writer) throws IOException { writer.write(this.content); } @@ -97,127 +94,102 @@ public class MockBodyContent extends BodyContent { // Delegating implementations of JspWriter's abstract methods //--------------------------------------------------------------------- - @Override public void clear() throws IOException { getEnclosingWriter().clear(); } - @Override public void clearBuffer() throws IOException { getEnclosingWriter().clearBuffer(); } - @Override public void close() throws IOException { getEnclosingWriter().close(); } - @Override public int getRemaining() { return getEnclosingWriter().getRemaining(); } - @Override public void newLine() throws IOException { getEnclosingWriter().println(); } - @Override public void write(char value[], int offset, int length) throws IOException { getEnclosingWriter().write(value, offset, length); } - @Override public void print(boolean value) throws IOException { getEnclosingWriter().print(value); } - @Override public void print(char value) throws IOException { getEnclosingWriter().print(value); } - @Override public void print(char[] value) throws IOException { getEnclosingWriter().print(value); } - @Override public void print(double value) throws IOException { getEnclosingWriter().print(value); } - @Override public void print(float value) throws IOException { getEnclosingWriter().print(value); } - @Override public void print(int value) throws IOException { getEnclosingWriter().print(value); } - @Override public void print(long value) throws IOException { getEnclosingWriter().print(value); } - @Override public void print(Object value) throws IOException { getEnclosingWriter().print(value); } - @Override public void print(String value) throws IOException { getEnclosingWriter().print(value); } - @Override public void println() throws IOException { getEnclosingWriter().println(); } - @Override public void println(boolean value) throws IOException { getEnclosingWriter().println(value); } - @Override public void println(char value) throws IOException { getEnclosingWriter().println(value); } - @Override public void println(char[] value) throws IOException { getEnclosingWriter().println(value); } - @Override public void println(double value) throws IOException { getEnclosingWriter().println(value); } - @Override public void println(float value) throws IOException { getEnclosingWriter().println(value); } - @Override public void println(int value) throws IOException { getEnclosingWriter().println(value); } - @Override public void println(long value) throws IOException { getEnclosingWriter().println(value); } - @Override public void println(Object value) throws IOException { getEnclosingWriter().println(value); } - @Override public void println(String value) throws IOException { getEnclosingWriter().println(value); } diff --git a/spring-test/src/main/java/org/springframework/mock/web/MockExpressionEvaluator.java b/spring-test/src/main/java/org/springframework/mock/web/MockExpressionEvaluator.java index f1c08e2774..6b69fdb704 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/MockExpressionEvaluator.java +++ b/spring-test/src/main/java/org/springframework/mock/web/MockExpressionEvaluator.java @@ -56,21 +56,18 @@ public class MockExpressionEvaluator extends ExpressionEvaluator { this.pageContext = pageContext; } - @Override @SuppressWarnings("rawtypes") public Expression parseExpression(final String expression, final Class expectedType, final FunctionMapper functionMapper) throws ELException { return new Expression() { - @Override public Object evaluate(VariableResolver variableResolver) throws ELException { return doEvaluate(expression, expectedType, functionMapper); } }; } - @Override @SuppressWarnings("rawtypes") public Object evaluate(String expression, Class expectedType, VariableResolver variableResolver, FunctionMapper functionMapper) throws ELException { diff --git a/spring-test/src/main/java/org/springframework/mock/web/MockFilterChain.java b/spring-test/src/main/java/org/springframework/mock/web/MockFilterChain.java index 503c51f901..a80a2fb454 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/MockFilterChain.java +++ b/spring-test/src/main/java/org/springframework/mock/web/MockFilterChain.java @@ -119,7 +119,6 @@ public class MockFilterChain implements FilterChain { * Invoke registered {@link Filter}s and/or {@link Servlet} also saving the * request and response. */ - @Override public void doFilter(ServletRequest request, ServletResponse response) throws IOException, ServletException { Assert.notNull(request, "Request must not be null"); Assert.notNull(response, "Response must not be null"); @@ -163,18 +162,15 @@ public class MockFilterChain implements FilterChain { this.delegateServlet = servlet; } - @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { this.delegateServlet.service(request, response); } - @Override public void init(FilterConfig filterConfig) throws ServletException { } - @Override public void destroy() { } diff --git a/spring-test/src/main/java/org/springframework/mock/web/MockFilterConfig.java b/spring-test/src/main/java/org/springframework/mock/web/MockFilterConfig.java index 99e7722f33..49e5beb45a 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/MockFilterConfig.java +++ b/spring-test/src/main/java/org/springframework/mock/web/MockFilterConfig.java @@ -79,12 +79,10 @@ public class MockFilterConfig implements FilterConfig { } - @Override public String getFilterName() { return filterName; } - @Override public ServletContext getServletContext() { return servletContext; } @@ -94,13 +92,11 @@ public class MockFilterConfig implements FilterConfig { this.initParameters.put(name, value); } - @Override public String getInitParameter(String name) { Assert.notNull(name, "Parameter name must not be null"); return this.initParameters.get(name); } - @Override public Enumeration getInitParameterNames() { return Collections.enumeration(this.initParameters.keySet()); } diff --git a/spring-test/src/main/java/org/springframework/mock/web/MockHttpServletRequest.java b/spring-test/src/main/java/org/springframework/mock/web/MockHttpServletRequest.java index 044d382d45..441a53e4ce 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/MockHttpServletRequest.java +++ b/spring-test/src/main/java/org/springframework/mock/web/MockHttpServletRequest.java @@ -283,24 +283,20 @@ public class MockHttpServletRequest implements HttpServletRequest { // ServletRequest interface // --------------------------------------------------------------------- - @Override public Object getAttribute(String name) { checkActive(); return this.attributes.get(name); } - @Override public Enumeration getAttributeNames() { checkActive(); return Collections.enumeration(this.attributes.keySet()); } - @Override public String getCharacterEncoding() { return this.characterEncoding; } - @Override public void setCharacterEncoding(String characterEncoding) { this.characterEncoding = characterEncoding; updateContentTypeHeader(); @@ -320,7 +316,6 @@ public class MockHttpServletRequest implements HttpServletRequest { this.content = content; } - @Override public int getContentLength() { return (this.content != null ? this.content.length : -1); } @@ -337,12 +332,10 @@ public class MockHttpServletRequest implements HttpServletRequest { } } - @Override public String getContentType() { return this.contentType; } - @Override public ServletInputStream getInputStream() { if (this.content != null) { return new DelegatingServletInputStream(new ByteArrayInputStream(this.content)); @@ -462,25 +455,21 @@ public class MockHttpServletRequest implements HttpServletRequest { this.parameters.clear(); } - @Override public String getParameter(String name) { Assert.notNull(name, "Parameter name must not be null"); String[] arr = this.parameters.get(name); return (arr != null && arr.length > 0 ? arr[0] : null); } - @Override public Enumeration getParameterNames() { return Collections.enumeration(this.parameters.keySet()); } - @Override public String[] getParameterValues(String name) { Assert.notNull(name, "Parameter name must not be null"); return this.parameters.get(name); } - @Override public Map getParameterMap() { return Collections.unmodifiableMap(this.parameters); } @@ -489,7 +478,6 @@ public class MockHttpServletRequest implements HttpServletRequest { this.protocol = protocol; } - @Override public String getProtocol() { return this.protocol; } @@ -498,7 +486,6 @@ public class MockHttpServletRequest implements HttpServletRequest { this.scheme = scheme; } - @Override public String getScheme() { return this.scheme; } @@ -507,7 +494,6 @@ public class MockHttpServletRequest implements HttpServletRequest { this.serverName = serverName; } - @Override public String getServerName() { return this.serverName; } @@ -516,12 +502,10 @@ public class MockHttpServletRequest implements HttpServletRequest { this.serverPort = serverPort; } - @Override public int getServerPort() { return this.serverPort; } - @Override public BufferedReader getReader() throws UnsupportedEncodingException { if (this.content != null) { InputStream sourceStream = new ByteArrayInputStream(this.content); @@ -538,7 +522,6 @@ public class MockHttpServletRequest implements HttpServletRequest { this.remoteAddr = remoteAddr; } - @Override public String getRemoteAddr() { return this.remoteAddr; } @@ -547,12 +530,10 @@ public class MockHttpServletRequest implements HttpServletRequest { this.remoteHost = remoteHost; } - @Override public String getRemoteHost() { return this.remoteHost; } - @Override public void setAttribute(String name, Object value) { checkActive(); Assert.notNull(name, "Attribute name must not be null"); @@ -564,7 +545,6 @@ public class MockHttpServletRequest implements HttpServletRequest { } } - @Override public void removeAttribute(String name) { checkActive(); Assert.notNull(name, "Attribute name must not be null"); @@ -599,12 +579,10 @@ public class MockHttpServletRequest implements HttpServletRequest { this.locales.addAll(locales); } - @Override public Locale getLocale() { return this.locales.get(0); } - @Override public Enumeration getLocales() { return Collections.enumeration(this.locales); } @@ -613,17 +591,14 @@ public class MockHttpServletRequest implements HttpServletRequest { this.secure = secure; } - @Override public boolean isSecure() { return this.secure; } - @Override public RequestDispatcher getRequestDispatcher(String path) { return new MockRequestDispatcher(path); } - @Override public String getRealPath(String path) { return this.servletContext.getRealPath(path); } @@ -632,7 +607,6 @@ public class MockHttpServletRequest implements HttpServletRequest { this.remotePort = remotePort; } - @Override public int getRemotePort() { return this.remotePort; } @@ -641,7 +615,6 @@ public class MockHttpServletRequest implements HttpServletRequest { this.localName = localName; } - @Override public String getLocalName() { return this.localName; } @@ -650,7 +623,6 @@ public class MockHttpServletRequest implements HttpServletRequest { this.localAddr = localAddr; } - @Override public String getLocalAddr() { return this.localAddr; } @@ -659,7 +631,6 @@ public class MockHttpServletRequest implements HttpServletRequest { this.localPort = localPort; } - @Override public int getLocalPort() { return this.localPort; } @@ -672,7 +643,6 @@ public class MockHttpServletRequest implements HttpServletRequest { this.authType = authType; } - @Override public String getAuthType() { return this.authType; } @@ -681,7 +651,6 @@ public class MockHttpServletRequest implements HttpServletRequest { this.cookies = cookies; } - @Override public Cookie[] getCookies() { return this.cookies; } @@ -730,7 +699,6 @@ public class MockHttpServletRequest implements HttpServletRequest { } } - @Override public long getDateHeader(String name) { HeaderValueHolder header = HeaderValueHolder.getByName(this.headers, name); Object value = (header != null ? header.getValue() : null); @@ -749,24 +717,20 @@ public class MockHttpServletRequest implements HttpServletRequest { } } - @Override public String getHeader(String name) { HeaderValueHolder header = HeaderValueHolder.getByName(this.headers, name); return (header != null ? header.getStringValue() : null); } - @Override public Enumeration getHeaders(String name) { HeaderValueHolder header = HeaderValueHolder.getByName(this.headers, name); return Collections.enumeration(header != null ? header.getStringValues() : new LinkedList()); } - @Override public Enumeration getHeaderNames() { return Collections.enumeration(this.headers.keySet()); } - @Override public int getIntHeader(String name) { HeaderValueHolder header = HeaderValueHolder.getByName(this.headers, name); Object value = (header != null ? header.getValue() : null); @@ -788,7 +752,6 @@ public class MockHttpServletRequest implements HttpServletRequest { this.method = method; } - @Override public String getMethod() { return this.method; } @@ -797,12 +760,10 @@ public class MockHttpServletRequest implements HttpServletRequest { this.pathInfo = pathInfo; } - @Override public String getPathInfo() { return this.pathInfo; } - @Override public String getPathTranslated() { return (this.pathInfo != null ? getRealPath(this.pathInfo) : null); } @@ -811,7 +772,6 @@ public class MockHttpServletRequest implements HttpServletRequest { this.contextPath = contextPath; } - @Override public String getContextPath() { return this.contextPath; } @@ -820,7 +780,6 @@ public class MockHttpServletRequest implements HttpServletRequest { this.queryString = queryString; } - @Override public String getQueryString() { return this.queryString; } @@ -829,7 +788,6 @@ public class MockHttpServletRequest implements HttpServletRequest { this.remoteUser = remoteUser; } - @Override public String getRemoteUser() { return this.remoteUser; } @@ -838,7 +796,6 @@ public class MockHttpServletRequest implements HttpServletRequest { this.userRoles.add(role); } - @Override public boolean isUserInRole(String role) { return (this.userRoles.contains(role) || (this.servletContext instanceof MockServletContext && ((MockServletContext) this.servletContext).getDeclaredRoles().contains( role))); @@ -848,7 +805,6 @@ public class MockHttpServletRequest implements HttpServletRequest { this.userPrincipal = userPrincipal; } - @Override public Principal getUserPrincipal() { return this.userPrincipal; } @@ -857,7 +813,6 @@ public class MockHttpServletRequest implements HttpServletRequest { this.requestedSessionId = requestedSessionId; } - @Override public String getRequestedSessionId() { return this.requestedSessionId; } @@ -866,12 +821,10 @@ public class MockHttpServletRequest implements HttpServletRequest { this.requestURI = requestURI; } - @Override public String getRequestURI() { return this.requestURI; } - @Override public StringBuffer getRequestURL() { StringBuffer url = new StringBuffer(this.scheme); url.append("://").append(this.serverName).append(':').append(this.serverPort); @@ -883,7 +836,6 @@ public class MockHttpServletRequest implements HttpServletRequest { this.servletPath = servletPath; } - @Override public String getServletPath() { return this.servletPath; } @@ -896,7 +848,6 @@ public class MockHttpServletRequest implements HttpServletRequest { } } - @Override public HttpSession getSession(boolean create) { checkActive(); // Reset session if invalidated. @@ -910,7 +861,6 @@ public class MockHttpServletRequest implements HttpServletRequest { return this.session; } - @Override public HttpSession getSession() { return getSession(true); } @@ -919,7 +869,6 @@ public class MockHttpServletRequest implements HttpServletRequest { this.requestedSessionIdValid = requestedSessionIdValid; } - @Override public boolean isRequestedSessionIdValid() { return this.requestedSessionIdValid; } @@ -928,7 +877,6 @@ public class MockHttpServletRequest implements HttpServletRequest { this.requestedSessionIdFromCookie = requestedSessionIdFromCookie; } - @Override public boolean isRequestedSessionIdFromCookie() { return this.requestedSessionIdFromCookie; } @@ -937,12 +885,10 @@ public class MockHttpServletRequest implements HttpServletRequest { this.requestedSessionIdFromURL = requestedSessionIdFromURL; } - @Override public boolean isRequestedSessionIdFromURL() { return this.requestedSessionIdFromURL; } - @Override public boolean isRequestedSessionIdFromUrl() { return isRequestedSessionIdFromURL(); } diff --git a/spring-test/src/main/java/org/springframework/mock/web/MockHttpServletResponse.java b/spring-test/src/main/java/org/springframework/mock/web/MockHttpServletResponse.java index 5a2b7fd1aa..c86e95a93a 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/MockHttpServletResponse.java +++ b/spring-test/src/main/java/org/springframework/mock/web/MockHttpServletResponse.java @@ -136,7 +136,6 @@ public class MockHttpServletResponse implements HttpServletResponse { return this.writerAccessAllowed; } - @Override public void setCharacterEncoding(String characterEncoding) { this.characterEncoding = characterEncoding; this.charset = true; @@ -153,12 +152,10 @@ public class MockHttpServletResponse implements HttpServletResponse { } } - @Override public String getCharacterEncoding() { return this.characterEncoding; } - @Override public ServletOutputStream getOutputStream() { if (!this.outputStreamAccessAllowed) { throw new IllegalStateException("OutputStream access not allowed"); @@ -166,7 +163,6 @@ public class MockHttpServletResponse implements HttpServletResponse { return this.outputStream; } - @Override public PrintWriter getWriter() throws UnsupportedEncodingException { if (!this.writerAccessAllowed) { throw new IllegalStateException("Writer access not allowed"); @@ -190,7 +186,6 @@ public class MockHttpServletResponse implements HttpServletResponse { this.content.toString(this.characterEncoding) : this.content.toString(); } - @Override public void setContentLength(int contentLength) { this.contentLength = contentLength; doAddHeaderValue(CONTENT_LENGTH_HEADER, contentLength, true); @@ -200,7 +195,6 @@ public class MockHttpServletResponse implements HttpServletResponse { return this.contentLength; } - @Override public void setContentType(String contentType) { this.contentType = contentType; if (contentType != null) { @@ -214,27 +208,22 @@ public class MockHttpServletResponse implements HttpServletResponse { } } - @Override public String getContentType() { return this.contentType; } - @Override public void setBufferSize(int bufferSize) { this.bufferSize = bufferSize; } - @Override public int getBufferSize() { return this.bufferSize; } - @Override public void flushBuffer() { setCommitted(true); } - @Override public void resetBuffer() { if (isCommitted()) { throw new IllegalStateException("Cannot reset buffer - response is already committed"); @@ -253,12 +242,10 @@ public class MockHttpServletResponse implements HttpServletResponse { this.committed = committed; } - @Override public boolean isCommitted() { return this.committed; } - @Override public void reset() { resetBuffer(); this.characterEncoding = null; @@ -271,12 +258,10 @@ public class MockHttpServletResponse implements HttpServletResponse { this.errorMessage = null; } - @Override public void setLocale(Locale locale) { this.locale = locale; } - @Override public Locale getLocale() { return this.locale; } @@ -286,7 +271,6 @@ public class MockHttpServletResponse implements HttpServletResponse { // HttpServletResponse interface //--------------------------------------------------------------------- - @Override public void addCookie(Cookie cookie) { Assert.notNull(cookie, "Cookie must not be null"); this.cookies.add(cookie); @@ -306,7 +290,6 @@ public class MockHttpServletResponse implements HttpServletResponse { return null; } - @Override public boolean containsHeader(String name) { return (HeaderValueHolder.getByName(this.headers, name) != null); } @@ -382,7 +365,6 @@ public class MockHttpServletResponse implements HttpServletResponse { * The default implementation returns the given URL String as-is. *

Can be overridden in subclasses, appending a session id or the like. */ - @Override public String encodeURL(String url) { return url; } @@ -395,22 +377,18 @@ public class MockHttpServletResponse implements HttpServletResponse { * override the common {@link #encodeURL} method instead, applying * to redirect URLs as well as to general URLs. */ - @Override public String encodeRedirectURL(String url) { return encodeURL(url); } - @Override public String encodeUrl(String url) { return encodeURL(url); } - @Override public String encodeRedirectUrl(String url) { return encodeRedirectURL(url); } - @Override public void sendError(int status, String errorMessage) throws IOException { if (isCommitted()) { throw new IllegalStateException("Cannot set error status - response is already committed"); @@ -420,7 +398,6 @@ public class MockHttpServletResponse implements HttpServletResponse { setCommitted(true); } - @Override public void sendError(int status) throws IOException { if (isCommitted()) { throw new IllegalStateException("Cannot set error status - response is already committed"); @@ -429,7 +406,6 @@ public class MockHttpServletResponse implements HttpServletResponse { setCommitted(true); } - @Override public void sendRedirect(String url) throws IOException { if (isCommitted()) { throw new IllegalStateException("Cannot send redirect - response is already committed"); @@ -444,32 +420,26 @@ public class MockHttpServletResponse implements HttpServletResponse { return getHeader(LOCATION_HEADER); } - @Override public void setDateHeader(String name, long value) { setHeaderValue(name, value); } - @Override public void addDateHeader(String name, long value) { addHeaderValue(name, value); } - @Override public void setHeader(String name, String value) { setHeaderValue(name, value); } - @Override public void addHeader(String name, String value) { addHeaderValue(name, value); } - @Override public void setIntHeader(String name, int value) { setHeaderValue(name, value); } - @Override public void addIntHeader(String name, int value) { addHeaderValue(name, value); } @@ -517,12 +487,10 @@ public class MockHttpServletResponse implements HttpServletResponse { } } - @Override public void setStatus(int status) { this.status = status; } - @Override public void setStatus(int status, String errorMessage) { this.status = status; this.errorMessage = errorMessage; @@ -585,14 +553,12 @@ public class MockHttpServletResponse implements HttpServletResponse { super(out); } - @Override public void write(int b) throws IOException { super.write(b); super.flush(); setCommittedIfBufferSizeExceeded(); } - @Override public void flush() throws IOException { super.flush(); setCommitted(true); @@ -610,28 +576,24 @@ public class MockHttpServletResponse implements HttpServletResponse { super(out, true); } - @Override public void write(char buf[], int off, int len) { super.write(buf, off, len); super.flush(); setCommittedIfBufferSizeExceeded(); } - @Override public void write(String s, int off, int len) { super.write(s, off, len); super.flush(); setCommittedIfBufferSizeExceeded(); } - @Override public void write(int c) { super.write(c); super.flush(); setCommittedIfBufferSizeExceeded(); } - @Override public void flush() { super.flush(); setCommitted(true); diff --git a/spring-test/src/main/java/org/springframework/mock/web/MockHttpSession.java b/spring-test/src/main/java/org/springframework/mock/web/MockHttpSession.java index 82a89b61a3..1855230d2c 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/MockHttpSession.java +++ b/spring-test/src/main/java/org/springframework/mock/web/MockHttpSession.java @@ -98,12 +98,10 @@ public class MockHttpSession implements HttpSession { this.id = (id != null ? id : Integer.toString(nextId++)); } - @Override public long getCreationTime() { return this.creationTime; } - @Override public String getId() { return this.id; } @@ -113,53 +111,43 @@ public class MockHttpSession implements HttpSession { this.isNew = false; } - @Override public long getLastAccessedTime() { return this.lastAccessedTime; } - @Override public ServletContext getServletContext() { return this.servletContext; } - @Override public void setMaxInactiveInterval(int interval) { this.maxInactiveInterval = interval; } - @Override public int getMaxInactiveInterval() { return this.maxInactiveInterval; } - @Override public HttpSessionContext getSessionContext() { throw new UnsupportedOperationException("getSessionContext"); } - @Override public Object getAttribute(String name) { Assert.notNull(name, "Attribute name must not be null"); return this.attributes.get(name); } - @Override public Object getValue(String name) { return getAttribute(name); } - @Override public Enumeration getAttributeNames() { return Collections.enumeration(this.attributes.keySet()); } - @Override public String[] getValueNames() { return this.attributes.keySet().toArray(new String[this.attributes.size()]); } - @Override public void setAttribute(String name, Object value) { Assert.notNull(name, "Attribute name must not be null"); if (value != null) { @@ -173,12 +161,10 @@ public class MockHttpSession implements HttpSession { } } - @Override public void putValue(String name, Object value) { setAttribute(name, value); } - @Override public void removeAttribute(String name) { Assert.notNull(name, "Attribute name must not be null"); Object value = this.attributes.remove(name); @@ -187,7 +173,6 @@ public class MockHttpSession implements HttpSession { } } - @Override public void removeValue(String name) { removeAttribute(name); } @@ -212,7 +197,6 @@ public class MockHttpSession implements HttpSession { * * @throws IllegalStateException if this method is called on an already invalidated session */ - @Override public void invalidate() { if (this.invalid) { throw new IllegalStateException("The session has already been invalidated"); @@ -231,7 +215,6 @@ public class MockHttpSession implements HttpSession { this.isNew = value; } - @Override public boolean isNew() { return this.isNew; } diff --git a/spring-test/src/main/java/org/springframework/mock/web/MockJspWriter.java b/spring-test/src/main/java/org/springframework/mock/web/MockJspWriter.java index 9fc585e59a..0dfb31b007 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/MockJspWriter.java +++ b/spring-test/src/main/java/org/springframework/mock/web/MockJspWriter.java @@ -82,7 +82,6 @@ public class MockJspWriter extends JspWriter { } - @Override public void clear() throws IOException { if (this.response.isCommitted()) { throw new IOException("Response already committed"); @@ -90,126 +89,101 @@ public class MockJspWriter extends JspWriter { this.response.resetBuffer(); } - @Override public void clearBuffer() throws IOException { } - @Override public void flush() throws IOException { this.response.flushBuffer(); } - @Override public void close() throws IOException { flush(); } - @Override public int getRemaining() { return Integer.MAX_VALUE; } - @Override public void newLine() throws IOException { getTargetWriter().println(); } - @Override public void write(char value[], int offset, int length) throws IOException { getTargetWriter().write(value, offset, length); } - @Override public void print(boolean value) throws IOException { getTargetWriter().print(value); } - @Override public void print(char value) throws IOException { getTargetWriter().print(value); } - @Override public void print(char[] value) throws IOException { getTargetWriter().print(value); } - @Override public void print(double value) throws IOException { getTargetWriter().print(value); } - @Override public void print(float value) throws IOException { getTargetWriter().print(value); } - @Override public void print(int value) throws IOException { getTargetWriter().print(value); } - @Override public void print(long value) throws IOException { getTargetWriter().print(value); } - @Override public void print(Object value) throws IOException { getTargetWriter().print(value); } - @Override public void print(String value) throws IOException { getTargetWriter().print(value); } - @Override public void println() throws IOException { getTargetWriter().println(); } - @Override public void println(boolean value) throws IOException { getTargetWriter().println(value); } - @Override public void println(char value) throws IOException { getTargetWriter().println(value); } - @Override public void println(char[] value) throws IOException { getTargetWriter().println(value); } - @Override public void println(double value) throws IOException { getTargetWriter().println(value); } - @Override public void println(float value) throws IOException { getTargetWriter().println(value); } - @Override public void println(int value) throws IOException { getTargetWriter().println(value); } - @Override public void println(long value) throws IOException { getTargetWriter().println(value); } - @Override public void println(Object value) throws IOException { getTargetWriter().println(value); } - @Override public void println(String value) throws IOException { getTargetWriter().println(value); } diff --git a/spring-test/src/main/java/org/springframework/mock/web/MockMultipartFile.java b/spring-test/src/main/java/org/springframework/mock/web/MockMultipartFile.java index 91eb319f35..c68ee18ce7 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/MockMultipartFile.java +++ b/spring-test/src/main/java/org/springframework/mock/web/MockMultipartFile.java @@ -96,42 +96,34 @@ public class MockMultipartFile implements MultipartFile { this(name, originalFilename, contentType, FileCopyUtils.copyToByteArray(contentStream)); } - @Override public String getName() { return this.name; } - @Override public String getOriginalFilename() { return this.originalFilename; } - @Override public String getContentType() { return this.contentType; } - @Override public boolean isEmpty() { return (this.content.length == 0); } - @Override public long getSize() { return this.content.length; } - @Override public byte[] getBytes() throws IOException { return this.content; } - @Override public InputStream getInputStream() throws IOException { return new ByteArrayInputStream(this.content); } - @Override public void transferTo(File dest) throws IOException, IllegalStateException { FileCopyUtils.copy(this.content, dest); } diff --git a/spring-test/src/main/java/org/springframework/mock/web/MockMultipartHttpServletRequest.java b/spring-test/src/main/java/org/springframework/mock/web/MockMultipartHttpServletRequest.java index 9c9b568770..b4fda951b4 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/MockMultipartHttpServletRequest.java +++ b/spring-test/src/main/java/org/springframework/mock/web/MockMultipartHttpServletRequest.java @@ -66,17 +66,14 @@ public class MockMultipartHttpServletRequest extends MockHttpServletRequest impl this.multipartFiles.add(file.getName(), file); } - @Override public Iterator getFileNames() { return this.multipartFiles.keySet().iterator(); } - @Override public MultipartFile getFile(String name) { return this.multipartFiles.getFirst(name); } - @Override public List getFiles(String name) { List multipartFiles = this.multipartFiles.get(name); if (multipartFiles != null) { @@ -87,17 +84,14 @@ public class MockMultipartHttpServletRequest extends MockHttpServletRequest impl } } - @Override public Map getFileMap() { return this.multipartFiles.toSingleValueMap(); } - @Override public MultiValueMap getMultiFileMap() { return new LinkedMultiValueMap(this.multipartFiles); } - @Override public String getMultipartContentType(String paramOrFileName) { MultipartFile file = getFile(paramOrFileName); if (file != null) { @@ -108,12 +102,10 @@ public class MockMultipartHttpServletRequest extends MockHttpServletRequest impl } } - @Override public HttpMethod getRequestMethod() { return HttpMethod.valueOf(getMethod()); } - @Override public HttpHeaders getRequestHeaders() { HttpHeaders headers = new HttpHeaders(); Enumeration headerNames = getHeaderNames(); @@ -124,7 +116,6 @@ public class MockMultipartHttpServletRequest extends MockHttpServletRequest impl return headers; } - @Override public HttpHeaders getMultipartHeaders(String paramOrFileName) { String contentType = getMultipartContentType(paramOrFileName); if (contentType != null) { diff --git a/spring-test/src/main/java/org/springframework/mock/web/MockPageContext.java b/spring-test/src/main/java/org/springframework/mock/web/MockPageContext.java index 72202495b7..b492c1fa98 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/MockPageContext.java +++ b/spring-test/src/main/java/org/springframework/mock/web/MockPageContext.java @@ -126,7 +126,6 @@ public class MockPageContext extends PageContext { } - @Override public void initialize( Servlet servlet, ServletRequest request, ServletResponse response, String errorPageURL, boolean needsSession, int bufferSize, boolean autoFlush) { @@ -134,11 +133,9 @@ public class MockPageContext extends PageContext { throw new UnsupportedOperationException("Use appropriate constructor"); } - @Override public void release() { } - @Override public void setAttribute(String name, Object value) { Assert.notNull(name, "Attribute name must not be null"); if (value != null) { @@ -149,7 +146,6 @@ public class MockPageContext extends PageContext { } } - @Override public void setAttribute(String name, Object value, int scope) { Assert.notNull(name, "Attribute name must not be null"); switch (scope) { @@ -170,13 +166,11 @@ public class MockPageContext extends PageContext { } } - @Override public Object getAttribute(String name) { Assert.notNull(name, "Attribute name must not be null"); return this.attributes.get(name); } - @Override public Object getAttribute(String name, int scope) { Assert.notNull(name, "Attribute name must not be null"); switch (scope) { @@ -194,7 +188,6 @@ public class MockPageContext extends PageContext { } } - @Override public Object findAttribute(String name) { Object value = getAttribute(name); if (value == null) { @@ -209,7 +202,6 @@ public class MockPageContext extends PageContext { return value; } - @Override public void removeAttribute(String name) { Assert.notNull(name, "Attribute name must not be null"); this.removeAttribute(name, PageContext.PAGE_SCOPE); @@ -218,7 +210,6 @@ public class MockPageContext extends PageContext { this.removeAttribute(name, PageContext.APPLICATION_SCOPE); } - @Override public void removeAttribute(String name, int scope) { Assert.notNull(name, "Attribute name must not be null"); switch (scope) { @@ -239,7 +230,6 @@ public class MockPageContext extends PageContext { } } - @Override public int getAttributesScope(String name) { if (getAttribute(name) != null) { return PAGE_SCOPE; @@ -262,7 +252,6 @@ public class MockPageContext extends PageContext { return Collections.enumeration(this.attributes.keySet()); } - @Override @SuppressWarnings("unchecked") public Enumeration getAttributeNamesInScope(int scope) { switch (scope) { @@ -280,7 +269,6 @@ public class MockPageContext extends PageContext { } } - @Override public JspWriter getOut() { if (this.out == null) { this.out = new MockJspWriter(this.response); @@ -288,67 +276,54 @@ public class MockPageContext extends PageContext { return this.out; } - @Override public ExpressionEvaluator getExpressionEvaluator() { return new MockExpressionEvaluator(this); } - @Override public ELContext getELContext() { return null; } - @Override public VariableResolver getVariableResolver() { return null; } - @Override public HttpSession getSession() { return this.request.getSession(); } - @Override public Object getPage() { return this; } - @Override public ServletRequest getRequest() { return this.request; } - @Override public ServletResponse getResponse() { return this.response; } - @Override public Exception getException() { return null; } - @Override public ServletConfig getServletConfig() { return this.servletConfig; } - @Override public ServletContext getServletContext() { return this.servletContext; } - @Override public void forward(String path) throws ServletException, IOException { this.request.getRequestDispatcher(path).forward(this.request, this.response); } - @Override public void include(String path) throws ServletException, IOException { this.request.getRequestDispatcher(path).include(this.request, this.response); } - @Override public void include(String path, boolean flush) throws ServletException, IOException { this.request.getRequestDispatcher(path).include(this.request, this.response); if (flush) { @@ -366,12 +341,10 @@ public class MockPageContext extends PageContext { return ((MockHttpServletResponse) this.response).getContentAsString(); } - @Override public void handlePageException(Exception ex) throws ServletException, IOException { throw new ServletException("Page exception", ex); } - @Override public void handlePageException(Throwable ex) throws ServletException, IOException { throw new ServletException("Page exception", ex); } diff --git a/spring-test/src/main/java/org/springframework/mock/web/MockRequestDispatcher.java b/spring-test/src/main/java/org/springframework/mock/web/MockRequestDispatcher.java index e43172c198..88660bb3ae 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/MockRequestDispatcher.java +++ b/spring-test/src/main/java/org/springframework/mock/web/MockRequestDispatcher.java @@ -55,7 +55,6 @@ public class MockRequestDispatcher implements RequestDispatcher { } - @Override public void forward(ServletRequest request, ServletResponse response) { Assert.notNull(request, "Request must not be null"); Assert.notNull(response, "Response must not be null"); @@ -68,7 +67,6 @@ public class MockRequestDispatcher implements RequestDispatcher { } } - @Override public void include(ServletRequest request, ServletResponse response) { Assert.notNull(request, "Request must not be null"); Assert.notNull(response, "Response must not be null"); diff --git a/spring-test/src/main/java/org/springframework/mock/web/MockServletConfig.java b/spring-test/src/main/java/org/springframework/mock/web/MockServletConfig.java index be7ebf808e..90e9dea3b6 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/MockServletConfig.java +++ b/spring-test/src/main/java/org/springframework/mock/web/MockServletConfig.java @@ -78,12 +78,10 @@ public class MockServletConfig implements ServletConfig { } - @Override public String getServletName() { return this.servletName; } - @Override public ServletContext getServletContext() { return this.servletContext; } @@ -93,13 +91,11 @@ public class MockServletConfig implements ServletConfig { this.initParameters.put(name, value); } - @Override public String getInitParameter(String name) { Assert.notNull(name, "Parameter name must not be null"); return this.initParameters.get(name); } - @Override public Enumeration getInitParameterNames() { return Collections.enumeration(this.initParameters.keySet()); } diff --git a/spring-test/src/main/java/org/springframework/mock/web/MockServletContext.java b/spring-test/src/main/java/org/springframework/mock/web/MockServletContext.java index 3b4fea3217..562179ceac 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/MockServletContext.java +++ b/spring-test/src/main/java/org/springframework/mock/web/MockServletContext.java @@ -195,7 +195,6 @@ public class MockServletContext implements ServletContext { } /* This is a Servlet API 2.5 method. */ - @Override public String getContextPath() { return this.contextPath; } @@ -204,7 +203,6 @@ public class MockServletContext implements ServletContext { this.contexts.put(contextPath, context); } - @Override public ServletContext getContext(String contextPath) { if (this.contextPath.equals(contextPath)) { return this; @@ -216,7 +214,6 @@ public class MockServletContext implements ServletContext { this.majorVersion = majorVersion; } - @Override public int getMajorVersion() { return this.majorVersion; } @@ -225,7 +222,6 @@ public class MockServletContext implements ServletContext { this.minorVersion = minorVersion; } - @Override public int getMinorVersion() { return this.minorVersion; } @@ -246,12 +242,10 @@ public class MockServletContext implements ServletContext { return this.effectiveMinorVersion; } - @Override public String getMimeType(String filePath) { return MimeTypeResolver.getMimeType(filePath); } - @Override public Set getResourcePaths(String path) { String actualPath = (path.endsWith("/") ? path : path + "/"); Resource resource = this.resourceLoader.getResource(getResourceLocation(actualPath)); @@ -277,7 +271,6 @@ public class MockServletContext implements ServletContext { } } - @Override public URL getResource(String path) throws MalformedURLException { Resource resource = this.resourceLoader.getResource(getResourceLocation(path)); if (!resource.exists()) { @@ -295,7 +288,6 @@ public class MockServletContext implements ServletContext { } } - @Override public InputStream getResourceAsStream(String path) { Resource resource = this.resourceLoader.getResource(getResourceLocation(path)); if (!resource.exists()) { @@ -310,7 +302,6 @@ public class MockServletContext implements ServletContext { } } - @Override public RequestDispatcher getRequestDispatcher(String path) { if (!path.startsWith("/")) { throw new IllegalArgumentException("RequestDispatcher path at ServletContext level must start with '/'"); @@ -318,7 +309,6 @@ public class MockServletContext implements ServletContext { return new MockRequestDispatcher(path); } - @Override public RequestDispatcher getNamedDispatcher(String path) { return this.namedRequestDispatchers.get(path); } @@ -376,37 +366,30 @@ public class MockServletContext implements ServletContext { registerNamedDispatcher(this.defaultServletName, new MockRequestDispatcher(this.defaultServletName)); } - @Override public Servlet getServlet(String name) { return null; } - @Override public Enumeration getServlets() { return Collections.enumeration(new HashSet()); } - @Override public Enumeration getServletNames() { return Collections.enumeration(new HashSet()); } - @Override public void log(String message) { logger.info(message); } - @Override public void log(Exception ex, String message) { logger.info(message, ex); } - @Override public void log(String message, Throwable ex) { logger.info(message, ex); } - @Override public String getRealPath(String path) { Resource resource = this.resourceLoader.getResource(getResourceLocation(path)); try { @@ -418,18 +401,15 @@ public class MockServletContext implements ServletContext { } } - @Override public String getServerInfo() { return "MockServletContext"; } - @Override public String getInitParameter(String name) { Assert.notNull(name, "Parameter name must not be null"); return this.initParameters.get(name); } - @Override public Enumeration getInitParameterNames() { return Collections.enumeration(this.initParameters.keySet()); } @@ -448,18 +428,15 @@ public class MockServletContext implements ServletContext { this.initParameters.put(name, value); } - @Override public Object getAttribute(String name) { Assert.notNull(name, "Attribute name must not be null"); return this.attributes.get(name); } - @Override public Enumeration getAttributeNames() { return Collections.enumeration(this.attributes.keySet()); } - @Override public void setAttribute(String name, Object value) { Assert.notNull(name, "Attribute name must not be null"); if (value != null) { @@ -470,7 +447,6 @@ public class MockServletContext implements ServletContext { } } - @Override public void removeAttribute(String name) { Assert.notNull(name, "Attribute name must not be null"); this.attributes.remove(name); @@ -480,7 +456,6 @@ public class MockServletContext implements ServletContext { this.servletContextName = servletContextName; } - @Override public String getServletContextName() { return this.servletContextName; } diff --git a/spring-test/src/main/java/org/springframework/mock/web/PassThroughFilterChain.java b/spring-test/src/main/java/org/springframework/mock/web/PassThroughFilterChain.java index 080b8534ea..c2de4d2fcc 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/PassThroughFilterChain.java +++ b/spring-test/src/main/java/org/springframework/mock/web/PassThroughFilterChain.java @@ -73,7 +73,6 @@ public class PassThroughFilterChain implements FilterChain { /** * Pass the call on to the Filter/Servlet. */ - @Override public void doFilter(ServletRequest request, ServletResponse response) throws ServletException, IOException { if (this.filter != null) { this.filter.doFilter(request, response, this.nextFilterChain); diff --git a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockActionResponse.java b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockActionResponse.java index 423cbb0c34..2ca21a472b 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockActionResponse.java +++ b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockActionResponse.java @@ -59,7 +59,6 @@ public class MockActionResponse extends MockStateAwareResponse implements Action } - @Override public void setWindowState(WindowState windowState) throws WindowStateException { if (this.redirectedUrl != null) { throw new IllegalStateException("Cannot set WindowState after sendRedirect has been called"); @@ -68,7 +67,6 @@ public class MockActionResponse extends MockStateAwareResponse implements Action this.redirectAllowed = false; } - @Override public void setPortletMode(PortletMode portletMode) throws PortletModeException { if (this.redirectedUrl != null) { throw new IllegalStateException("Cannot set PortletMode after sendRedirect has been called"); @@ -77,7 +75,6 @@ public class MockActionResponse extends MockStateAwareResponse implements Action this.redirectAllowed = false; } - @Override public void setRenderParameters(Map parameters) { if (this.redirectedUrl != null) { throw new IllegalStateException("Cannot set render parameters after sendRedirect has been called"); @@ -86,7 +83,6 @@ public class MockActionResponse extends MockStateAwareResponse implements Action this.redirectAllowed = false; } - @Override public void setRenderParameter(String key, String value) { if (this.redirectedUrl != null) { throw new IllegalStateException("Cannot set render parameters after sendRedirect has been called"); @@ -95,7 +91,6 @@ public class MockActionResponse extends MockStateAwareResponse implements Action this.redirectAllowed = false; } - @Override public void setRenderParameter(String key, String[] values) { if (this.redirectedUrl != null) { throw new IllegalStateException("Cannot set render parameters after sendRedirect has been called"); @@ -104,7 +99,6 @@ public class MockActionResponse extends MockStateAwareResponse implements Action this.redirectAllowed = false; } - @Override public void sendRedirect(String location) throws IOException { if (!this.redirectAllowed) { throw new IllegalStateException( @@ -114,7 +108,6 @@ public class MockActionResponse extends MockStateAwareResponse implements Action this.redirectedUrl = location; } - @Override public void sendRedirect(String location, String renderUrlParamName) throws IOException { sendRedirect(location); if (renderUrlParamName != null) { diff --git a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockBaseURL.java b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockBaseURL.java index 28662358c0..5072ede8bb 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockBaseURL.java +++ b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockBaseURL.java @@ -56,21 +56,18 @@ public abstract class MockBaseURL implements BaseURL { // BaseURL methods //--------------------------------------------------------------------- - @Override public void setParameter(String key, String value) { Assert.notNull(key, "Parameter key must be null"); Assert.notNull(value, "Parameter value must not be null"); this.parameters.put(key, new String[] {value}); } - @Override public void setParameter(String key, String[] values) { Assert.notNull(key, "Parameter key must be null"); Assert.notNull(values, "Parameter values must not be null"); this.parameters.put(key, values); } - @Override public void setParameters(Map parameters) { Assert.notNull(parameters, "Parameters Map must not be null"); this.parameters.clear(); @@ -90,12 +87,10 @@ public abstract class MockBaseURL implements BaseURL { return this.parameters.get(name); } - @Override public Map getParameterMap() { return Collections.unmodifiableMap(this.parameters); } - @Override public void setSecure(boolean secure) throws PortletSecurityException { this.secure = secure; } @@ -104,17 +99,14 @@ public abstract class MockBaseURL implements BaseURL { return this.secure; } - @Override public void write(Writer out) throws IOException { out.write(toString()); } - @Override public void write(Writer out, boolean escapeXML) throws IOException { out.write(toString()); } - @Override public void addProperty(String key, String value) { String[] values = this.properties.get(key); if (values != null) { @@ -125,7 +117,6 @@ public abstract class MockBaseURL implements BaseURL { } } - @Override public void setProperty(String key, String value) { this.properties.put(key, new String[] {value}); } diff --git a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockCacheControl.java b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockCacheControl.java index 109133a2b6..1a914ff571 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockCacheControl.java +++ b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockCacheControl.java @@ -35,42 +35,34 @@ public class MockCacheControl implements CacheControl { private boolean useCachedContent = false; - @Override public int getExpirationTime() { return this.expirationTime; } - @Override public void setExpirationTime(int time) { this.expirationTime = time; } - @Override public boolean isPublicScope() { return this.publicScope; } - @Override public void setPublicScope(boolean publicScope) { this.publicScope = publicScope; } - @Override public String getETag() { return this.etag; } - @Override public void setETag(String token) { this.etag = token; } - @Override public boolean useCachedContent() { return this.useCachedContent; } - @Override public void setUseCachedContent(boolean useCachedContent) { this.useCachedContent = useCachedContent; } diff --git a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockClientDataRequest.java b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockClientDataRequest.java index beccbcf59a..885c799608 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockClientDataRequest.java +++ b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockClientDataRequest.java @@ -76,7 +76,6 @@ public class MockClientDataRequest extends MockPortletRequest implements ClientD this.content = content; } - @Override public InputStream getPortletInputStream() throws IOException { if (this.content != null) { return new ByteArrayInputStream(this.content); @@ -86,12 +85,10 @@ public class MockClientDataRequest extends MockPortletRequest implements ClientD } } - @Override public void setCharacterEncoding(String characterEncoding) { this.characterEncoding = characterEncoding; } - @Override public BufferedReader getReader() throws UnsupportedEncodingException { if (this.content != null) { InputStream sourceStream = new ByteArrayInputStream(this.content); @@ -104,7 +101,6 @@ public class MockClientDataRequest extends MockPortletRequest implements ClientD } } - @Override public String getCharacterEncoding() { return this.characterEncoding; } @@ -113,12 +109,10 @@ public class MockClientDataRequest extends MockPortletRequest implements ClientD this.contentType = contentType; } - @Override public String getContentType() { return this.contentType; } - @Override public int getContentLength() { return (this.content != null ? content.length : -1); } @@ -127,7 +121,6 @@ public class MockClientDataRequest extends MockPortletRequest implements ClientD this.method = method; } - @Override public String getMethod() { return this.method; } diff --git a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockEvent.java b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockEvent.java index daa15e5156..6dbaa70e32 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockEvent.java +++ b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockEvent.java @@ -73,17 +73,14 @@ public class MockEvent implements Event { } - @Override public QName getQName() { return this.name; } - @Override public String getName() { return this.name.getLocalPart(); } - @Override public Serializable getValue() { return this.value; } diff --git a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockEventRequest.java b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockEventRequest.java index d29d7865c4..ef3dc9d2c0 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockEventRequest.java +++ b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockEventRequest.java @@ -73,7 +73,6 @@ public class MockEventRequest extends MockPortletRequest implements EventRequest return EVENT_PHASE; } - @Override public Event getEvent() { return this.event; } @@ -82,7 +81,6 @@ public class MockEventRequest extends MockPortletRequest implements EventRequest this.method = method; } - @Override public String getMethod() { return this.method; } diff --git a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockEventResponse.java b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockEventResponse.java index 1114d0081b..54c0404d74 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockEventResponse.java +++ b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockEventResponse.java @@ -27,7 +27,6 @@ import javax.portlet.EventResponse; */ public class MockEventResponse extends MockStateAwareResponse implements EventResponse { - @Override public void setRenderParameters(EventRequest request) { setRenderParameters(request.getParameterMap()); } diff --git a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockMimeResponse.java b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockMimeResponse.java index 0a48975f69..0d2bab32e3 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockMimeResponse.java +++ b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockMimeResponse.java @@ -101,7 +101,6 @@ public class MockMimeResponse extends MockPortletResponse implements MimeRespons // RenderResponse methods //--------------------------------------------------------------------- - @Override public void setContentType(String contentType) { if (this.request != null) { Enumeration supportedTypes = this.request.getResponseContentTypes(); @@ -113,7 +112,6 @@ public class MockMimeResponse extends MockPortletResponse implements MimeRespons this.contentType = contentType; } - @Override public String getContentType() { return this.contentType; } @@ -122,12 +120,10 @@ public class MockMimeResponse extends MockPortletResponse implements MimeRespons this.characterEncoding = characterEncoding; } - @Override public String getCharacterEncoding() { return this.characterEncoding; } - @Override public PrintWriter getWriter() throws UnsupportedEncodingException { if (this.writer == null) { Writer targetWriter = (this.characterEncoding != null @@ -154,22 +150,18 @@ public class MockMimeResponse extends MockPortletResponse implements MimeRespons this.locale = locale; } - @Override public Locale getLocale() { return this.locale; } - @Override public void setBufferSize(int bufferSize) { this.bufferSize = bufferSize; } - @Override public int getBufferSize() { return this.bufferSize; } - @Override public void flushBuffer() { if (this.writer != null) { this.writer.flush(); @@ -185,7 +177,6 @@ public class MockMimeResponse extends MockPortletResponse implements MimeRespons this.committed = true; } - @Override public void resetBuffer() { if (this.committed) { throw new IllegalStateException("Cannot reset buffer - response is already committed"); @@ -197,12 +188,10 @@ public class MockMimeResponse extends MockPortletResponse implements MimeRespons this.committed = committed; } - @Override public boolean isCommitted() { return this.committed; } - @Override public void reset() { resetBuffer(); this.characterEncoding = null; @@ -210,27 +199,22 @@ public class MockMimeResponse extends MockPortletResponse implements MimeRespons this.locale = null; } - @Override public OutputStream getPortletOutputStream() throws IOException { return this.outputStream; } - @Override public PortletURL createRenderURL() { return new MockPortletURL(getPortalContext(), MockPortletURL.URL_TYPE_RENDER); } - @Override public PortletURL createActionURL() { return new MockPortletURL(getPortalContext(), MockPortletURL.URL_TYPE_ACTION); } - @Override public ResourceURL createResourceURL() { return new MockResourceURL(); } - @Override public CacheControl getCacheControl() { return this.cacheControl; } diff --git a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockMultipartActionRequest.java b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockMultipartActionRequest.java index e269a621e1..a695cee3ba 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockMultipartActionRequest.java +++ b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockMultipartActionRequest.java @@ -56,17 +56,14 @@ public class MockMultipartActionRequest extends MockActionRequest implements Mul this.multipartFiles.add(file.getName(), file); } - @Override public Iterator getFileNames() { return this.multipartFiles.keySet().iterator(); } - @Override public MultipartFile getFile(String name) { return this.multipartFiles.getFirst(name); } - @Override public List getFiles(String name) { List multipartFiles = this.multipartFiles.get(name); if (multipartFiles != null) { @@ -77,17 +74,14 @@ public class MockMultipartActionRequest extends MockActionRequest implements Mul } } - @Override public Map getFileMap() { return this.multipartFiles.toSingleValueMap(); } - @Override public MultiValueMap getMultiFileMap() { return new LinkedMultiValueMap(this.multipartFiles); } - @Override public String getMultipartContentType(String paramOrFileName) { MultipartFile file = getFile(paramOrFileName); if (file != null) { diff --git a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockPortalContext.java b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockPortalContext.java index 824df6f70d..2895914662 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockPortalContext.java +++ b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockPortalContext.java @@ -74,7 +74,6 @@ public class MockPortalContext implements PortalContext { } - @Override public String getPortalInfo() { return "MockPortal/1.0"; } @@ -83,22 +82,18 @@ public class MockPortalContext implements PortalContext { this.properties.put(name, value); } - @Override public String getProperty(String name) { return this.properties.get(name); } - @Override public Enumeration getPropertyNames() { return Collections.enumeration(this.properties.keySet()); } - @Override public Enumeration getSupportedPortletModes() { return Collections.enumeration(this.portletModes); } - @Override public Enumeration getSupportedWindowStates() { return Collections.enumeration(this.windowStates); } diff --git a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockPortletConfig.java b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockPortletConfig.java index cf7f48bb17..9d3a878026 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockPortletConfig.java +++ b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockPortletConfig.java @@ -96,12 +96,10 @@ public class MockPortletConfig implements PortletConfig { } - @Override public String getPortletName() { return this.portletName; } - @Override public PortletContext getPortletContext() { return this.portletContext; } @@ -111,7 +109,6 @@ public class MockPortletConfig implements PortletConfig { this.resourceBundles.put(locale, resourceBundle); } - @Override public ResourceBundle getResourceBundle(Locale locale) { Assert.notNull(locale, "Locale must not be null"); return this.resourceBundles.get(locale); @@ -122,13 +119,11 @@ public class MockPortletConfig implements PortletConfig { this.initParameters.put(name, value); } - @Override public String getInitParameter(String name) { Assert.notNull(name, "Parameter name must not be null"); return this.initParameters.get(name); } - @Override public Enumeration getInitParameterNames() { return Collections.enumeration(this.initParameters.keySet()); } @@ -137,7 +132,6 @@ public class MockPortletConfig implements PortletConfig { this.publicRenderParameterNames.add(name); } - @Override public Enumeration getPublicRenderParameterNames() { return Collections.enumeration(this.publicRenderParameterNames); } @@ -146,7 +140,6 @@ public class MockPortletConfig implements PortletConfig { this.defaultNamespace = defaultNamespace; } - @Override public String getDefaultNamespace() { return this.defaultNamespace; } @@ -155,7 +148,6 @@ public class MockPortletConfig implements PortletConfig { this.publishingEventQNames.add(name); } - @Override public Enumeration getPublishingEventQNames() { return Collections.enumeration(this.publishingEventQNames); } @@ -164,7 +156,6 @@ public class MockPortletConfig implements PortletConfig { this.processingEventQNames.add(name); } - @Override public Enumeration getProcessingEventQNames() { return Collections.enumeration(this.processingEventQNames); } @@ -173,7 +164,6 @@ public class MockPortletConfig implements PortletConfig { this.supportedLocales.add(locale); } - @Override public Enumeration getSupportedLocales() { return Collections.enumeration(this.supportedLocales); } @@ -186,7 +176,6 @@ public class MockPortletConfig implements PortletConfig { this.containerRuntimeOptions.put(key, values); } - @Override public Map getContainerRuntimeOptions() { return Collections.unmodifiableMap(this.containerRuntimeOptions); } diff --git a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockPortletContext.java b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockPortletContext.java index 7d4ec1c904..b1193ff5e1 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockPortletContext.java +++ b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockPortletContext.java @@ -126,12 +126,10 @@ public class MockPortletContext implements PortletContext { } - @Override public String getServerInfo() { return "MockPortal/1.0"; } - @Override public PortletRequestDispatcher getRequestDispatcher(String path) { if (!path.startsWith("/")) { throw new IllegalArgumentException( @@ -140,12 +138,10 @@ public class MockPortletContext implements PortletContext { return new MockPortletRequestDispatcher(path); } - @Override public PortletRequestDispatcher getNamedDispatcher(String path) { return null; } - @Override public InputStream getResourceAsStream(String path) { Resource resource = this.resourceLoader.getResource(getResourceLocation(path)); try { @@ -157,22 +153,18 @@ public class MockPortletContext implements PortletContext { } } - @Override public int getMajorVersion() { return 2; } - @Override public int getMinorVersion() { return 0; } - @Override public String getMimeType(String filePath) { return MimeTypeResolver.getMimeType(filePath); } - @Override public String getRealPath(String path) { Resource resource = this.resourceLoader.getResource(getResourceLocation(path)); try { @@ -184,7 +176,6 @@ public class MockPortletContext implements PortletContext { } } - @Override public Set getResourcePaths(String path) { Resource resource = this.resourceLoader.getResource(getResourceLocation(path)); try { @@ -203,7 +194,6 @@ public class MockPortletContext implements PortletContext { } } - @Override public URL getResource(String path) throws MalformedURLException { Resource resource = this.resourceLoader.getResource(getResourceLocation(path)); try { @@ -215,17 +205,14 @@ public class MockPortletContext implements PortletContext { } } - @Override public Object getAttribute(String name) { return this.attributes.get(name); } - @Override public Enumeration getAttributeNames() { return new Vector(this.attributes.keySet()).elements(); } - @Override public void setAttribute(String name, Object value) { if (value != null) { this.attributes.put(name, value); @@ -235,7 +222,6 @@ public class MockPortletContext implements PortletContext { } } - @Override public void removeAttribute(String name) { this.attributes.remove(name); } @@ -245,23 +231,19 @@ public class MockPortletContext implements PortletContext { this.initParameters.put(name, value); } - @Override public String getInitParameter(String name) { Assert.notNull(name, "Parameter name must not be null"); return this.initParameters.get(name); } - @Override public Enumeration getInitParameterNames() { return Collections.enumeration(this.initParameters.keySet()); } - @Override public void log(String message) { logger.info(message); } - @Override public void log(String message, Throwable t) { logger.info(message, t); } @@ -270,7 +252,6 @@ public class MockPortletContext implements PortletContext { this.portletContextName = portletContextName; } - @Override public String getPortletContextName() { return this.portletContextName; } @@ -279,7 +260,6 @@ public class MockPortletContext implements PortletContext { this.containerRuntimeOptions.add(key); } - @Override public Enumeration getContainerRuntimeOptions() { return Collections.enumeration(this.containerRuntimeOptions); } diff --git a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockPortletPreferences.java b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockPortletPreferences.java index 3af2d6e97a..7c5fef116b 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockPortletPreferences.java +++ b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockPortletPreferences.java @@ -56,32 +56,27 @@ public class MockPortletPreferences implements PortletPreferences { } } - @Override public boolean isReadOnly(String key) { Assert.notNull(key, "Key must not be null"); return this.readOnly.contains(key); } - @Override public String getValue(String key, String def) { Assert.notNull(key, "Key must not be null"); String[] values = this.preferences.get(key); return (values != null && values.length > 0 ? values[0] : def); } - @Override public String[] getValues(String key, String[] def) { Assert.notNull(key, "Key must not be null"); String[] values = this.preferences.get(key); return (values != null && values.length > 0 ? values : def); } - @Override public void setValue(String key, String value) throws ReadOnlyException { setValues(key, new String[] {value}); } - @Override public void setValues(String key, String[] values) throws ReadOnlyException { Assert.notNull(key, "Key must not be null"); if (isReadOnly(key)) { @@ -90,17 +85,14 @@ public class MockPortletPreferences implements PortletPreferences { this.preferences.put(key, values); } - @Override public Enumeration getNames() { return Collections.enumeration(this.preferences.keySet()); } - @Override public Map getMap() { return Collections.unmodifiableMap(this.preferences); } - @Override public void reset(String key) throws ReadOnlyException { Assert.notNull(key, "Key must not be null"); if (isReadOnly(key)) { @@ -113,7 +105,6 @@ public class MockPortletPreferences implements PortletPreferences { this.preferencesValidator = preferencesValidator; } - @Override public void store() throws IOException, ValidatorException { if (this.preferencesValidator != null) { this.preferencesValidator.validate(this); diff --git a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockPortletRequest.java b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockPortletRequest.java index 921510b3c5..70e90567b0 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockPortletRequest.java +++ b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockPortletRequest.java @@ -174,12 +174,10 @@ public class MockPortletRequest implements PortletRequest { // PortletRequest methods // --------------------------------------------------------------------- - @Override public boolean isWindowStateAllowed(WindowState windowState) { return CollectionUtils.contains(this.portalContext.getSupportedWindowStates(), windowState); } - @Override public boolean isPortletModeAllowed(PortletMode portletMode) { return CollectionUtils.contains(this.portalContext.getSupportedPortletModes(), portletMode); } @@ -189,7 +187,6 @@ public class MockPortletRequest implements PortletRequest { this.portletMode = portletMode; } - @Override public PortletMode getPortletMode() { return this.portletMode; } @@ -199,7 +196,6 @@ public class MockPortletRequest implements PortletRequest { this.windowState = windowState; } - @Override public WindowState getWindowState() { return this.windowState; } @@ -209,7 +205,6 @@ public class MockPortletRequest implements PortletRequest { this.portletPreferences = preferences; } - @Override public PortletPreferences getPreferences() { return this.portletPreferences; } @@ -222,12 +217,10 @@ public class MockPortletRequest implements PortletRequest { } } - @Override public PortletSession getPortletSession() { return getPortletSession(true); } - @Override public PortletSession getPortletSession(boolean create) { checkActive(); // Reset session if invalidated. @@ -273,25 +266,21 @@ public class MockPortletRequest implements PortletRequest { } } - @Override public String getProperty(String key) { Assert.notNull(key, "Property key must not be null"); List list = this.properties.get(key); return (list != null && list.size() > 0 ? list.get(0) : null); } - @Override public Enumeration getProperties(String key) { Assert.notNull(key, "property key must not be null"); return Collections.enumeration(this.properties.get(key)); } - @Override public Enumeration getPropertyNames() { return Collections.enumeration(this.properties.keySet()); } - @Override public PortalContext getPortalContext() { return this.portalContext; } @@ -300,7 +289,6 @@ public class MockPortletRequest implements PortletRequest { this.authType = authType; } - @Override public String getAuthType() { return this.authType; } @@ -309,7 +297,6 @@ public class MockPortletRequest implements PortletRequest { this.contextPath = contextPath; } - @Override public String getContextPath() { return this.contextPath; } @@ -318,7 +305,6 @@ public class MockPortletRequest implements PortletRequest { this.remoteUser = remoteUser; } - @Override public String getRemoteUser() { return this.remoteUser; } @@ -327,7 +313,6 @@ public class MockPortletRequest implements PortletRequest { this.userPrincipal = userPrincipal; } - @Override public Principal getUserPrincipal() { return this.userPrincipal; } @@ -336,18 +321,15 @@ public class MockPortletRequest implements PortletRequest { this.userRoles.add(role); } - @Override public boolean isUserInRole(String role) { return this.userRoles.contains(role); } - @Override public Object getAttribute(String name) { checkActive(); return this.attributes.get(name); } - @Override public Enumeration getAttributeNames() { checkActive(); return new Vector(this.attributes.keySet()).elements(); @@ -388,23 +370,19 @@ public class MockPortletRequest implements PortletRequest { } } - @Override public String getParameter(String name) { String[] arr = this.parameters.get(name); return (arr != null && arr.length > 0 ? arr[0] : null); } - @Override public Enumeration getParameterNames() { return Collections.enumeration(this.parameters.keySet()); } - @Override public String[] getParameterValues(String name) { return this.parameters.get(name); } - @Override public Map getParameterMap() { return Collections.unmodifiableMap(this.parameters); } @@ -413,12 +391,10 @@ public class MockPortletRequest implements PortletRequest { this.secure = secure; } - @Override public boolean isSecure() { return this.secure; } - @Override public void setAttribute(String name, Object value) { checkActive(); if (value != null) { @@ -429,13 +405,11 @@ public class MockPortletRequest implements PortletRequest { } } - @Override public void removeAttribute(String name) { checkActive(); this.attributes.remove(name); } - @Override public String getRequestedSessionId() { PortletSession session = this.getPortletSession(); return (session != null ? session.getId() : null); @@ -445,7 +419,6 @@ public class MockPortletRequest implements PortletRequest { this.requestedSessionIdValid = requestedSessionIdValid; } - @Override public boolean isRequestedSessionIdValid() { return this.requestedSessionIdValid; } @@ -458,12 +431,10 @@ public class MockPortletRequest implements PortletRequest { this.responseContentTypes.add(0, responseContentType); } - @Override public String getResponseContentType() { return this.responseContentTypes.get(0); } - @Override public Enumeration getResponseContentTypes() { return Collections.enumeration(this.responseContentTypes); } @@ -476,12 +447,10 @@ public class MockPortletRequest implements PortletRequest { this.locales.add(0, locale); } - @Override public Locale getLocale() { return this.locales.get(0); } - @Override public Enumeration getLocales() { return Collections.enumeration(this.locales); } @@ -490,7 +459,6 @@ public class MockPortletRequest implements PortletRequest { this.scheme = scheme; } - @Override public String getScheme() { return this.scheme; } @@ -499,7 +467,6 @@ public class MockPortletRequest implements PortletRequest { this.serverName = serverName; } - @Override public String getServerName() { return this.serverName; } @@ -508,7 +475,6 @@ public class MockPortletRequest implements PortletRequest { this.serverPort = serverPort; } - @Override public int getServerPort() { return this.serverPort; } @@ -517,7 +483,6 @@ public class MockPortletRequest implements PortletRequest { this.windowID = windowID; } - @Override public String getWindowID() { return this.windowID; } @@ -526,12 +491,10 @@ public class MockPortletRequest implements PortletRequest { this.cookies = cookies; } - @Override public Cookie[] getCookies() { return this.cookies; } - @Override public Map getPrivateParameterMap() { if (!this.publicParameterNames.isEmpty()) { Map filtered = new LinkedHashMap(); @@ -547,7 +510,6 @@ public class MockPortletRequest implements PortletRequest { } } - @Override public Map getPublicParameterMap() { if (!this.publicParameterNames.isEmpty()) { Map filtered = new LinkedHashMap(); diff --git a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockPortletRequestDispatcher.java b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockPortletRequestDispatcher.java index f4e0dc98fd..70fd67c1b1 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockPortletRequestDispatcher.java +++ b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockPortletRequestDispatcher.java @@ -53,12 +53,10 @@ public class MockPortletRequestDispatcher implements PortletRequestDispatcher { } - @Override public void include(RenderRequest request, RenderResponse response) throws PortletException, IOException { include((PortletRequest) request, (PortletResponse) response); } - @Override public void include(PortletRequest request, PortletResponse response) throws PortletException, IOException { Assert.notNull(request, "Request must not be null"); Assert.notNull(response, "Response must not be null"); @@ -71,7 +69,6 @@ public class MockPortletRequestDispatcher implements PortletRequestDispatcher { } } - @Override public void forward(PortletRequest request, PortletResponse response) throws PortletException, IOException { Assert.notNull(request, "Request must not be null"); Assert.notNull(response, "Response must not be null"); diff --git a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockPortletResponse.java b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockPortletResponse.java index 513a6c8c9c..8adc809fcf 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockPortletResponse.java +++ b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockPortletResponse.java @@ -85,7 +85,6 @@ public class MockPortletResponse implements PortletResponse { // PortletResponse methods //--------------------------------------------------------------------- - @Override public void addProperty(String key, String value) { Assert.notNull(key, "Property key must not be null"); String[] oldArr = this.properties.get(key); @@ -100,7 +99,6 @@ public class MockPortletResponse implements PortletResponse { } } - @Override public void setProperty(String key, String value) { Assert.notNull(key, "Property key must not be null"); this.properties.put(key, new String[] {value}); @@ -121,7 +119,6 @@ public class MockPortletResponse implements PortletResponse { return this.properties.get(key); } - @Override public String encodeURL(String path) { return path; } @@ -130,12 +127,10 @@ public class MockPortletResponse implements PortletResponse { this.namespace = namespace; } - @Override public String getNamespace() { return this.namespace; } - @Override public void addProperty(Cookie cookie) { Assert.notNull(cookie, "Cookie must not be null"); this.cookies.add(cookie); @@ -155,7 +150,6 @@ public class MockPortletResponse implements PortletResponse { return null; } - @Override public void addProperty(String key, Element value) { Assert.notNull(key, "Property key must not be null"); Element[] oldArr = this.xmlProperties.get(key); @@ -186,7 +180,6 @@ public class MockPortletResponse implements PortletResponse { return this.xmlProperties.get(key); } - @Override public Element createElement(String tagName) throws DOMException { if (this.xmlDocument == null) { try { diff --git a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockPortletSession.java b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockPortletSession.java index 431ad08ce3..93800340b8 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockPortletSession.java +++ b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockPortletSession.java @@ -77,12 +77,10 @@ public class MockPortletSession implements PortletSession { } - @Override public Object getAttribute(String name) { return this.portletAttributes.get(name); } - @Override public Object getAttribute(String name, int scope) { if (scope == PortletSession.PORTLET_SCOPE) { return this.portletAttributes.get(name); @@ -93,12 +91,10 @@ public class MockPortletSession implements PortletSession { return null; } - @Override public Enumeration getAttributeNames() { return new Vector(this.portletAttributes.keySet()).elements(); } - @Override public Enumeration getAttributeNames(int scope) { if (scope == PortletSession.PORTLET_SCOPE) { return new Vector(this.portletAttributes.keySet()).elements(); @@ -109,12 +105,10 @@ public class MockPortletSession implements PortletSession { return null; } - @Override public long getCreationTime() { return this.creationTime; } - @Override public String getId() { return this.id; } @@ -124,12 +118,10 @@ public class MockPortletSession implements PortletSession { setNew(false); } - @Override public long getLastAccessedTime() { return this.lastAccessedTime; } - @Override public int getMaxInactiveInterval() { return this.maxInactiveInterval; } @@ -155,7 +147,6 @@ public class MockPortletSession implements PortletSession { } } - @Override public void invalidate() { this.invalid = true; clearAttributes(); @@ -169,17 +160,14 @@ public class MockPortletSession implements PortletSession { this.isNew = value; } - @Override public boolean isNew() { return this.isNew; } - @Override public void removeAttribute(String name) { this.portletAttributes.remove(name); } - @Override public void removeAttribute(String name, int scope) { if (scope == PortletSession.PORTLET_SCOPE) { this.portletAttributes.remove(name); @@ -189,7 +177,6 @@ public class MockPortletSession implements PortletSession { } } - @Override public void setAttribute(String name, Object value) { if (value != null) { this.portletAttributes.put(name, value); @@ -199,7 +186,6 @@ public class MockPortletSession implements PortletSession { } } - @Override public void setAttribute(String name, Object value, int scope) { if (scope == PortletSession.PORTLET_SCOPE) { if (value != null) { @@ -219,22 +205,18 @@ public class MockPortletSession implements PortletSession { } } - @Override public void setMaxInactiveInterval(int interval) { this.maxInactiveInterval = interval; } - @Override public PortletContext getPortletContext() { return this.portletContext; } - @Override public Map getAttributeMap() { return Collections.unmodifiableMap(this.portletAttributes); } - @Override public Map getAttributeMap(int scope) { if (scope == PortletSession.PORTLET_SCOPE) { return Collections.unmodifiableMap(this.portletAttributes); diff --git a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockPortletURL.java b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockPortletURL.java index 89fe6a5b17..d8c5dd3ec9 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockPortletURL.java +++ b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockPortletURL.java @@ -69,7 +69,6 @@ public class MockPortletURL extends MockBaseURL implements PortletURL { // PortletURL methods //--------------------------------------------------------------------- - @Override public void setWindowState(WindowState windowState) throws WindowStateException { if (!CollectionUtils.contains(this.portalContext.getSupportedWindowStates(), windowState)) { throw new WindowStateException("WindowState not supported", windowState); @@ -77,12 +76,10 @@ public class MockPortletURL extends MockBaseURL implements PortletURL { this.windowState = windowState; } - @Override public WindowState getWindowState() { return this.windowState; } - @Override public void setPortletMode(PortletMode portletMode) throws PortletModeException { if (!CollectionUtils.contains(this.portalContext.getSupportedPortletModes(), portletMode)) { throw new PortletModeException("PortletMode not supported", portletMode); @@ -90,12 +87,10 @@ public class MockPortletURL extends MockBaseURL implements PortletURL { this.portletMode = portletMode; } - @Override public PortletMode getPortletMode() { return this.portletMode; } - @Override public void removePublicRenderParameter(String name) { this.parameters.remove(name); } diff --git a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockRenderRequest.java b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockRenderRequest.java index 8b9ed2e41a..03c9f0ca4d 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockRenderRequest.java +++ b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockRenderRequest.java @@ -86,7 +86,6 @@ public class MockRenderRequest extends MockPortletRequest implements RenderReque return RENDER_PHASE; } - @Override public String getETag() { return getProperty(RenderRequest.ETAG); } diff --git a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockRenderResponse.java b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockRenderResponse.java index e359b0b52c..464b889467 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockRenderResponse.java +++ b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockRenderResponse.java @@ -69,7 +69,6 @@ public class MockRenderResponse extends MockMimeResponse implements RenderRespon // RenderResponse methods //--------------------------------------------------------------------- - @Override public void setTitle(String title) { this.title = title; } @@ -78,7 +77,6 @@ public class MockRenderResponse extends MockMimeResponse implements RenderRespon return this.title; } - @Override public void setNextPossiblePortletModes(Collection portletModes) { this.nextPossiblePortletModes = portletModes; } diff --git a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockResourceRequest.java b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockResourceRequest.java index 5878e7b96e..2148bd3e91 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockResourceRequest.java +++ b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockResourceRequest.java @@ -97,7 +97,6 @@ public class MockResourceRequest extends MockClientDataRequest implements Resour this.resourceID = resourceID; } - @Override public String getResourceID() { return this.resourceID; } @@ -106,12 +105,10 @@ public class MockResourceRequest extends MockClientDataRequest implements Resour this.cacheability = cacheLevel; } - @Override public String getCacheability() { return this.cacheability; } - @Override public String getETag() { return getProperty(RenderRequest.ETAG); } @@ -124,7 +121,6 @@ public class MockResourceRequest extends MockClientDataRequest implements Resour this.privateRenderParameterMap.put(key, values); } - @Override public Map getPrivateRenderParameterMap() { return Collections.unmodifiableMap(this.privateRenderParameterMap); } diff --git a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockResourceResponse.java b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockResourceResponse.java index 4c7f45279b..228202dbdd 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockResourceResponse.java +++ b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockResourceResponse.java @@ -29,7 +29,6 @@ public class MockResourceResponse extends MockMimeResponse implements ResourceRe private int contentLength = 0; - @Override public void setContentLength(int len) { this.contentLength = len; } diff --git a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockResourceURL.java b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockResourceURL.java index a0cf72f022..d9a42c8dce 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockResourceURL.java +++ b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockResourceURL.java @@ -36,7 +36,6 @@ public class MockResourceURL extends MockBaseURL implements ResourceURL { // ResourceURL methods //--------------------------------------------------------------------- - @Override public void setResourceID(String resourceID) { this.resourceID = resourceID; } @@ -45,12 +44,10 @@ public class MockResourceURL extends MockBaseURL implements ResourceURL { return this.resourceID; } - @Override public void setCacheability(String cacheLevel) { this.cacheability = cacheLevel; } - @Override public String getCacheability() { return this.cacheability; } diff --git a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockStateAwareResponse.java b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockStateAwareResponse.java index 93ddad81d0..5c965b85b8 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockStateAwareResponse.java +++ b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockStateAwareResponse.java @@ -68,7 +68,6 @@ public class MockStateAwareResponse extends MockPortletResponse implements State } - @Override public void setWindowState(WindowState windowState) throws WindowStateException { if (!CollectionUtils.contains(getPortalContext().getSupportedWindowStates(), windowState)) { throw new WindowStateException("WindowState not supported", windowState); @@ -76,12 +75,10 @@ public class MockStateAwareResponse extends MockPortletResponse implements State this.windowState = windowState; } - @Override public WindowState getWindowState() { return this.windowState; } - @Override public void setPortletMode(PortletMode portletMode) throws PortletModeException { if (!CollectionUtils.contains(getPortalContext().getSupportedPortletModes(), portletMode)) { throw new PortletModeException("PortletMode not supported", portletMode); @@ -89,26 +86,22 @@ public class MockStateAwareResponse extends MockPortletResponse implements State this.portletMode = portletMode; } - @Override public PortletMode getPortletMode() { return this.portletMode; } - @Override public void setRenderParameters(Map parameters) { Assert.notNull(parameters, "Parameters Map must not be null"); this.renderParameters.clear(); this.renderParameters.putAll(parameters); } - @Override public void setRenderParameter(String key, String value) { Assert.notNull(key, "Parameter key must not be null"); Assert.notNull(value, "Parameter value must not be null"); this.renderParameters.put(key, new String[] {value}); } - @Override public void setRenderParameter(String key, String[] values) { Assert.notNull(key, "Parameter key must not be null"); Assert.notNull(values, "Parameter values must not be null"); @@ -130,22 +123,18 @@ public class MockStateAwareResponse extends MockPortletResponse implements State return this.renderParameters.keySet().iterator(); } - @Override public Map getRenderParameterMap() { return Collections.unmodifiableMap(this.renderParameters); } - @Override public void removePublicRenderParameter(String name) { this.renderParameters.remove(name); } - @Override public void setEvent(QName name, Serializable value) { this.events.put(name, value); } - @Override public void setEvent(String name, Serializable value) { this.events.put(new QName(name), value); } diff --git a/spring-test/src/main/java/org/springframework/mock/web/portlet/ServletWrappingPortletContext.java b/spring-test/src/main/java/org/springframework/mock/web/portlet/ServletWrappingPortletContext.java index 561dfeb4f0..75d52b5e4c 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/portlet/ServletWrappingPortletContext.java +++ b/spring-test/src/main/java/org/springframework/mock/web/portlet/ServletWrappingPortletContext.java @@ -59,105 +59,85 @@ public class ServletWrappingPortletContext implements PortletContext { } - @Override public String getServerInfo() { return this.servletContext.getServerInfo(); } - @Override public PortletRequestDispatcher getRequestDispatcher(String path) { return null; } - @Override public PortletRequestDispatcher getNamedDispatcher(String name) { return null; } - @Override public InputStream getResourceAsStream(String path) { return this.servletContext.getResourceAsStream(path); } - @Override public int getMajorVersion() { return 2; } - @Override public int getMinorVersion() { return 0; } - @Override public String getMimeType(String file) { return this.servletContext.getMimeType(file); } - @Override public String getRealPath(String path) { return this.servletContext.getRealPath(path); } - @Override @SuppressWarnings("unchecked") public Set getResourcePaths(String path) { return this.servletContext.getResourcePaths(path); } - @Override public URL getResource(String path) throws MalformedURLException { return this.servletContext.getResource(path); } - @Override public Object getAttribute(String name) { return this.servletContext.getAttribute(name); } - @Override @SuppressWarnings("unchecked") public Enumeration getAttributeNames() { return this.servletContext.getAttributeNames(); } - @Override public String getInitParameter(String name) { return this.servletContext.getInitParameter(name); } - @Override @SuppressWarnings("unchecked") public Enumeration getInitParameterNames() { return this.servletContext.getInitParameterNames(); } - @Override public void log(String msg) { this.servletContext.log(msg); } - @Override public void log(String message, Throwable throwable) { this.servletContext.log(message, throwable); } - @Override public void removeAttribute(String name) { this.servletContext.removeAttribute(name); } - @Override public void setAttribute(String name, Object object) { this.servletContext.setAttribute(name, object); } - @Override public String getPortletContextName() { return this.servletContext.getServletContextName(); } - @Override public Enumeration getContainerRuntimeOptions() { return Collections.enumeration(new HashSet()); } diff --git a/spring-test/src/main/java/org/springframework/test/AbstractDependencyInjectionSpringContextTests.java b/spring-test/src/main/java/org/springframework/test/AbstractDependencyInjectionSpringContextTests.java index 502bcc7892..0ef706abe1 100644 --- a/spring-test/src/main/java/org/springframework/test/AbstractDependencyInjectionSpringContextTests.java +++ b/spring-test/src/main/java/org/springframework/test/AbstractDependencyInjectionSpringContextTests.java @@ -173,7 +173,6 @@ public abstract class AbstractDependencyInjectionSpringContextTests extends Abst * message will be written to the log. * @see #injectDependencies() */ - @Override protected void prepareTestInstance() throws Exception { if (getApplicationContext() == null) { if (this.logger.isInfoEnabled()) { diff --git a/spring-test/src/main/java/org/springframework/test/AbstractSingleSpringContextTests.java b/spring-test/src/main/java/org/springframework/test/AbstractSingleSpringContextTests.java index c565383da3..0d5d078480 100644 --- a/spring-test/src/main/java/org/springframework/test/AbstractSingleSpringContextTests.java +++ b/spring-test/src/main/java/org/springframework/test/AbstractSingleSpringContextTests.java @@ -95,7 +95,6 @@ public abstract class AbstractSingleSpringContextTests extends AbstractSpringCon * This implementation is final. Override {@code onSetUp} for custom behavior. * @see #onSetUp() */ - @Override protected final void setUp() throws Exception { // lazy load, in case getApplicationContext() has not yet been called. if (this.applicationContext == null) { @@ -137,7 +136,6 @@ public abstract class AbstractSingleSpringContextTests extends AbstractSpringCon * custom behavior. * @see #onTearDown() */ - @Override protected final void tearDown() throws Exception { onTearDown(); } @@ -170,7 +168,6 @@ public abstract class AbstractSingleSpringContextTests extends AbstractSpringCon * {@code contextKey()} returns. * @see #getConfigLocations() */ - @Override protected ConfigurableApplicationContext loadContext(Object key) throws Exception { return loadContextLocations((String[]) key); } diff --git a/spring-test/src/main/java/org/springframework/test/AbstractTransactionalDataSourceSpringContextTests.java b/spring-test/src/main/java/org/springframework/test/AbstractTransactionalDataSourceSpringContextTests.java index 73c9f14560..0f697d115f 100644 --- a/spring-test/src/main/java/org/springframework/test/AbstractTransactionalDataSourceSpringContextTests.java +++ b/spring-test/src/main/java/org/springframework/test/AbstractTransactionalDataSourceSpringContextTests.java @@ -121,7 +121,6 @@ public abstract class AbstractTransactionalDataSourceSpringContextTests * cleared, as a defensive measure against accidental permanent wiping of a database. * @see org.springframework.test.AbstractTransactionalSpringContextTests#setComplete() */ - @Override protected final void setComplete() { if (this.zappedTables) { throw new IllegalStateException("Cannot set complete after deleting tables"); diff --git a/spring-test/src/main/java/org/springframework/test/AbstractTransactionalSpringContextTests.java b/spring-test/src/main/java/org/springframework/test/AbstractTransactionalSpringContextTests.java index ea0784db7e..af3c68663e 100644 --- a/spring-test/src/main/java/org/springframework/test/AbstractTransactionalSpringContextTests.java +++ b/spring-test/src/main/java/org/springframework/test/AbstractTransactionalSpringContextTests.java @@ -187,7 +187,6 @@ public abstract class AbstractTransactionalSpringContextTests extends AbstractDe * @throws Exception simply let any exception propagate * @see #onTearDown() */ - @Override protected void onSetUp() throws Exception { this.complete = !this.isRollback(); @@ -251,7 +250,6 @@ public abstract class AbstractTransactionalSpringContextTests extends AbstractDe * @throws Exception simply let any exception propagate * @see #onSetUp() */ - @Override protected void onTearDown() throws Exception { // Call onTearDownInTransaction and end transaction if the transaction // is still active. diff --git a/spring-test/src/main/java/org/springframework/test/ConditionalTestCase.java b/spring-test/src/main/java/org/springframework/test/ConditionalTestCase.java index eb46b634e2..2869f258b7 100644 --- a/spring-test/src/main/java/org/springframework/test/ConditionalTestCase.java +++ b/spring-test/src/main/java/org/springframework/test/ConditionalTestCase.java @@ -66,7 +66,6 @@ public abstract class ConditionalTestCase extends TestCase { super(name); } - @Override public void runBare() throws Throwable { // getName will return the name of the method being run if (isDisabledInThisEnvironment(getName())) { diff --git a/spring-test/src/main/java/org/springframework/test/annotation/AbstractAnnotationAwareTransactionalTests.java b/spring-test/src/main/java/org/springframework/test/annotation/AbstractAnnotationAwareTransactionalTests.java index 00e59c8226..30c08a22cb 100644 --- a/spring-test/src/main/java/org/springframework/test/annotation/AbstractAnnotationAwareTransactionalTests.java +++ b/spring-test/src/main/java/org/springframework/test/annotation/AbstractAnnotationAwareTransactionalTests.java @@ -174,7 +174,6 @@ public abstract class AbstractAnnotationAwareTransactionalTests extends // Let JUnit handle execution. We're just changing the state of the test class first. runTestTimed(new TestExecutionCallback() { - @Override public void run() throws Throwable { try { AbstractAnnotationAwareTransactionalTests.super.runBare(); diff --git a/spring-test/src/main/java/org/springframework/test/annotation/SystemProfileValueSource.java b/spring-test/src/main/java/org/springframework/test/annotation/SystemProfileValueSource.java index 5a39918a77..d88da93f44 100644 --- a/spring-test/src/main/java/org/springframework/test/annotation/SystemProfileValueSource.java +++ b/spring-test/src/main/java/org/springframework/test/annotation/SystemProfileValueSource.java @@ -50,7 +50,6 @@ public class SystemProfileValueSource implements ProfileValueSource { * system properties. * @see System#getProperty(String) */ - @Override public String get(String key) { Assert.hasText(key, "'key' must not be empty"); return System.getProperty(key); diff --git a/spring-test/src/main/java/org/springframework/test/context/junit38/AbstractJUnit38SpringContextTests.java b/spring-test/src/main/java/org/springframework/test/context/junit38/AbstractJUnit38SpringContextTests.java index ccafb33693..732c1e0bf5 100644 --- a/spring-test/src/main/java/org/springframework/test/context/junit38/AbstractJUnit38SpringContextTests.java +++ b/spring-test/src/main/java/org/springframework/test/context/junit38/AbstractJUnit38SpringContextTests.java @@ -177,7 +177,6 @@ public abstract class AbstractJUnit38SpringContextTests extends TestCase impleme * Sets the {@link ApplicationContext} to be used by this test instance, * provided via {@link ApplicationContextAware} semantics. */ - @Override public final void setApplicationContext(final ApplicationContext applicationContext) { this.applicationContext = applicationContext; } @@ -216,7 +215,6 @@ public abstract class AbstractJUnit38SpringContextTests extends TestCase impleme runTestTimed(new TestExecutionCallback() { - @Override public void run() throws Throwable { runManaged(testMethod); } diff --git a/spring-test/src/main/java/org/springframework/test/context/junit4/AbstractJUnit4SpringContextTests.java b/spring-test/src/main/java/org/springframework/test/context/junit4/AbstractJUnit4SpringContextTests.java index 6b99c6a108..555892901e 100644 --- a/spring-test/src/main/java/org/springframework/test/context/junit4/AbstractJUnit4SpringContextTests.java +++ b/spring-test/src/main/java/org/springframework/test/context/junit4/AbstractJUnit4SpringContextTests.java @@ -80,7 +80,6 @@ public abstract class AbstractJUnit4SpringContextTests implements ApplicationCon * Set the {@link ApplicationContext} to be used by this test instance, * provided via {@link ApplicationContextAware} semantics. */ - @Override public final void setApplicationContext(final ApplicationContext applicationContext) { this.applicationContext = applicationContext; } diff --git a/spring-test/src/main/java/org/springframework/test/context/support/AbstractContextLoader.java b/spring-test/src/main/java/org/springframework/test/context/support/AbstractContextLoader.java index 9bd7032351..0928ff4c9e 100644 --- a/spring-test/src/main/java/org/springframework/test/context/support/AbstractContextLoader.java +++ b/spring-test/src/main/java/org/springframework/test/context/support/AbstractContextLoader.java @@ -86,7 +86,6 @@ public abstract class AbstractContextLoader implements SmartContextLoader { * @since 3.1 * @see #processLocations(Class, String...) */ - @Override public void processContextConfiguration(ContextConfigurationAttributes configAttributes) { String[] processedLocations = processLocations(configAttributes.getDeclaringClass(), configAttributes.getLocations()); @@ -175,7 +174,6 @@ public abstract class AbstractContextLoader implements SmartContextLoader { * @see org.springframework.test.context.ContextLoader#processLocations(Class, String...) * @see #processContextConfiguration(ContextConfigurationAttributes) */ - @Override public final String[] processLocations(Class clazz, String... locations) { return (ObjectUtils.isEmpty(locations) && isGenerateDefaultLocations()) ? generateDefaultLocations(clazz) : modifyLocations(clazz, locations); diff --git a/spring-test/src/main/java/org/springframework/test/context/support/AbstractDelegatingSmartContextLoader.java b/spring-test/src/main/java/org/springframework/test/context/support/AbstractDelegatingSmartContextLoader.java index f0dc37fe67..284e80acf0 100644 --- a/spring-test/src/main/java/org/springframework/test/context/support/AbstractDelegatingSmartContextLoader.java +++ b/spring-test/src/main/java/org/springframework/test/context/support/AbstractDelegatingSmartContextLoader.java @@ -142,7 +142,6 @@ public abstract class AbstractDelegatingSmartContextLoader implements SmartConte * context configuration; or if both candidate loaders detect defaults for the * supplied context configuration */ - @Override public void processContextConfiguration(final ContextConfigurationAttributes configAttributes) { Assert.notNull(configAttributes, "configAttributes must not be null"); @@ -237,7 +236,6 @@ public abstract class AbstractDelegatingSmartContextLoader implements SmartConte * @throws IllegalStateException if neither candidate loader is capable of loading an * {@code ApplicationContext} from the supplied merged context configuration */ - @Override public ApplicationContext loadContext(MergedContextConfiguration mergedConfig) throws Exception { Assert.notNull(mergedConfig, "mergedConfig must not be null"); @@ -270,7 +268,6 @@ public abstract class AbstractDelegatingSmartContextLoader implements SmartConte * {@link #processContextConfiguration(ContextConfigurationAttributes)} instead. * @throws UnsupportedOperationException */ - @Override public final String[] processLocations(Class clazz, String... locations) { throw new UnsupportedOperationException("DelegatingSmartContextLoaders do not support the ContextLoader SPI. " + "Call processContextConfiguration(ContextConfigurationAttributes) instead."); @@ -282,7 +279,6 @@ public abstract class AbstractDelegatingSmartContextLoader implements SmartConte * {@link #loadContext(MergedContextConfiguration)} instead. * @throws UnsupportedOperationException */ - @Override public final ApplicationContext loadContext(String... locations) throws Exception { throw new UnsupportedOperationException("DelegatingSmartContextLoaders do not support the ContextLoader SPI. " + "Call loadContext(MergedContextConfiguration) instead."); diff --git a/spring-test/src/main/java/org/springframework/test/context/support/AbstractGenericContextLoader.java b/spring-test/src/main/java/org/springframework/test/context/support/AbstractGenericContextLoader.java index eb42b471a0..c4b9b4dca7 100644 --- a/spring-test/src/main/java/org/springframework/test/context/support/AbstractGenericContextLoader.java +++ b/spring-test/src/main/java/org/springframework/test/context/support/AbstractGenericContextLoader.java @@ -90,7 +90,6 @@ public abstract class AbstractGenericContextLoader extends AbstractContextLoader * @see GenericApplicationContext * @since 3.1 */ - @Override public final ConfigurableApplicationContext loadContext(MergedContextConfiguration mergedConfig) throws Exception { if (logger.isDebugEnabled()) { logger.debug(String.format("Loading ApplicationContext for merged context configuration [%s].", @@ -143,7 +142,6 @@ public abstract class AbstractGenericContextLoader extends AbstractContextLoader * @see #loadContext(MergedContextConfiguration) * @since 2.5 */ - @Override public final ConfigurableApplicationContext loadContext(String... locations) throws Exception { if (logger.isDebugEnabled()) { logger.debug(String.format("Loading ApplicationContext for locations [%s].", diff --git a/spring-test/src/main/java/org/springframework/test/context/support/AbstractTestExecutionListener.java b/spring-test/src/main/java/org/springframework/test/context/support/AbstractTestExecutionListener.java index 2f349cbc96..34dfe47ec7 100644 --- a/spring-test/src/main/java/org/springframework/test/context/support/AbstractTestExecutionListener.java +++ b/spring-test/src/main/java/org/springframework/test/context/support/AbstractTestExecutionListener.java @@ -34,7 +34,6 @@ public abstract class AbstractTestExecutionListener implements TestExecutionList * The default implementation is empty. Can be overridden by * subclasses as necessary. */ - @Override public void beforeTestClass(TestContext testContext) throws Exception { /* no-op */ } @@ -43,7 +42,6 @@ public abstract class AbstractTestExecutionListener implements TestExecutionList * The default implementation is empty. Can be overridden by * subclasses as necessary. */ - @Override public void prepareTestInstance(TestContext testContext) throws Exception { /* no-op */ } @@ -52,7 +50,6 @@ public abstract class AbstractTestExecutionListener implements TestExecutionList * The default implementation is empty. Can be overridden by * subclasses as necessary. */ - @Override public void beforeTestMethod(TestContext testContext) throws Exception { /* no-op */ } @@ -61,7 +58,6 @@ public abstract class AbstractTestExecutionListener implements TestExecutionList * The default implementation is empty. Can be overridden by * subclasses as necessary. */ - @Override public void afterTestMethod(TestContext testContext) throws Exception { /* no-op */ } @@ -70,7 +66,6 @@ public abstract class AbstractTestExecutionListener implements TestExecutionList * The default implementation is empty. Can be overridden by * subclasses as necessary. */ - @Override public void afterTestClass(TestContext testContext) throws Exception { /* no-op */ } diff --git a/spring-test/src/main/java/org/springframework/test/context/support/AnnotationConfigContextLoader.java b/spring-test/src/main/java/org/springframework/test/context/support/AnnotationConfigContextLoader.java index 29a26c5e25..39e76f6e1a 100644 --- a/spring-test/src/main/java/org/springframework/test/context/support/AnnotationConfigContextLoader.java +++ b/spring-test/src/main/java/org/springframework/test/context/support/AnnotationConfigContextLoader.java @@ -74,7 +74,6 @@ public class AnnotationConfigContextLoader extends AbstractGenericContextLoader * @see #isGenerateDefaultLocations() * @see #detectDefaultConfigurationClasses(Class) */ - @Override public void processContextConfiguration(ContextConfigurationAttributes configAttributes) { if (ObjectUtils.isEmpty(configAttributes.getClasses()) && isGenerateDefaultLocations()) { Class[] defaultConfigClasses = detectDefaultConfigurationClasses(configAttributes.getDeclaringClass()); diff --git a/spring-test/src/main/java/org/springframework/test/context/support/DelegatingSmartContextLoader.java b/spring-test/src/main/java/org/springframework/test/context/support/DelegatingSmartContextLoader.java index 108c66f014..32442fe3ec 100644 --- a/spring-test/src/main/java/org/springframework/test/context/support/DelegatingSmartContextLoader.java +++ b/spring-test/src/main/java/org/springframework/test/context/support/DelegatingSmartContextLoader.java @@ -36,12 +36,10 @@ public class DelegatingSmartContextLoader extends AbstractDelegatingSmartContext private final SmartContextLoader annotationConfigLoader = new AnnotationConfigContextLoader(); - @Override protected SmartContextLoader getXmlLoader() { return this.xmlLoader; } - @Override protected SmartContextLoader getAnnotationConfigLoader() { return this.annotationConfigLoader; } diff --git a/spring-test/src/main/java/org/springframework/test/context/testng/AbstractTestNGSpringContextTests.java b/spring-test/src/main/java/org/springframework/test/context/testng/AbstractTestNGSpringContextTests.java index e8cbecc271..e7964d1eaa 100644 --- a/spring-test/src/main/java/org/springframework/test/context/testng/AbstractTestNGSpringContextTests.java +++ b/spring-test/src/main/java/org/springframework/test/context/testng/AbstractTestNGSpringContextTests.java @@ -99,7 +99,6 @@ public abstract class AbstractTestNGSpringContextTests implements IHookable, App * * @param applicationContext the applicationContext to set */ - @Override public final void setApplicationContext(ApplicationContext applicationContext) { this.applicationContext = applicationContext; } @@ -152,7 +151,6 @@ public abstract class AbstractTestNGSpringContextTests implements IHookable, App * @see org.testng.IHookable#run(org.testng.IHookCallBack, * org.testng.ITestResult) */ - @Override public void run(IHookCallBack callBack, ITestResult testResult) { callBack.runTestMethod(testResult); diff --git a/spring-test/src/main/java/org/springframework/test/context/transaction/TransactionalTestExecutionListener.java b/spring-test/src/main/java/org/springframework/test/context/transaction/TransactionalTestExecutionListener.java index eab92252fb..5535fa974f 100644 --- a/spring-test/src/main/java/org/springframework/test/context/transaction/TransactionalTestExecutionListener.java +++ b/spring-test/src/main/java/org/springframework/test/context/transaction/TransactionalTestExecutionListener.java @@ -153,7 +153,6 @@ public class TransactionalTestExecutionListener extends AbstractTestExecutionLis if (transactionAttribute != null) { transactionAttribute = new DelegatingTransactionAttribute(transactionAttribute) { - @Override public String getName() { return testMethod.getName(); } diff --git a/spring-test/src/main/java/org/springframework/test/context/web/AbstractGenericWebContextLoader.java b/spring-test/src/main/java/org/springframework/test/context/web/AbstractGenericWebContextLoader.java index 4cb8897f87..f344ae2eee 100644 --- a/spring-test/src/main/java/org/springframework/test/context/web/AbstractGenericWebContextLoader.java +++ b/spring-test/src/main/java/org/springframework/test/context/web/AbstractGenericWebContextLoader.java @@ -92,7 +92,6 @@ public abstract class AbstractGenericWebContextLoader extends AbstractContextLoa * @see org.springframework.test.context.SmartContextLoader#loadContext(MergedContextConfiguration) * @see GenericWebApplicationContext */ - @Override public final ConfigurableApplicationContext loadContext(MergedContextConfiguration mergedConfig) throws Exception { if (!(mergedConfig instanceof WebMergedContextConfiguration)) { @@ -217,7 +216,6 @@ public abstract class AbstractGenericWebContextLoader extends AbstractContextLoa * @see org.springframework.test.context.ContextLoader#loadContext(java.lang.String[]) * @throws UnsupportedOperationException */ - @Override public final ApplicationContext loadContext(String... locations) throws Exception { throw new UnsupportedOperationException( "AbstractGenericWebContextLoader does not support the loadContext(String... locations) method"); diff --git a/spring-test/src/main/java/org/springframework/test/context/web/AnnotationConfigWebContextLoader.java b/spring-test/src/main/java/org/springframework/test/context/web/AnnotationConfigWebContextLoader.java index e82a63807d..05acb46366 100644 --- a/spring-test/src/main/java/org/springframework/test/context/web/AnnotationConfigWebContextLoader.java +++ b/spring-test/src/main/java/org/springframework/test/context/web/AnnotationConfigWebContextLoader.java @@ -75,7 +75,6 @@ public class AnnotationConfigWebContextLoader extends AbstractGenericWebContextL * @see #isGenerateDefaultLocations() * @see #detectDefaultConfigurationClasses(Class) */ - @Override public void processContextConfiguration(ContextConfigurationAttributes configAttributes) { if (ObjectUtils.isEmpty(configAttributes.getClasses()) && isGenerateDefaultLocations()) { Class[] defaultConfigClasses = detectDefaultConfigurationClasses(configAttributes.getDeclaringClass()); diff --git a/spring-test/src/main/java/org/springframework/test/context/web/GenericXmlWebContextLoader.java b/spring-test/src/main/java/org/springframework/test/context/web/GenericXmlWebContextLoader.java index d172fed883..0bf295e054 100644 --- a/spring-test/src/main/java/org/springframework/test/context/web/GenericXmlWebContextLoader.java +++ b/spring-test/src/main/java/org/springframework/test/context/web/GenericXmlWebContextLoader.java @@ -41,7 +41,6 @@ public class GenericXmlWebContextLoader extends AbstractGenericWebContextLoader /** * Returns "{@code -context.xml}". */ - @Override protected String getResourceSuffix() { return "-context.xml"; } diff --git a/spring-test/src/main/java/org/springframework/test/context/web/ServletTestExecutionListener.java b/spring-test/src/main/java/org/springframework/test/context/web/ServletTestExecutionListener.java index 215b363ae2..01302bb110 100644 --- a/spring-test/src/main/java/org/springframework/test/context/web/ServletTestExecutionListener.java +++ b/spring-test/src/main/java/org/springframework/test/context/web/ServletTestExecutionListener.java @@ -69,7 +69,6 @@ public class ServletTestExecutionListener extends AbstractTestExecutionListener * @see TestExecutionListener#prepareTestInstance(TestContext) * @see #setUpRequestContextIfNecessary(TestContext) */ - @Override public void prepareTestInstance(TestContext testContext) throws Exception { setUpRequestContextIfNecessary(testContext); } @@ -81,7 +80,6 @@ public class ServletTestExecutionListener extends AbstractTestExecutionListener * @see TestExecutionListener#beforeTestMethod(TestContext) * @see #setUpRequestContextIfNecessary(TestContext) */ - @Override public void beforeTestMethod(TestContext testContext) throws Exception { setUpRequestContextIfNecessary(testContext); } @@ -93,7 +91,6 @@ public class ServletTestExecutionListener extends AbstractTestExecutionListener * * @see TestExecutionListener#afterTestMethod(TestContext) */ - @Override public void afterTestMethod(TestContext testContext) throws Exception { if (logger.isDebugEnabled()) { logger.debug(String.format("Resetting RequestContextHolder for test context %s.", testContext)); diff --git a/spring-test/src/main/java/org/springframework/test/context/web/WebDelegatingSmartContextLoader.java b/spring-test/src/main/java/org/springframework/test/context/web/WebDelegatingSmartContextLoader.java index 9dc43968aa..fa561c00a7 100644 --- a/spring-test/src/main/java/org/springframework/test/context/web/WebDelegatingSmartContextLoader.java +++ b/spring-test/src/main/java/org/springframework/test/context/web/WebDelegatingSmartContextLoader.java @@ -37,12 +37,10 @@ public class WebDelegatingSmartContextLoader extends AbstractDelegatingSmartCont private final SmartContextLoader annotationConfigLoader = new AnnotationConfigWebContextLoader(); - @Override protected SmartContextLoader getXmlLoader() { return this.xmlLoader; } - @Override protected SmartContextLoader getAnnotationConfigLoader() { return this.annotationConfigLoader; } diff --git a/spring-test/src/main/java/org/springframework/test/jpa/AbstractJpaTests.java b/spring-test/src/main/java/org/springframework/test/jpa/AbstractJpaTests.java index 4e27b65b4c..ba959d162f 100644 --- a/spring-test/src/main/java/org/springframework/test/jpa/AbstractJpaTests.java +++ b/spring-test/src/main/java/org/springframework/test/jpa/AbstractJpaTests.java @@ -330,7 +330,6 @@ public abstract class AbstractJpaTests extends AbstractAnnotationAwareTransactio this.ltw = ltw; } - @Override public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { if (bean instanceof LocalContainerEntityManagerFactoryBean) { ((LocalContainerEntityManagerFactoryBean) bean).setLoadTimeWeaver(this.ltw); @@ -351,7 +350,6 @@ public abstract class AbstractJpaTests extends AbstractAnnotationAwareTransactio this.shadowingClassLoader = shadowingClassLoader; } - @Override public void addTransformer(ClassFileTransformer transformer) { try { Method addClassFileTransformer = @@ -364,12 +362,10 @@ public abstract class AbstractJpaTests extends AbstractAnnotationAwareTransactio } } - @Override public ClassLoader getInstrumentableClassLoader() { return this.shadowingClassLoader; } - @Override public ClassLoader getThrowawayClassLoader() { // Be sure to copy the same resource overrides and same class file transformers: // We want the throwaway class loader to behave like the instrumentable class loader. diff --git a/spring-tx/src/main/java/org/springframework/dao/annotation/PersistenceExceptionTranslationAdvisor.java b/spring-tx/src/main/java/org/springframework/dao/annotation/PersistenceExceptionTranslationAdvisor.java index 4aaab8b137..2b8358d678 100644 --- a/spring-tx/src/main/java/org/springframework/dao/annotation/PersistenceExceptionTranslationAdvisor.java +++ b/spring-tx/src/main/java/org/springframework/dao/annotation/PersistenceExceptionTranslationAdvisor.java @@ -73,12 +73,10 @@ public class PersistenceExceptionTranslationAdvisor extends AbstractPointcutAdvi } - @Override public Advice getAdvice() { return this.advice; } - @Override public Pointcut getPointcut() { return this.pointcut; } diff --git a/spring-tx/src/main/java/org/springframework/dao/annotation/PersistenceExceptionTranslationPostProcessor.java b/spring-tx/src/main/java/org/springframework/dao/annotation/PersistenceExceptionTranslationPostProcessor.java index b8588a878b..e60638b20f 100644 --- a/spring-tx/src/main/java/org/springframework/dao/annotation/PersistenceExceptionTranslationPostProcessor.java +++ b/spring-tx/src/main/java/org/springframework/dao/annotation/PersistenceExceptionTranslationPostProcessor.java @@ -77,7 +77,6 @@ public class PersistenceExceptionTranslationPostProcessor extends AbstractAdvisi this.repositoryAnnotationType = repositoryAnnotationType; } - @Override public void setBeanFactory(BeanFactory beanFactory) { if (!(beanFactory instanceof ListableBeanFactory)) { throw new IllegalArgumentException( diff --git a/spring-tx/src/main/java/org/springframework/dao/support/ChainedPersistenceExceptionTranslator.java b/spring-tx/src/main/java/org/springframework/dao/support/ChainedPersistenceExceptionTranslator.java index d86c5aeb11..bdaddb8c55 100644 --- a/spring-tx/src/main/java/org/springframework/dao/support/ChainedPersistenceExceptionTranslator.java +++ b/spring-tx/src/main/java/org/springframework/dao/support/ChainedPersistenceExceptionTranslator.java @@ -53,7 +53,6 @@ public class ChainedPersistenceExceptionTranslator implements PersistenceExcepti } - @Override public DataAccessException translateExceptionIfPossible(RuntimeException ex) { for (PersistenceExceptionTranslator pet : this.delegates) { DataAccessException translatedDex = pet.translateExceptionIfPossible(ex); diff --git a/spring-tx/src/main/java/org/springframework/dao/support/DaoSupport.java b/spring-tx/src/main/java/org/springframework/dao/support/DaoSupport.java index 91e29d1113..4b5f6865c7 100644 --- a/spring-tx/src/main/java/org/springframework/dao/support/DaoSupport.java +++ b/spring-tx/src/main/java/org/springframework/dao/support/DaoSupport.java @@ -39,7 +39,6 @@ public abstract class DaoSupport implements InitializingBean { protected final Log logger = LogFactory.getLog(getClass()); - @Override public final void afterPropertiesSet() throws IllegalArgumentException, BeanInitializationException { // Let abstract subclasses check their configuration. checkDaoConfig(); diff --git a/spring-tx/src/main/java/org/springframework/dao/support/PersistenceExceptionTranslationInterceptor.java b/spring-tx/src/main/java/org/springframework/dao/support/PersistenceExceptionTranslationInterceptor.java index b486dccdfa..9cf7432c43 100644 --- a/spring-tx/src/main/java/org/springframework/dao/support/PersistenceExceptionTranslationInterceptor.java +++ b/spring-tx/src/main/java/org/springframework/dao/support/PersistenceExceptionTranslationInterceptor.java @@ -107,7 +107,6 @@ public class PersistenceExceptionTranslationInterceptor this.alwaysTranslate = alwaysTranslate; } - @Override public void setBeanFactory(BeanFactory beanFactory) throws BeansException { if (this.persistenceExceptionTranslator == null) { // No explicit exception translator specified - perform autodetection. @@ -120,7 +119,6 @@ public class PersistenceExceptionTranslationInterceptor } } - @Override public void afterPropertiesSet() { if (this.persistenceExceptionTranslator == null) { throw new IllegalArgumentException("Property 'persistenceExceptionTranslator' is required"); @@ -152,7 +150,6 @@ public class PersistenceExceptionTranslationInterceptor } - @Override public Object invoke(MethodInvocation mi) throws Throwable { try { return mi.proceed(); diff --git a/spring-tx/src/main/java/org/springframework/jca/cci/connection/CciLocalTransactionManager.java b/spring-tx/src/main/java/org/springframework/jca/cci/connection/CciLocalTransactionManager.java index 93404bd98e..aa7d38943d 100644 --- a/spring-tx/src/main/java/org/springframework/jca/cci/connection/CciLocalTransactionManager.java +++ b/spring-tx/src/main/java/org/springframework/jca/cci/connection/CciLocalTransactionManager.java @@ -109,7 +109,6 @@ public class CciLocalTransactionManager extends AbstractPlatformTransactionManag return this.connectionFactory; } - @Override public void afterPropertiesSet() { if (getConnectionFactory() == null) { throw new IllegalArgumentException("Property 'connectionFactory' is required"); @@ -117,7 +116,6 @@ public class CciLocalTransactionManager extends AbstractPlatformTransactionManag } - @Override public Object getResourceFactory() { return getConnectionFactory(); } diff --git a/spring-tx/src/main/java/org/springframework/jca/cci/connection/DelegatingConnectionFactory.java b/spring-tx/src/main/java/org/springframework/jca/cci/connection/DelegatingConnectionFactory.java index 5bc218d461..f01ac83100 100644 --- a/spring-tx/src/main/java/org/springframework/jca/cci/connection/DelegatingConnectionFactory.java +++ b/spring-tx/src/main/java/org/springframework/jca/cci/connection/DelegatingConnectionFactory.java @@ -60,7 +60,6 @@ public class DelegatingConnectionFactory implements ConnectionFactory, Initializ } - @Override public void afterPropertiesSet() { if (getTargetConnectionFactory() == null) { throw new IllegalArgumentException("Property 'targetConnectionFactory' is required"); @@ -68,32 +67,26 @@ public class DelegatingConnectionFactory implements ConnectionFactory, Initializ } - @Override public Connection getConnection() throws ResourceException { return getTargetConnectionFactory().getConnection(); } - @Override public Connection getConnection(ConnectionSpec connectionSpec) throws ResourceException { return getTargetConnectionFactory().getConnection(connectionSpec); } - @Override public RecordFactory getRecordFactory() throws ResourceException { return getTargetConnectionFactory().getRecordFactory(); } - @Override public ResourceAdapterMetaData getMetaData() throws ResourceException { return getTargetConnectionFactory().getMetaData(); } - @Override public Reference getReference() throws NamingException { return getTargetConnectionFactory().getReference(); } - @Override public void setReference(Reference reference) { getTargetConnectionFactory().setReference(reference); } diff --git a/spring-tx/src/main/java/org/springframework/jca/cci/connection/NotSupportedRecordFactory.java b/spring-tx/src/main/java/org/springframework/jca/cci/connection/NotSupportedRecordFactory.java index ed843edeed..bf1808db81 100644 --- a/spring-tx/src/main/java/org/springframework/jca/cci/connection/NotSupportedRecordFactory.java +++ b/spring-tx/src/main/java/org/springframework/jca/cci/connection/NotSupportedRecordFactory.java @@ -41,12 +41,10 @@ import javax.resource.cci.RecordFactory; */ public class NotSupportedRecordFactory implements RecordFactory { - @Override public MappedRecord createMappedRecord(String name) throws ResourceException { throw new NotSupportedException("The RecordFactory facility is not supported by the connector"); } - @Override public IndexedRecord createIndexedRecord(String name) throws ResourceException { throw new NotSupportedException("The RecordFactory facility is not supported by the connector"); } diff --git a/spring-tx/src/main/java/org/springframework/jca/cci/connection/SingleConnectionFactory.java b/spring-tx/src/main/java/org/springframework/jca/cci/connection/SingleConnectionFactory.java index 40a50b80dd..fe391c8805 100644 --- a/spring-tx/src/main/java/org/springframework/jca/cci/connection/SingleConnectionFactory.java +++ b/spring-tx/src/main/java/org/springframework/jca/cci/connection/SingleConnectionFactory.java @@ -129,7 +129,6 @@ public class SingleConnectionFactory extends DelegatingConnectionFactory impleme *

As this bean implements DisposableBean, a bean factory will * automatically invoke this on destruction of its cached singletons. */ - @Override public void destroy() { resetConnection(); } @@ -229,7 +228,6 @@ public class SingleConnectionFactory extends DelegatingConnectionFactory impleme this.target = target; } - @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { if (method.getName().equals("equals")) { // Only consider equal when proxies are identical. diff --git a/spring-tx/src/main/java/org/springframework/jca/cci/connection/TransactionAwareConnectionFactoryProxy.java b/spring-tx/src/main/java/org/springframework/jca/cci/connection/TransactionAwareConnectionFactoryProxy.java index 7fd30b3a9b..f5b2b5d0ec 100644 --- a/spring-tx/src/main/java/org/springframework/jca/cci/connection/TransactionAwareConnectionFactoryProxy.java +++ b/spring-tx/src/main/java/org/springframework/jca/cci/connection/TransactionAwareConnectionFactoryProxy.java @@ -128,7 +128,6 @@ public class TransactionAwareConnectionFactoryProxy extends DelegatingConnection this.connectionFactory = cf; } - @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { // Invocation on Connection interface coming in... diff --git a/spring-tx/src/main/java/org/springframework/jca/cci/core/CciTemplate.java b/spring-tx/src/main/java/org/springframework/jca/cci/core/CciTemplate.java index 4bd46036ca..d55909ebe0 100644 --- a/spring-tx/src/main/java/org/springframework/jca/cci/core/CciTemplate.java +++ b/spring-tx/src/main/java/org/springframework/jca/cci/core/CciTemplate.java @@ -187,7 +187,6 @@ public class CciTemplate implements CciOperations { } - @Override public T execute(ConnectionCallback action) throws DataAccessException { Assert.notNull(action, "Callback object must not be null"); Connection con = ConnectionFactoryUtils.getConnection(getConnectionFactory(), getConnectionSpec()); @@ -208,11 +207,9 @@ public class CciTemplate implements CciOperations { } } - @Override public T execute(final InteractionCallback action) throws DataAccessException { Assert.notNull(action, "Callback object must not be null"); return execute(new ConnectionCallback() { - @Override public T doInConnection(Connection connection, ConnectionFactory connectionFactory) throws ResourceException, SQLException, DataAccessException { Interaction interaction = connection.createInteraction(); @@ -226,29 +223,24 @@ public class CciTemplate implements CciOperations { }); } - @Override public Record execute(InteractionSpec spec, Record inputRecord) throws DataAccessException { return doExecute(spec, inputRecord, null, new SimpleRecordExtractor()); } - @Override public void execute(InteractionSpec spec, Record inputRecord, Record outputRecord) throws DataAccessException { doExecute(spec, inputRecord, outputRecord, null); } - @Override public Record execute(InteractionSpec spec, RecordCreator inputCreator) throws DataAccessException { return doExecute(spec, createRecord(inputCreator), null, new SimpleRecordExtractor()); } - @Override public T execute(InteractionSpec spec, Record inputRecord, RecordExtractor outputExtractor) throws DataAccessException { return doExecute(spec, inputRecord, null, outputExtractor); } - @Override public T execute(InteractionSpec spec, RecordCreator inputCreator, RecordExtractor outputExtractor) throws DataAccessException { @@ -271,7 +263,6 @@ public class CciTemplate implements CciOperations { final RecordExtractor outputExtractor) throws DataAccessException { return execute(new InteractionCallback() { - @Override public T doInInteraction(Interaction interaction, ConnectionFactory connectionFactory) throws ResourceException, SQLException, DataAccessException { Record outputRecordToUse = outputRecord; @@ -430,7 +421,6 @@ public class CciTemplate implements CciOperations { private static class SimpleRecordExtractor implements RecordExtractor { - @Override public Record extractData(Record record) { return record; } diff --git a/spring-tx/src/main/java/org/springframework/jca/cci/core/support/CommAreaRecord.java b/spring-tx/src/main/java/org/springframework/jca/cci/core/support/CommAreaRecord.java index b9989c945a..982b43064b 100644 --- a/spring-tx/src/main/java/org/springframework/jca/cci/core/support/CommAreaRecord.java +++ b/spring-tx/src/main/java/org/springframework/jca/cci/core/support/CommAreaRecord.java @@ -59,33 +59,27 @@ public class CommAreaRecord implements Record, Streamable { } - @Override public void setRecordName(String recordName) { this.recordName=recordName; } - @Override public String getRecordName() { return recordName; } - @Override public void setRecordShortDescription(String recordShortDescription) { this.recordShortDescription=recordShortDescription; } - @Override public String getRecordShortDescription() { return recordShortDescription; } - @Override public void read(InputStream in) throws IOException { this.bytes = FileCopyUtils.copyToByteArray(in); } - @Override public void write(OutputStream out) throws IOException { out.write(this.bytes); out.flush(); diff --git a/spring-tx/src/main/java/org/springframework/jca/cci/object/EisOperation.java b/spring-tx/src/main/java/org/springframework/jca/cci/object/EisOperation.java index 19bd6dda70..aa341f8e15 100644 --- a/spring-tx/src/main/java/org/springframework/jca/cci/object/EisOperation.java +++ b/spring-tx/src/main/java/org/springframework/jca/cci/object/EisOperation.java @@ -82,7 +82,6 @@ public abstract class EisOperation implements InitializingBean { } - @Override public void afterPropertiesSet() { this.cciTemplate.afterPropertiesSet(); diff --git a/spring-tx/src/main/java/org/springframework/jca/cci/object/MappingRecordOperation.java b/spring-tx/src/main/java/org/springframework/jca/cci/object/MappingRecordOperation.java index c792c2af1f..413a034ae7 100644 --- a/spring-tx/src/main/java/org/springframework/jca/cci/object/MappingRecordOperation.java +++ b/spring-tx/src/main/java/org/springframework/jca/cci/object/MappingRecordOperation.java @@ -129,7 +129,6 @@ public abstract class MappingRecordOperation extends EisOperation { this.inputObject = inObject; } - @Override public Record createRecord(RecordFactory recordFactory) throws ResourceException, DataAccessException { return createInputRecord(recordFactory, this.inputObject); } @@ -142,7 +141,6 @@ public abstract class MappingRecordOperation extends EisOperation { */ protected class RecordExtractorImpl implements RecordExtractor { - @Override public Object extractData(Record record) throws ResourceException, SQLException, DataAccessException { return extractOutputData(record); } diff --git a/spring-tx/src/main/java/org/springframework/jca/context/BootstrapContextAwareProcessor.java b/spring-tx/src/main/java/org/springframework/jca/context/BootstrapContextAwareProcessor.java index fbac4159dd..7e2bedff0f 100644 --- a/spring-tx/src/main/java/org/springframework/jca/context/BootstrapContextAwareProcessor.java +++ b/spring-tx/src/main/java/org/springframework/jca/context/BootstrapContextAwareProcessor.java @@ -46,7 +46,6 @@ class BootstrapContextAwareProcessor implements BeanPostProcessor { } - @Override public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { if (this.bootstrapContext != null && bean instanceof BootstrapContextAware) { ((BootstrapContextAware) bean).setBootstrapContext(this.bootstrapContext); @@ -54,7 +53,6 @@ class BootstrapContextAwareProcessor implements BeanPostProcessor { return bean; } - @Override public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { return bean; } diff --git a/spring-tx/src/main/java/org/springframework/jca/context/ResourceAdapterApplicationContext.java b/spring-tx/src/main/java/org/springframework/jca/context/ResourceAdapterApplicationContext.java index b822fc5fb6..44f38674b8 100644 --- a/spring-tx/src/main/java/org/springframework/jca/context/ResourceAdapterApplicationContext.java +++ b/spring-tx/src/main/java/org/springframework/jca/context/ResourceAdapterApplicationContext.java @@ -60,7 +60,6 @@ public class ResourceAdapterApplicationContext extends GenericApplicationContext // JCA WorkManager resolved lazily - may not be available. beanFactory.registerResolvableDependency(WorkManager.class, new ObjectFactory() { - @Override public WorkManager getObject() { return bootstrapContext.getWorkManager(); } diff --git a/spring-tx/src/main/java/org/springframework/jca/context/SpringContextResourceAdapter.java b/spring-tx/src/main/java/org/springframework/jca/context/SpringContextResourceAdapter.java index 82d317b4ae..25bac95668 100644 --- a/spring-tx/src/main/java/org/springframework/jca/context/SpringContextResourceAdapter.java +++ b/spring-tx/src/main/java/org/springframework/jca/context/SpringContextResourceAdapter.java @@ -156,7 +156,6 @@ public class SpringContextResourceAdapter implements ResourceAdapter { * This implementation loads a Spring ApplicationContext through the * {@link #createApplicationContext} template method. */ - @Override public void start(BootstrapContext bootstrapContext) throws ResourceAdapterInternalException { if (logger.isInfoEnabled()) { logger.info("Starting SpringContextResourceAdapter with BootstrapContext: " + bootstrapContext); @@ -201,7 +200,6 @@ public class SpringContextResourceAdapter implements ResourceAdapter { /** * This implementation closes the Spring ApplicationContext. */ - @Override public void stop() { logger.info("Stopping SpringContextResourceAdapter"); this.applicationContext.close(); @@ -211,7 +209,6 @@ public class SpringContextResourceAdapter implements ResourceAdapter { /** * This implementation always throws a NotSupportedException. */ - @Override public void endpointActivation(MessageEndpointFactory messageEndpointFactory, ActivationSpec activationSpec) throws ResourceException { @@ -221,14 +218,12 @@ public class SpringContextResourceAdapter implements ResourceAdapter { /** * This implementation does nothing. */ - @Override public void endpointDeactivation(MessageEndpointFactory messageEndpointFactory, ActivationSpec activationSpec) { } /** * This implementation always returns {@code null}. */ - @Override public XAResource[] getXAResources(ActivationSpec[] activationSpecs) throws ResourceException { return null; } diff --git a/spring-tx/src/main/java/org/springframework/jca/endpoint/AbstractMessageEndpointFactory.java b/spring-tx/src/main/java/org/springframework/jca/endpoint/AbstractMessageEndpointFactory.java index 208a1f85bf..01f27f23ff 100644 --- a/spring-tx/src/main/java/org/springframework/jca/endpoint/AbstractMessageEndpointFactory.java +++ b/spring-tx/src/main/java/org/springframework/jca/endpoint/AbstractMessageEndpointFactory.java @@ -123,7 +123,6 @@ public abstract class AbstractMessageEndpointFactory implements MessageEndpointF * @see #setTransactionManager * @see #setTransactionFactory */ - @Override public boolean isDeliveryTransacted(Method method) throws NoSuchMethodException { return (this.transactionFactory != null); } @@ -133,7 +132,6 @@ public abstract class AbstractMessageEndpointFactory implements MessageEndpointF *

This implementation delegates to {@link #createEndpointInternal()}, * initializing the endpoint's XAResource before the endpoint gets invoked. */ - @Override public MessageEndpoint createEndpoint(XAResource xaResource) throws UnavailableException { AbstractMessageEndpoint endpoint = createEndpointInternal(); endpoint.initXAResource(xaResource); @@ -191,7 +189,6 @@ public abstract class AbstractMessageEndpointFactory implements MessageEndpointF * concrete endpoint method should call {@code beforeDelivery} and its * sibling {@link #afterDelivery()} explicitly, as part of its own processing. */ - @Override public void beforeDelivery(Method method) throws ResourceException { this.beforeDeliveryCalled = true; try { @@ -239,7 +236,6 @@ public abstract class AbstractMessageEndpointFactory implements MessageEndpointF * to call this method after invoking the concrete endpoint. See the * explanation in {@link #beforeDelivery}'s javadoc. */ - @Override public void afterDelivery() throws ResourceException { this.beforeDeliveryCalled = false; Thread.currentThread().setContextClassLoader(this.previousContextClassLoader); @@ -252,7 +248,6 @@ public abstract class AbstractMessageEndpointFactory implements MessageEndpointF } } - @Override public void release() { try { this.transactionDelegate.setRollbackOnly(); diff --git a/spring-tx/src/main/java/org/springframework/jca/endpoint/GenericMessageEndpointFactory.java b/spring-tx/src/main/java/org/springframework/jca/endpoint/GenericMessageEndpointFactory.java index 575e3e6e8c..fac5eba990 100644 --- a/spring-tx/src/main/java/org/springframework/jca/endpoint/GenericMessageEndpointFactory.java +++ b/spring-tx/src/main/java/org/springframework/jca/endpoint/GenericMessageEndpointFactory.java @@ -94,7 +94,6 @@ public class GenericMessageEndpointFactory extends AbstractMessageEndpointFactor */ private class GenericMessageEndpoint extends AbstractMessageEndpoint implements MethodInterceptor { - @Override public Object invoke(MethodInvocation methodInvocation) throws Throwable { boolean applyDeliveryCalls = !hasBeforeDeliveryBeenCalled(); if (applyDeliveryCalls) { diff --git a/spring-tx/src/main/java/org/springframework/jca/endpoint/GenericMessageEndpointManager.java b/spring-tx/src/main/java/org/springframework/jca/endpoint/GenericMessageEndpointManager.java index c05c613253..2f256adafe 100644 --- a/spring-tx/src/main/java/org/springframework/jca/endpoint/GenericMessageEndpointManager.java +++ b/spring-tx/src/main/java/org/springframework/jca/endpoint/GenericMessageEndpointManager.java @@ -224,7 +224,6 @@ public class GenericMessageEndpointManager implements SmartLifecycle, Initializi * Return the value for the 'autoStartup' property. If "true", this * endpoint manager will start upon a ContextRefreshedEvent. */ - @Override public boolean isAutoStartup() { return this.autoStartup; } @@ -243,7 +242,6 @@ public class GenericMessageEndpointManager implements SmartLifecycle, Initializi /** * Return the phase in which this endpoint manager will be started and stopped. */ - @Override public int getPhase() { return this.phase; } @@ -252,7 +250,6 @@ public class GenericMessageEndpointManager implements SmartLifecycle, Initializi * Prepares the message endpoint, and automatically activates it * if the "autoStartup" flag is set to "true". */ - @Override public void afterPropertiesSet() throws ResourceException { if (getResourceAdapter() == null) { throw new IllegalArgumentException("Property 'resourceAdapter' is required"); @@ -277,7 +274,6 @@ public class GenericMessageEndpointManager implements SmartLifecycle, Initializi /** * Activates the configured message endpoint. */ - @Override public void start() { synchronized (this.lifecycleMonitor) { if (!this.running) { @@ -295,7 +291,6 @@ public class GenericMessageEndpointManager implements SmartLifecycle, Initializi /** * Deactivates the configured message endpoint. */ - @Override public void stop() { synchronized (this.lifecycleMonitor) { if (this.running) { @@ -305,7 +300,6 @@ public class GenericMessageEndpointManager implements SmartLifecycle, Initializi } } - @Override public void stop(Runnable callback) { synchronized (this.lifecycleMonitor) { this.stop(); @@ -316,7 +310,6 @@ public class GenericMessageEndpointManager implements SmartLifecycle, Initializi /** * Return whether the configured message endpoint is currently active. */ - @Override public boolean isRunning() { synchronized (this.lifecycleMonitor) { return this.running; @@ -326,7 +319,6 @@ public class GenericMessageEndpointManager implements SmartLifecycle, Initializi /** * Deactivates the message endpoint, preparing it for shutdown. */ - @Override public void destroy() { stop(); } diff --git a/spring-tx/src/main/java/org/springframework/jca/support/LocalConnectionFactoryBean.java b/spring-tx/src/main/java/org/springframework/jca/support/LocalConnectionFactoryBean.java index 605bbebb8d..e02deb14a6 100644 --- a/spring-tx/src/main/java/org/springframework/jca/support/LocalConnectionFactoryBean.java +++ b/spring-tx/src/main/java/org/springframework/jca/support/LocalConnectionFactoryBean.java @@ -109,7 +109,6 @@ public class LocalConnectionFactoryBean implements FactoryBean, Initiali this.connectionManager = connectionManager; } - @Override public void afterPropertiesSet() throws ResourceException { if (this.managedConnectionFactory == null) { throw new IllegalArgumentException("Property 'managedConnectionFactory' is required"); @@ -123,17 +122,14 @@ public class LocalConnectionFactoryBean implements FactoryBean, Initiali } - @Override public Object getObject() { return this.connectionFactory; } - @Override public Class getObjectType() { return (this.connectionFactory != null ? this.connectionFactory.getClass() : null); } - @Override public boolean isSingleton() { return true; } diff --git a/spring-tx/src/main/java/org/springframework/jca/support/ResourceAdapterFactoryBean.java b/spring-tx/src/main/java/org/springframework/jca/support/ResourceAdapterFactoryBean.java index 8d3fd3d236..0bde9b263b 100644 --- a/spring-tx/src/main/java/org/springframework/jca/support/ResourceAdapterFactoryBean.java +++ b/spring-tx/src/main/java/org/springframework/jca/support/ResourceAdapterFactoryBean.java @@ -113,7 +113,6 @@ public class ResourceAdapterFactoryBean implements FactoryBean, * Builds the BootstrapContext and starts the ResourceAdapter with it. * @see javax.resource.spi.ResourceAdapter#start(javax.resource.spi.BootstrapContext) */ - @Override public void afterPropertiesSet() throws ResourceException { if (this.resourceAdapter == null) { throw new IllegalArgumentException("'resourceAdapter' or 'resourceAdapterClass' is required"); @@ -125,17 +124,14 @@ public class ResourceAdapterFactoryBean implements FactoryBean, } - @Override public ResourceAdapter getObject() { return this.resourceAdapter; } - @Override public Class getObjectType() { return (this.resourceAdapter != null ? this.resourceAdapter.getClass() : ResourceAdapter.class); } - @Override public boolean isSingleton() { return true; } @@ -145,7 +141,6 @@ public class ResourceAdapterFactoryBean implements FactoryBean, * Stops the ResourceAdapter. * @see javax.resource.spi.ResourceAdapter#stop() */ - @Override public void destroy() { this.resourceAdapter.stop(); } diff --git a/spring-tx/src/main/java/org/springframework/jca/support/SimpleBootstrapContext.java b/spring-tx/src/main/java/org/springframework/jca/support/SimpleBootstrapContext.java index be54bddd5c..d26fea7332 100644 --- a/spring-tx/src/main/java/org/springframework/jca/support/SimpleBootstrapContext.java +++ b/spring-tx/src/main/java/org/springframework/jca/support/SimpleBootstrapContext.java @@ -62,7 +62,6 @@ public class SimpleBootstrapContext implements BootstrapContext { } - @Override public WorkManager getWorkManager() { if (this.workManager == null) { throw new IllegalStateException("No WorkManager available"); @@ -70,12 +69,10 @@ public class SimpleBootstrapContext implements BootstrapContext { return this.workManager; } - @Override public XATerminator getXATerminator() { return this.xaTerminator; } - @Override public Timer createTimer() throws UnavailableException { return new Timer(); } diff --git a/spring-tx/src/main/java/org/springframework/jca/work/DelegatingWork.java b/spring-tx/src/main/java/org/springframework/jca/work/DelegatingWork.java index f0320d9ffe..3ce2716886 100644 --- a/spring-tx/src/main/java/org/springframework/jca/work/DelegatingWork.java +++ b/spring-tx/src/main/java/org/springframework/jca/work/DelegatingWork.java @@ -53,7 +53,6 @@ public class DelegatingWork implements Work { /** * Delegates execution to the underlying Runnable. */ - @Override public void run() { this.delegate.run(); } @@ -62,7 +61,6 @@ public class DelegatingWork implements Work { * This implementation is empty, since we expect the Runnable * to terminate based on some specific shutdown signal. */ - @Override public void release() { } diff --git a/spring-tx/src/main/java/org/springframework/jca/work/SimpleTaskWorkManager.java b/spring-tx/src/main/java/org/springframework/jca/work/SimpleTaskWorkManager.java index 96645a6e24..4a2daf4d02 100644 --- a/spring-tx/src/main/java/org/springframework/jca/work/SimpleTaskWorkManager.java +++ b/spring-tx/src/main/java/org/springframework/jca/work/SimpleTaskWorkManager.java @@ -88,12 +88,10 @@ public class SimpleTaskWorkManager implements WorkManager { } - @Override public void doWork(Work work) throws WorkException { doWork(work, WorkManager.INDEFINITE, null, null); } - @Override public void doWork(Work work, long startTimeout, ExecutionContext executionContext, WorkListener workListener) throws WorkException { @@ -101,12 +99,10 @@ public class SimpleTaskWorkManager implements WorkManager { executeWork(this.syncTaskExecutor, work, startTimeout, false, executionContext, workListener); } - @Override public long startWork(Work work) throws WorkException { return startWork(work, WorkManager.INDEFINITE, null, null); } - @Override public long startWork(Work work, long startTimeout, ExecutionContext executionContext, WorkListener workListener) throws WorkException { @@ -114,12 +110,10 @@ public class SimpleTaskWorkManager implements WorkManager { return executeWork(this.asyncTaskExecutor, work, startTimeout, true, executionContext, workListener); } - @Override public void scheduleWork(Work work) throws WorkException { scheduleWork(work, WorkManager.INDEFINITE, null, null); } - @Override public void scheduleWork(Work work, long startTimeout, ExecutionContext executionContext, WorkListener workListener) throws WorkException { @@ -225,7 +219,6 @@ public class SimpleTaskWorkManager implements WorkManager { this.acceptOnExecution = acceptOnExecution; } - @Override public void run() { if (this.acceptOnExecution) { this.workListener.workAccepted(new WorkEvent(this, WorkEvent.WORK_ACCEPTED, work, null)); @@ -251,7 +244,6 @@ public class SimpleTaskWorkManager implements WorkManager { this.workListener.workCompleted(new WorkEvent(this, WorkEvent.WORK_COMPLETED, this.work, null)); } - @Override public void release() { this.work.release(); } diff --git a/spring-tx/src/main/java/org/springframework/jca/work/WorkManagerTaskExecutor.java b/spring-tx/src/main/java/org/springframework/jca/work/WorkManagerTaskExecutor.java index de8f4da2cf..c6f4cb4c4e 100644 --- a/spring-tx/src/main/java/org/springframework/jca/work/WorkManagerTaskExecutor.java +++ b/spring-tx/src/main/java/org/springframework/jca/work/WorkManagerTaskExecutor.java @@ -122,7 +122,6 @@ public class WorkManagerTaskExecutor extends JndiLocatorSupport * Specify the JCA BootstrapContext that contains the * WorkManager to delegate to. */ - @Override public void setBootstrapContext(BootstrapContext bootstrapContext) { Assert.notNull(bootstrapContext, "BootstrapContext must not be null"); this.workManager = bootstrapContext.getWorkManager(); @@ -161,7 +160,6 @@ public class WorkManagerTaskExecutor extends JndiLocatorSupport this.workListener = workListener; } - @Override public void afterPropertiesSet() throws NamingException { if (this.workManager == null) { if (this.workManagerName != null) { @@ -188,12 +186,10 @@ public class WorkManagerTaskExecutor extends JndiLocatorSupport // Implementation of the Spring SchedulingTaskExecutor interface //------------------------------------------------------------------------- - @Override public void execute(Runnable task) { execute(task, TIMEOUT_INDEFINITE); } - @Override public void execute(Runnable task, long startTimeout) { Assert.state(this.workManager != null, "No WorkManager specified"); Work work = new DelegatingWork(task); @@ -236,14 +232,12 @@ public class WorkManagerTaskExecutor extends JndiLocatorSupport } } - @Override public Future submit(Runnable task) { FutureTask future = new FutureTask(task, null); execute(future, TIMEOUT_INDEFINITE); return future; } - @Override public Future submit(Callable task) { FutureTask future = new FutureTask(task); execute(future, TIMEOUT_INDEFINITE); @@ -253,7 +247,6 @@ public class WorkManagerTaskExecutor extends JndiLocatorSupport /** * This task executor prefers short-lived work units. */ - @Override public boolean prefersShortLivedTasks() { return true; } @@ -263,36 +256,30 @@ public class WorkManagerTaskExecutor extends JndiLocatorSupport // Implementation of the JCA WorkManager interface //------------------------------------------------------------------------- - @Override public void doWork(Work work) throws WorkException { this.workManager.doWork(work); } - @Override public void doWork(Work work, long delay, ExecutionContext executionContext, WorkListener workListener) throws WorkException { this.workManager.doWork(work, delay, executionContext, workListener); } - @Override public long startWork(Work work) throws WorkException { return this.workManager.startWork(work); } - @Override public long startWork(Work work, long delay, ExecutionContext executionContext, WorkListener workListener) throws WorkException { return this.workManager.startWork(work, delay, executionContext, workListener); } - @Override public void scheduleWork(Work work) throws WorkException { this.workManager.scheduleWork(work); } - @Override public void scheduleWork(Work work, long delay, ExecutionContext executionContext, WorkListener workListener) throws WorkException { diff --git a/spring-tx/src/main/java/org/springframework/transaction/annotation/AbstractTransactionManagementConfiguration.java b/spring-tx/src/main/java/org/springframework/transaction/annotation/AbstractTransactionManagementConfiguration.java index 4aba8ee705..d5ea077155 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/annotation/AbstractTransactionManagementConfiguration.java +++ b/spring-tx/src/main/java/org/springframework/transaction/annotation/AbstractTransactionManagementConfiguration.java @@ -40,7 +40,6 @@ public abstract class AbstractTransactionManagementConfiguration implements Impo protected AnnotationAttributes enableTx; protected PlatformTransactionManager txManager; - @Override public void setImportMetadata(AnnotationMetadata importMetadata) { this.enableTx = AnnotationAttributes.fromMap( importMetadata.getAnnotationAttributes(EnableTransactionManagement.class.getName(), false)); diff --git a/spring-tx/src/main/java/org/springframework/transaction/annotation/Ejb3TransactionAnnotationParser.java b/spring-tx/src/main/java/org/springframework/transaction/annotation/Ejb3TransactionAnnotationParser.java index c7e20cf1dc..f7122b3742 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/annotation/Ejb3TransactionAnnotationParser.java +++ b/spring-tx/src/main/java/org/springframework/transaction/annotation/Ejb3TransactionAnnotationParser.java @@ -34,7 +34,6 @@ import org.springframework.transaction.interceptor.TransactionAttribute; @SuppressWarnings("serial") public class Ejb3TransactionAnnotationParser implements TransactionAnnotationParser, Serializable { - @Override public TransactionAttribute parseTransactionAnnotation(AnnotatedElement ae) { javax.ejb.TransactionAttribute ann = ae.getAnnotation(javax.ejb.TransactionAttribute.class); if (ann != null) { diff --git a/spring-tx/src/main/java/org/springframework/transaction/annotation/SpringTransactionAnnotationParser.java b/spring-tx/src/main/java/org/springframework/transaction/annotation/SpringTransactionAnnotationParser.java index 514548d9ce..d9024f1a1f 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/annotation/SpringTransactionAnnotationParser.java +++ b/spring-tx/src/main/java/org/springframework/transaction/annotation/SpringTransactionAnnotationParser.java @@ -35,7 +35,6 @@ import org.springframework.transaction.interceptor.TransactionAttribute; @SuppressWarnings("serial") public class SpringTransactionAnnotationParser implements TransactionAnnotationParser, Serializable { - @Override public TransactionAttribute parseTransactionAnnotation(AnnotatedElement ae) { Transactional ann = AnnotationUtils.getAnnotation(ae, Transactional.class); if (ann != null) { diff --git a/spring-tx/src/main/java/org/springframework/transaction/config/AnnotationDrivenBeanDefinitionParser.java b/spring-tx/src/main/java/org/springframework/transaction/config/AnnotationDrivenBeanDefinitionParser.java index 6821c78e6b..07bea12ee5 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/config/AnnotationDrivenBeanDefinitionParser.java +++ b/spring-tx/src/main/java/org/springframework/transaction/config/AnnotationDrivenBeanDefinitionParser.java @@ -73,7 +73,6 @@ class AnnotationDrivenBeanDefinitionParser implements BeanDefinitionParser { * {@link AopNamespaceUtils#registerAutoProxyCreatorIfNecessary register an AutoProxyCreator} * with the container as necessary. */ - @Override public BeanDefinition parse(Element element, ParserContext parserContext) { String mode = element.getAttribute("mode"); if ("aspectj".equals(mode)) { diff --git a/spring-tx/src/main/java/org/springframework/transaction/config/TxNamespaceHandler.java b/spring-tx/src/main/java/org/springframework/transaction/config/TxNamespaceHandler.java index 228ffdbc90..28736d0177 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/config/TxNamespaceHandler.java +++ b/spring-tx/src/main/java/org/springframework/transaction/config/TxNamespaceHandler.java @@ -50,7 +50,6 @@ public class TxNamespaceHandler extends NamespaceHandlerSupport { } - @Override public void init() { registerBeanDefinitionParser("advice", new TxAdviceBeanDefinitionParser()); registerBeanDefinitionParser("annotation-driven", new AnnotationDrivenBeanDefinitionParser()); diff --git a/spring-tx/src/main/java/org/springframework/transaction/interceptor/AbstractFallbackTransactionAttributeSource.java b/spring-tx/src/main/java/org/springframework/transaction/interceptor/AbstractFallbackTransactionAttributeSource.java index a1dcc33b39..a8762beeb5 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/interceptor/AbstractFallbackTransactionAttributeSource.java +++ b/spring-tx/src/main/java/org/springframework/transaction/interceptor/AbstractFallbackTransactionAttributeSource.java @@ -80,7 +80,6 @@ public abstract class AbstractFallbackTransactionAttributeSource implements Tran * @return TransactionAttribute for this method, or {@code null} if the method * is not transactional */ - @Override public TransactionAttribute getTransactionAttribute(Method method, Class targetClass) { // First, see if we have a cached value. Object cacheKey = getCacheKey(method, targetClass); diff --git a/spring-tx/src/main/java/org/springframework/transaction/interceptor/BeanFactoryTransactionAttributeSourceAdvisor.java b/spring-tx/src/main/java/org/springframework/transaction/interceptor/BeanFactoryTransactionAttributeSourceAdvisor.java index 49da42fb87..551eb287da 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/interceptor/BeanFactoryTransactionAttributeSourceAdvisor.java +++ b/spring-tx/src/main/java/org/springframework/transaction/interceptor/BeanFactoryTransactionAttributeSourceAdvisor.java @@ -61,7 +61,6 @@ public class BeanFactoryTransactionAttributeSourceAdvisor extends AbstractBeanFa this.pointcut.setClassFilter(classFilter); } - @Override public Pointcut getPointcut() { return this.pointcut; } diff --git a/spring-tx/src/main/java/org/springframework/transaction/interceptor/CompositeTransactionAttributeSource.java b/spring-tx/src/main/java/org/springframework/transaction/interceptor/CompositeTransactionAttributeSource.java index a0f1a193b5..1deed0c720 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/interceptor/CompositeTransactionAttributeSource.java +++ b/spring-tx/src/main/java/org/springframework/transaction/interceptor/CompositeTransactionAttributeSource.java @@ -52,7 +52,6 @@ public class CompositeTransactionAttributeSource implements TransactionAttribute } - @Override public TransactionAttribute getTransactionAttribute(Method method, Class targetClass) { for (TransactionAttributeSource tas : this.transactionAttributeSources) { TransactionAttribute ta = tas.getTransactionAttribute(method, targetClass); diff --git a/spring-tx/src/main/java/org/springframework/transaction/interceptor/DefaultTransactionAttribute.java b/spring-tx/src/main/java/org/springframework/transaction/interceptor/DefaultTransactionAttribute.java index 8e016f2533..f505b8bf5c 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/interceptor/DefaultTransactionAttribute.java +++ b/spring-tx/src/main/java/org/springframework/transaction/interceptor/DefaultTransactionAttribute.java @@ -82,7 +82,6 @@ public class DefaultTransactionAttribute extends DefaultTransactionDefinition im /** * Return a qualifier value associated with this transaction attribute. */ - @Override public String getQualifier() { return this.qualifier; } @@ -92,7 +91,6 @@ public class DefaultTransactionAttribute extends DefaultTransactionDefinition im * Additionally attempt to rollback on Error. *

This is consistent with TransactionTemplate's default behavior. */ - @Override public boolean rollbackOn(Throwable ex) { return (ex instanceof RuntimeException || ex instanceof Error); } diff --git a/spring-tx/src/main/java/org/springframework/transaction/interceptor/DelegatingTransactionAttribute.java b/spring-tx/src/main/java/org/springframework/transaction/interceptor/DelegatingTransactionAttribute.java index 84db321374..32c66e68dd 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/interceptor/DelegatingTransactionAttribute.java +++ b/spring-tx/src/main/java/org/springframework/transaction/interceptor/DelegatingTransactionAttribute.java @@ -46,12 +46,10 @@ public abstract class DelegatingTransactionAttribute extends DelegatingTransacti } - @Override public String getQualifier() { return this.targetAttribute.getQualifier(); } - @Override public boolean rollbackOn(Throwable ex) { return this.targetAttribute.rollbackOn(ex); } diff --git a/spring-tx/src/main/java/org/springframework/transaction/interceptor/MatchAlwaysTransactionAttributeSource.java b/spring-tx/src/main/java/org/springframework/transaction/interceptor/MatchAlwaysTransactionAttributeSource.java index e27ee94bf5..b67ed6982b 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/interceptor/MatchAlwaysTransactionAttributeSource.java +++ b/spring-tx/src/main/java/org/springframework/transaction/interceptor/MatchAlwaysTransactionAttributeSource.java @@ -50,7 +50,6 @@ public class MatchAlwaysTransactionAttributeSource implements TransactionAttribu } - @Override public TransactionAttribute getTransactionAttribute(Method method, Class targetClass) { return this.transactionAttribute; } diff --git a/spring-tx/src/main/java/org/springframework/transaction/interceptor/MethodMapTransactionAttributeSource.java b/spring-tx/src/main/java/org/springframework/transaction/interceptor/MethodMapTransactionAttributeSource.java index 77b26a5f25..c71f01d681 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/interceptor/MethodMapTransactionAttributeSource.java +++ b/spring-tx/src/main/java/org/springframework/transaction/interceptor/MethodMapTransactionAttributeSource.java @@ -81,7 +81,6 @@ public class MethodMapTransactionAttributeSource this.methodMap = methodMap; } - @Override public void setBeanClassLoader(ClassLoader beanClassLoader) { this.beanClassLoader = beanClassLoader; } @@ -92,7 +91,6 @@ public class MethodMapTransactionAttributeSource * {@link #setMethodMap(java.util.Map) "methodMap"}, if any. * @see #initMethodMap(java.util.Map) */ - @Override public void afterPropertiesSet() { initMethodMap(this.methodMap); this.eagerlyInitialized = true; @@ -206,7 +204,6 @@ public class MethodMapTransactionAttributeSource } - @Override public TransactionAttribute getTransactionAttribute(Method method, Class targetClass) { if (this.eagerlyInitialized) { return this.transactionAttributeMap.get(method); diff --git a/spring-tx/src/main/java/org/springframework/transaction/interceptor/NameMatchTransactionAttributeSource.java b/spring-tx/src/main/java/org/springframework/transaction/interceptor/NameMatchTransactionAttributeSource.java index 9d2b5debc8..8fa8be22a3 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/interceptor/NameMatchTransactionAttributeSource.java +++ b/spring-tx/src/main/java/org/springframework/transaction/interceptor/NameMatchTransactionAttributeSource.java @@ -98,7 +98,6 @@ public class NameMatchTransactionAttributeSource implements TransactionAttribute } - @Override public TransactionAttribute getTransactionAttribute(Method method, Class targetClass) { // look for direct name match String methodName = method.getName(); diff --git a/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAspectSupport.java b/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAspectSupport.java index b9e6784298..8d15342c02 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAspectSupport.java +++ b/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAspectSupport.java @@ -206,7 +206,6 @@ public abstract class TransactionAspectSupport implements BeanFactoryAware, Init /** * Set the BeanFactory to use for retrieving PlatformTransactionManager beans. */ - @Override public void setBeanFactory(BeanFactory beanFactory) { this.beanFactory = beanFactory; } @@ -221,7 +220,6 @@ public abstract class TransactionAspectSupport implements BeanFactoryAware, Init /** * Check that required properties were set. */ - @Override public void afterPropertiesSet() { if (this.transactionManager == null && this.beanFactory == null) { throw new IllegalStateException( diff --git a/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAttributeSourceAdvisor.java b/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAttributeSourceAdvisor.java index 3795ec8234..a5a632411d 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAttributeSourceAdvisor.java +++ b/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAttributeSourceAdvisor.java @@ -79,12 +79,10 @@ public class TransactionAttributeSourceAdvisor extends AbstractPointcutAdvisor { } - @Override public Advice getAdvice() { return this.transactionInterceptor; } - @Override public Pointcut getPointcut() { return this.pointcut; } diff --git a/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAttributeSourcePointcut.java b/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAttributeSourcePointcut.java index 13b23dfcfd..4b9314edf7 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAttributeSourcePointcut.java +++ b/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAttributeSourcePointcut.java @@ -32,7 +32,6 @@ import org.springframework.util.ObjectUtils; @SuppressWarnings("serial") abstract class TransactionAttributeSourcePointcut extends StaticMethodMatcherPointcut implements Serializable { - @Override public boolean matches(Method method, Class targetClass) { TransactionAttributeSource tas = getTransactionAttributeSource(); return (tas == null || tas.getTransactionAttribute(method, targetClass) != null); diff --git a/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionInterceptor.java b/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionInterceptor.java index 8fd9004b6d..11f72759a7 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionInterceptor.java +++ b/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionInterceptor.java @@ -88,7 +88,6 @@ public class TransactionInterceptor extends TransactionAspectSupport implements } - @Override public Object invoke(final MethodInvocation invocation) throws Throwable { // Work out the target class: may be {@code null}. // The TransactionAttributeSource should be passed the target class @@ -127,7 +126,6 @@ public class TransactionInterceptor extends TransactionAspectSupport implements try { Object result = ((CallbackPreferringPlatformTransactionManager) tm).execute(txAttr, new TransactionCallback() { - @Override public Object doInTransaction(TransactionStatus status) { TransactionInfo txInfo = prepareTransactionInfo(tm, txAttr, joinpointIdentification, status); try { diff --git a/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionProxyFactoryBean.java b/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionProxyFactoryBean.java index 611e44400d..eaf963cc39 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionProxyFactoryBean.java +++ b/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionProxyFactoryBean.java @@ -180,7 +180,6 @@ public class TransactionProxyFactoryBean extends AbstractSingletonProxyFactoryBe * @see org.springframework.beans.factory.BeanFactoryUtils#beanOfTypeIncludingAncestors * @see org.springframework.transaction.PlatformTransactionManager */ - @Override public void setBeanFactory(BeanFactory beanFactory) { this.transactionInterceptor.setBeanFactory(beanFactory); } diff --git a/spring-tx/src/main/java/org/springframework/transaction/jta/JtaAfterCompletionSynchronization.java b/spring-tx/src/main/java/org/springframework/transaction/jta/JtaAfterCompletionSynchronization.java index 4a4e70cb8e..fded50e167 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/jta/JtaAfterCompletionSynchronization.java +++ b/spring-tx/src/main/java/org/springframework/transaction/jta/JtaAfterCompletionSynchronization.java @@ -49,11 +49,9 @@ public class JtaAfterCompletionSynchronization implements Synchronization { } - @Override public void beforeCompletion() { } - @Override public void afterCompletion(int status) { switch (status) { case Status.STATUS_COMMITTED: diff --git a/spring-tx/src/main/java/org/springframework/transaction/jta/JtaTransactionManager.java b/spring-tx/src/main/java/org/springframework/transaction/jta/JtaTransactionManager.java index f60295ab07..35f30be7f7 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/jta/JtaTransactionManager.java +++ b/spring-tx/src/main/java/org/springframework/transaction/jta/JtaTransactionManager.java @@ -410,7 +410,6 @@ public class JtaTransactionManager extends AbstractPlatformTransactionManager * Initialize the UserTransaction as well as the TransactionManager handle. * @see #initUserTransactionAndTransactionManager() */ - @Override public void afterPropertiesSet() throws TransactionSystemException { initUserTransactionAndTransactionManager(); checkUserTransactionAndTransactionManager(); @@ -1165,7 +1164,6 @@ public class JtaTransactionManager extends AbstractPlatformTransactionManager // Implementation of TransactionFactory interface //--------------------------------------------------------------------- - @Override public Transaction createTransaction(String name, int timeout) throws NotSupportedException, SystemException { TransactionManager tm = getTransactionManager(); Assert.state(tm != null, "No JTA TransactionManager available"); @@ -1176,7 +1174,6 @@ public class JtaTransactionManager extends AbstractPlatformTransactionManager return new ManagedTransactionAdapter(tm); } - @Override public boolean supportsResourceAdapterManagedTransactions() { return false; } diff --git a/spring-tx/src/main/java/org/springframework/transaction/jta/JtaTransactionObject.java b/spring-tx/src/main/java/org/springframework/transaction/jta/JtaTransactionObject.java index 5031822294..89bab2e7e2 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/jta/JtaTransactionObject.java +++ b/spring-tx/src/main/java/org/springframework/transaction/jta/JtaTransactionObject.java @@ -60,7 +60,6 @@ public class JtaTransactionObject implements SmartTransactionObject { /** * This implementation checks the UserTransaction's rollback-only flag. */ - @Override public boolean isRollbackOnly() { if (this.userTransaction == null) { return false; @@ -79,7 +78,6 @@ public class JtaTransactionObject implements SmartTransactionObject { * assuming that they will flush all affected ORM sessions. * @see org.springframework.transaction.support.TransactionSynchronization#flush() */ - @Override public void flush() { TransactionSynchronizationUtils.triggerFlush(); } diff --git a/spring-tx/src/main/java/org/springframework/transaction/jta/ManagedTransactionAdapter.java b/spring-tx/src/main/java/org/springframework/transaction/jta/ManagedTransactionAdapter.java index f73436a2c5..483f63ae63 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/jta/ManagedTransactionAdapter.java +++ b/spring-tx/src/main/java/org/springframework/transaction/jta/ManagedTransactionAdapter.java @@ -57,38 +57,31 @@ public class ManagedTransactionAdapter implements Transaction { } - @Override public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, SystemException { this.transactionManager.commit(); } - @Override public void rollback() throws SystemException { this.transactionManager.rollback(); } - @Override public void setRollbackOnly() throws SystemException { this.transactionManager.setRollbackOnly(); } - @Override public int getStatus() throws SystemException { return this.transactionManager.getStatus(); } - @Override public boolean enlistResource(XAResource xaRes) throws RollbackException, SystemException { return this.transactionManager.getTransaction().enlistResource(xaRes); } - @Override public boolean delistResource(XAResource xaRes, int flag) throws SystemException { return this.transactionManager.getTransaction().delistResource(xaRes, flag); } - @Override public void registerSynchronization(Synchronization sync) throws RollbackException, SystemException { this.transactionManager.getTransaction().registerSynchronization(sync); } diff --git a/spring-tx/src/main/java/org/springframework/transaction/jta/SimpleTransactionFactory.java b/spring-tx/src/main/java/org/springframework/transaction/jta/SimpleTransactionFactory.java index b68abdce0b..91615081a6 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/jta/SimpleTransactionFactory.java +++ b/spring-tx/src/main/java/org/springframework/transaction/jta/SimpleTransactionFactory.java @@ -50,7 +50,6 @@ public class SimpleTransactionFactory implements TransactionFactory { } - @Override public Transaction createTransaction(String name, int timeout) throws NotSupportedException, SystemException { if (timeout >= 0) { this.transactionManager.setTransactionTimeout(timeout); @@ -59,7 +58,6 @@ public class SimpleTransactionFactory implements TransactionFactory { return new ManagedTransactionAdapter(this.transactionManager); } - @Override public boolean supportsResourceAdapterManagedTransactions() { return false; } diff --git a/spring-tx/src/main/java/org/springframework/transaction/jta/SpringJtaSynchronizationAdapter.java b/spring-tx/src/main/java/org/springframework/transaction/jta/SpringJtaSynchronizationAdapter.java index 421f8c86ad..e4ecffce74 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/jta/SpringJtaSynchronizationAdapter.java +++ b/spring-tx/src/main/java/org/springframework/transaction/jta/SpringJtaSynchronizationAdapter.java @@ -113,7 +113,6 @@ public class SpringJtaSynchronizationAdapter implements Synchronization { *

In case of an exception, the JTA transaction will be marked as rollback-only. * @see org.springframework.transaction.support.TransactionSynchronization#beforeCommit */ - @Override public void beforeCompletion() { try { boolean readOnly = TransactionSynchronizationManager.isCurrentTransactionReadOnly(); @@ -169,7 +168,6 @@ public class SpringJtaSynchronizationAdapter implements Synchronization { * @see org.springframework.transaction.support.TransactionSynchronization#beforeCompletion * @see org.springframework.transaction.support.TransactionSynchronization#afterCompletion */ - @Override public void afterCompletion(int status) { if (!this.beforeCompletionCalled) { // beforeCompletion not called before (probably because of JTA rollback). diff --git a/spring-tx/src/main/java/org/springframework/transaction/jta/UserTransactionAdapter.java b/spring-tx/src/main/java/org/springframework/transaction/jta/UserTransactionAdapter.java index efcf0616c9..3a9e57e748 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/jta/UserTransactionAdapter.java +++ b/spring-tx/src/main/java/org/springframework/transaction/jta/UserTransactionAdapter.java @@ -65,34 +65,28 @@ public class UserTransactionAdapter implements UserTransaction { } - @Override public void setTransactionTimeout(int timeout) throws SystemException { this.transactionManager.setTransactionTimeout(timeout); } - @Override public void begin() throws NotSupportedException, SystemException { this.transactionManager.begin(); } - @Override public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, SystemException { this.transactionManager.commit(); } - @Override public void rollback() throws SecurityException, SystemException { this.transactionManager.rollback(); } - @Override public void setRollbackOnly() throws SystemException { this.transactionManager.setRollbackOnly(); } - @Override public int getStatus() throws SystemException { return this.transactionManager.getStatus(); } diff --git a/spring-tx/src/main/java/org/springframework/transaction/jta/WebSphereUowTransactionManager.java b/spring-tx/src/main/java/org/springframework/transaction/jta/WebSphereUowTransactionManager.java index 3480a11741..de51a5425c 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/jta/WebSphereUowTransactionManager.java +++ b/spring-tx/src/main/java/org/springframework/transaction/jta/WebSphereUowTransactionManager.java @@ -211,7 +211,6 @@ public class WebSphereUowTransactionManager extends JtaTransactionManager } - @Override public T execute(TransactionDefinition definition, TransactionCallback callback) throws TransactionException { if (definition == null) { // Use defaults if no transaction definition given. @@ -331,7 +330,6 @@ public class WebSphereUowTransactionManager extends JtaTransactionManager this.debug = debug; } - @Override public void run() { DefaultTransactionStatus status = prepareTransactionStatus( this.definition, (this.actualTransaction ? this : null), diff --git a/spring-tx/src/main/java/org/springframework/transaction/support/AbstractPlatformTransactionManager.java b/spring-tx/src/main/java/org/springframework/transaction/support/AbstractPlatformTransactionManager.java index ad6fe26042..ef30ce0af4 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/support/AbstractPlatformTransactionManager.java +++ b/spring-tx/src/main/java/org/springframework/transaction/support/AbstractPlatformTransactionManager.java @@ -332,7 +332,6 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran * @see #isExistingTransaction * @see #doBegin */ - @Override public final TransactionStatus getTransaction(TransactionDefinition definition) throws TransactionException { Object transaction = doGetTransaction(); @@ -694,7 +693,6 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran * @see #doCommit * @see #rollback */ - @Override public final void commit(TransactionStatus status) throws TransactionException { if (status.isCompleted()) { throw new IllegalTransactionStateException( @@ -815,7 +813,6 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran * @see #doRollback * @see #doSetRollbackOnly */ - @Override public final void rollback(TransactionStatus status) throws TransactionException { if (status.isCompleted()) { throw new IllegalTransactionStateException( diff --git a/spring-tx/src/main/java/org/springframework/transaction/support/AbstractTransactionStatus.java b/spring-tx/src/main/java/org/springframework/transaction/support/AbstractTransactionStatus.java index 840d7dbc49..1e2f4455c9 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/support/AbstractTransactionStatus.java +++ b/spring-tx/src/main/java/org/springframework/transaction/support/AbstractTransactionStatus.java @@ -56,7 +56,6 @@ public abstract class AbstractTransactionStatus implements TransactionStatus { // Handling of current transaction state //--------------------------------------------------------------------- - @Override public void setRollbackOnly() { this.rollbackOnly = true; } @@ -68,7 +67,6 @@ public abstract class AbstractTransactionStatus implements TransactionStatus { * @see #isLocalRollbackOnly() * @see #isGlobalRollbackOnly() */ - @Override public boolean isRollbackOnly() { return (isLocalRollbackOnly() || isGlobalRollbackOnly()); } @@ -94,7 +92,6 @@ public abstract class AbstractTransactionStatus implements TransactionStatus { /** * This implementations is empty, considering flush as a no-op. */ - @Override public void flush() { } @@ -105,7 +102,6 @@ public abstract class AbstractTransactionStatus implements TransactionStatus { this.completed = true; } - @Override public boolean isCompleted() { return this.completed; } @@ -130,7 +126,6 @@ public abstract class AbstractTransactionStatus implements TransactionStatus { return this.savepoint; } - @Override public boolean hasSavepoint() { return (this.savepoint != null); } @@ -177,7 +172,6 @@ public abstract class AbstractTransactionStatus implements TransactionStatus { * @see #getSavepointManager() * @see org.springframework.transaction.SavepointManager */ - @Override public Object createSavepoint() throws TransactionException { return getSavepointManager().createSavepoint(); } @@ -189,7 +183,6 @@ public abstract class AbstractTransactionStatus implements TransactionStatus { * @see #getSavepointManager() * @see org.springframework.transaction.SavepointManager */ - @Override public void rollbackToSavepoint(Object savepoint) throws TransactionException { getSavepointManager().rollbackToSavepoint(savepoint); } @@ -200,7 +193,6 @@ public abstract class AbstractTransactionStatus implements TransactionStatus { * @see #getSavepointManager() * @see org.springframework.transaction.SavepointManager */ - @Override public void releaseSavepoint(Object savepoint) throws TransactionException { getSavepointManager().releaseSavepoint(savepoint); } diff --git a/spring-tx/src/main/java/org/springframework/transaction/support/DefaultTransactionDefinition.java b/spring-tx/src/main/java/org/springframework/transaction/support/DefaultTransactionDefinition.java index b83b01698b..f1a63abc11 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/support/DefaultTransactionDefinition.java +++ b/spring-tx/src/main/java/org/springframework/transaction/support/DefaultTransactionDefinition.java @@ -134,7 +134,6 @@ public class DefaultTransactionDefinition implements TransactionDefinition, Seri this.propagationBehavior = propagationBehavior; } - @Override public final int getPropagationBehavior() { return this.propagationBehavior; } @@ -169,7 +168,6 @@ public class DefaultTransactionDefinition implements TransactionDefinition, Seri this.isolationLevel = isolationLevel; } - @Override public final int getIsolationLevel() { return this.isolationLevel; } @@ -186,7 +184,6 @@ public class DefaultTransactionDefinition implements TransactionDefinition, Seri this.timeout = timeout; } - @Override public final int getTimeout() { return this.timeout; } @@ -199,7 +196,6 @@ public class DefaultTransactionDefinition implements TransactionDefinition, Seri this.readOnly = readOnly; } - @Override public final boolean isReadOnly() { return this.readOnly; } @@ -213,7 +209,6 @@ public class DefaultTransactionDefinition implements TransactionDefinition, Seri this.name = name; } - @Override public final String getName() { return this.name; } diff --git a/spring-tx/src/main/java/org/springframework/transaction/support/DefaultTransactionStatus.java b/spring-tx/src/main/java/org/springframework/transaction/support/DefaultTransactionStatus.java index 22f6f46acc..9569dc1098 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/support/DefaultTransactionStatus.java +++ b/spring-tx/src/main/java/org/springframework/transaction/support/DefaultTransactionStatus.java @@ -103,7 +103,6 @@ public class DefaultTransactionStatus extends AbstractTransactionStatus { return (this.transaction != null); } - @Override public boolean isNewTransaction() { return (hasTransaction() && this.newTransaction); } diff --git a/spring-tx/src/main/java/org/springframework/transaction/support/DelegatingTransactionDefinition.java b/spring-tx/src/main/java/org/springframework/transaction/support/DelegatingTransactionDefinition.java index e05c4e2784..4bc84fb392 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/support/DelegatingTransactionDefinition.java +++ b/spring-tx/src/main/java/org/springframework/transaction/support/DelegatingTransactionDefinition.java @@ -46,27 +46,22 @@ public abstract class DelegatingTransactionDefinition implements TransactionDefi } - @Override public int getPropagationBehavior() { return this.targetDefinition.getPropagationBehavior(); } - @Override public int getIsolationLevel() { return this.targetDefinition.getIsolationLevel(); } - @Override public int getTimeout() { return this.targetDefinition.getTimeout(); } - @Override public boolean isReadOnly() { return this.targetDefinition.isReadOnly(); } - @Override public String getName() { return this.targetDefinition.getName(); } diff --git a/spring-tx/src/main/java/org/springframework/transaction/support/ResourceHolderSupport.java b/spring-tx/src/main/java/org/springframework/transaction/support/ResourceHolderSupport.java index bea1e3e864..6a690e9713 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/support/ResourceHolderSupport.java +++ b/spring-tx/src/main/java/org/springframework/transaction/support/ResourceHolderSupport.java @@ -177,18 +177,15 @@ public abstract class ResourceHolderSupport implements ResourceHolder { /** * Reset this resource holder - transactional state as well as reference count. */ - @Override public void reset() { clear(); this.referenceCount = 0; } - @Override public void unbound() { this.isVoid = true; } - @Override public boolean isVoid() { return this.isVoid; } diff --git a/spring-tx/src/main/java/org/springframework/transaction/support/ResourceHolderSynchronization.java b/spring-tx/src/main/java/org/springframework/transaction/support/ResourceHolderSynchronization.java index 3c94f20efa..b9e668fc57 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/support/ResourceHolderSynchronization.java +++ b/spring-tx/src/main/java/org/springframework/transaction/support/ResourceHolderSynchronization.java @@ -45,30 +45,25 @@ public abstract class ResourceHolderSynchronization } - @Override public void suspend() { if (this.holderActive) { TransactionSynchronizationManager.unbindResource(this.resourceKey); } } - @Override public void resume() { if (this.holderActive) { TransactionSynchronizationManager.bindResource(this.resourceKey, this.resourceHolder); } } - @Override public void flush() { flushResource(this.resourceHolder); } - @Override public void beforeCommit(boolean readOnly) { } - @Override public void beforeCompletion() { if (shouldUnbindAtCompletion()) { TransactionSynchronizationManager.unbindResource(this.resourceKey); @@ -79,14 +74,12 @@ public abstract class ResourceHolderSynchronization } } - @Override public void afterCommit() { if (!shouldReleaseBeforeCompletion()) { processResourceAfterCommit(this.resourceHolder); } } - @Override public void afterCompletion(int status) { if (shouldUnbindAtCompletion()) { boolean releaseNecessary = false; diff --git a/spring-tx/src/main/java/org/springframework/transaction/support/SimpleTransactionStatus.java b/spring-tx/src/main/java/org/springframework/transaction/support/SimpleTransactionStatus.java index 2788b8f728..fd6f184304 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/support/SimpleTransactionStatus.java +++ b/spring-tx/src/main/java/org/springframework/transaction/support/SimpleTransactionStatus.java @@ -57,7 +57,6 @@ public class SimpleTransactionStatus extends AbstractTransactionStatus { } - @Override public boolean isNewTransaction() { return this.newTransaction; } diff --git a/spring-tx/src/main/java/org/springframework/transaction/support/TransactionCallbackWithoutResult.java b/spring-tx/src/main/java/org/springframework/transaction/support/TransactionCallbackWithoutResult.java index a4b57b3b0b..e3168e1b7b 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/support/TransactionCallbackWithoutResult.java +++ b/spring-tx/src/main/java/org/springframework/transaction/support/TransactionCallbackWithoutResult.java @@ -29,7 +29,6 @@ import org.springframework.transaction.TransactionStatus; */ public abstract class TransactionCallbackWithoutResult implements TransactionCallback { - @Override public final Object doInTransaction(TransactionStatus status) { doInTransactionWithoutResult(status); return null; diff --git a/spring-tx/src/main/java/org/springframework/transaction/support/TransactionSynchronizationAdapter.java b/spring-tx/src/main/java/org/springframework/transaction/support/TransactionSynchronizationAdapter.java index 4342e872e0..181bbf04cb 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/support/TransactionSynchronizationAdapter.java +++ b/spring-tx/src/main/java/org/springframework/transaction/support/TransactionSynchronizationAdapter.java @@ -32,36 +32,28 @@ import org.springframework.core.Ordered; */ public abstract class TransactionSynchronizationAdapter implements TransactionSynchronization, Ordered { - @Override public int getOrder() { return Ordered.LOWEST_PRECEDENCE; } - @Override public void suspend() { } - @Override public void resume() { } - @Override public void flush() { } - @Override public void beforeCommit(boolean readOnly) { } - @Override public void beforeCompletion() { } - @Override public void afterCommit() { } - @Override public void afterCompletion(int status) { } diff --git a/spring-tx/src/main/java/org/springframework/transaction/support/TransactionTemplate.java b/spring-tx/src/main/java/org/springframework/transaction/support/TransactionTemplate.java index 7515148694..47d8319af6 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/support/TransactionTemplate.java +++ b/spring-tx/src/main/java/org/springframework/transaction/support/TransactionTemplate.java @@ -113,7 +113,6 @@ public class TransactionTemplate extends DefaultTransactionDefinition return this.transactionManager; } - @Override public void afterPropertiesSet() { if (this.transactionManager == null) { throw new IllegalArgumentException("Property 'transactionManager' is required"); @@ -121,7 +120,6 @@ public class TransactionTemplate extends DefaultTransactionDefinition } - @Override public T execute(TransactionCallback action) throws TransactionException { if (this.transactionManager instanceof CallbackPreferringPlatformTransactionManager) { return ((CallbackPreferringPlatformTransactionManager) this.transactionManager).execute(this, action); diff --git a/spring-web/src/main/java/org/springframework/http/HttpHeaders.java b/spring-web/src/main/java/org/springframework/http/HttpHeaders.java index fb0f203bf8..5d480d5e4b 100644 --- a/spring-web/src/main/java/org/springframework/http/HttpHeaders.java +++ b/spring-web/src/main/java/org/springframework/http/HttpHeaders.java @@ -507,7 +507,6 @@ public class HttpHeaders implements MultiValueMap, Serializable * @param headerName the header name * @return the first header value; or {@code null} */ - @Override public String getFirst(String headerName) { List headerValues = headers.get(headerName); return headerValues != null ? headerValues.get(0) : null; @@ -521,7 +520,6 @@ public class HttpHeaders implements MultiValueMap, Serializable * @see #put(String, List) * @see #set(String, String) */ - @Override public void add(String headerName, String headerValue) { List headerValues = headers.get(headerName); if (headerValues == null) { @@ -539,21 +537,18 @@ public class HttpHeaders implements MultiValueMap, Serializable * @see #put(String, List) * @see #add(String, String) */ - @Override public void set(String headerName, String headerValue) { List headerValues = new LinkedList(); headerValues.add(headerValue); headers.put(headerName, headerValues); } - @Override public void setAll(Map values) { for (Entry entry : values.entrySet()) { set(entry.getKey(), entry.getValue()); } } - @Override public Map toSingleValueMap() { LinkedHashMap singleValueMap = new LinkedHashMap(this.headers.size()); for (Entry> entry : headers.entrySet()) { @@ -564,62 +559,50 @@ public class HttpHeaders implements MultiValueMap, Serializable // Map implementation - @Override public int size() { return this.headers.size(); } - @Override public boolean isEmpty() { return this.headers.isEmpty(); } - @Override public boolean containsKey(Object key) { return this.headers.containsKey(key); } - @Override public boolean containsValue(Object value) { return this.headers.containsValue(value); } - @Override public List get(Object key) { return this.headers.get(key); } - @Override public List put(String key, List value) { return this.headers.put(key, value); } - @Override public List remove(Object key) { return this.headers.remove(key); } - @Override public void putAll(Map> m) { this.headers.putAll(m); } - @Override public void clear() { this.headers.clear(); } - @Override public Set keySet() { return this.headers.keySet(); } - @Override public Collection> values() { return this.headers.values(); } - @Override public Set>> entrySet() { return this.headers.entrySet(); } diff --git a/spring-web/src/main/java/org/springframework/http/MediaType.java b/spring-web/src/main/java/org/springframework/http/MediaType.java index d7a5903bf2..99e1b2d124 100644 --- a/spring-web/src/main/java/org/springframework/http/MediaType.java +++ b/spring-web/src/main/java/org/springframework/http/MediaType.java @@ -583,7 +583,6 @@ public class MediaType implements Comparable { * @param other media type to compare to * @see #sortBySpecificity(List) */ - @Override public int compareTo(MediaType other) { int comp = this.type.compareToIgnoreCase(other.type); if (comp != 0) { @@ -842,7 +841,6 @@ public class MediaType implements Comparable { */ public static final Comparator SPECIFICITY_COMPARATOR = new Comparator() { - @Override public int compare(MediaType mediaType1, MediaType mediaType2) { if (mediaType1.isWildcardType() && !mediaType2.isWildcardType()) { // */* < audio/* return 1; @@ -886,7 +884,6 @@ public class MediaType implements Comparable { */ public static final Comparator QUALITY_VALUE_COMPARATOR = new Comparator() { - @Override public int compare(MediaType mediaType1, MediaType mediaType2) { double quality1 = mediaType1.getQualityValue(); double quality2 = mediaType2.getQualityValue(); diff --git a/spring-web/src/main/java/org/springframework/http/client/AbstractClientHttpRequest.java b/spring-web/src/main/java/org/springframework/http/client/AbstractClientHttpRequest.java index 878ab04eb3..47422a0065 100644 --- a/spring-web/src/main/java/org/springframework/http/client/AbstractClientHttpRequest.java +++ b/spring-web/src/main/java/org/springframework/http/client/AbstractClientHttpRequest.java @@ -35,18 +35,15 @@ public abstract class AbstractClientHttpRequest implements ClientHttpRequest { private boolean executed = false; - @Override public final HttpHeaders getHeaders() { return (this.executed ? HttpHeaders.readOnlyHttpHeaders(this.headers) : this.headers); } - @Override public final OutputStream getBody() throws IOException { checkExecuted(); return getBodyInternal(this.headers); } - @Override public final ClientHttpResponse execute() throws IOException { checkExecuted(); ClientHttpResponse result = executeInternal(this.headers); diff --git a/spring-web/src/main/java/org/springframework/http/client/AbstractClientHttpRequestFactoryWrapper.java b/spring-web/src/main/java/org/springframework/http/client/AbstractClientHttpRequestFactoryWrapper.java index 4022c4dc73..3b0e2dc08d 100644 --- a/spring-web/src/main/java/org/springframework/http/client/AbstractClientHttpRequestFactoryWrapper.java +++ b/spring-web/src/main/java/org/springframework/http/client/AbstractClientHttpRequestFactoryWrapper.java @@ -48,7 +48,6 @@ public abstract class AbstractClientHttpRequestFactoryWrapper implements ClientH * with the wrapped request factory provided to the * {@linkplain #AbstractClientHttpRequestFactoryWrapper(ClientHttpRequestFactory) constructor}. */ - @Override public final ClientHttpRequest createRequest(URI uri, HttpMethod httpMethod) throws IOException { return createRequest(uri, httpMethod, requestFactory); } diff --git a/spring-web/src/main/java/org/springframework/http/client/AbstractClientHttpResponse.java b/spring-web/src/main/java/org/springframework/http/client/AbstractClientHttpResponse.java index 84a6d9322b..cd6166575b 100644 --- a/spring-web/src/main/java/org/springframework/http/client/AbstractClientHttpResponse.java +++ b/spring-web/src/main/java/org/springframework/http/client/AbstractClientHttpResponse.java @@ -28,7 +28,6 @@ import org.springframework.http.HttpStatus; */ public abstract class AbstractClientHttpResponse implements ClientHttpResponse { - @Override public HttpStatus getStatusCode() throws IOException { return HttpStatus.valueOf(getRawStatusCode()); } diff --git a/spring-web/src/main/java/org/springframework/http/client/BufferingClientHttpRequestWrapper.java b/spring-web/src/main/java/org/springframework/http/client/BufferingClientHttpRequestWrapper.java index 0bf52d0493..ba482f3134 100644 --- a/spring-web/src/main/java/org/springframework/http/client/BufferingClientHttpRequestWrapper.java +++ b/spring-web/src/main/java/org/springframework/http/client/BufferingClientHttpRequestWrapper.java @@ -42,12 +42,10 @@ final class BufferingClientHttpRequestWrapper extends AbstractBufferingClientHtt } - @Override public HttpMethod getMethod() { return this.request.getMethod(); } - @Override public URI getURI() { return this.request.getURI(); } diff --git a/spring-web/src/main/java/org/springframework/http/client/BufferingClientHttpResponseWrapper.java b/spring-web/src/main/java/org/springframework/http/client/BufferingClientHttpResponseWrapper.java index d076ef8f25..f280790fec 100644 --- a/spring-web/src/main/java/org/springframework/http/client/BufferingClientHttpResponseWrapper.java +++ b/spring-web/src/main/java/org/springframework/http/client/BufferingClientHttpResponseWrapper.java @@ -43,27 +43,22 @@ final class BufferingClientHttpResponseWrapper implements ClientHttpResponse { } - @Override public HttpStatus getStatusCode() throws IOException { return this.response.getStatusCode(); } - @Override public int getRawStatusCode() throws IOException { return this.response.getRawStatusCode(); } - @Override public String getStatusText() throws IOException { return this.response.getStatusText(); } - @Override public HttpHeaders getHeaders() { return this.response.getHeaders(); } - @Override public InputStream getBody() throws IOException { if (this.body == null) { this.body = FileCopyUtils.copyToByteArray(this.response.getBody()); @@ -71,7 +66,6 @@ final class BufferingClientHttpResponseWrapper implements ClientHttpResponse { return new ByteArrayInputStream(this.body); } - @Override public void close() { this.response.close(); } diff --git a/spring-web/src/main/java/org/springframework/http/client/ClientHttpResponse.java b/spring-web/src/main/java/org/springframework/http/client/ClientHttpResponse.java index 26fa24a44c..438f8035bd 100644 --- a/spring-web/src/main/java/org/springframework/http/client/ClientHttpResponse.java +++ b/spring-web/src/main/java/org/springframework/http/client/ClientHttpResponse.java @@ -57,7 +57,6 @@ public interface ClientHttpResponse extends HttpInputMessage, Closeable { /** * Closes this response, freeing any resources created. */ - @Override void close(); } diff --git a/spring-web/src/main/java/org/springframework/http/client/CommonsClientHttpRequest.java b/spring-web/src/main/java/org/springframework/http/client/CommonsClientHttpRequest.java index 4ab92f5061..a3531a42e0 100644 --- a/spring-web/src/main/java/org/springframework/http/client/CommonsClientHttpRequest.java +++ b/spring-web/src/main/java/org/springframework/http/client/CommonsClientHttpRequest.java @@ -56,12 +56,10 @@ final class CommonsClientHttpRequest extends AbstractBufferingClientHttpRequest } - @Override public HttpMethod getMethod() { return HttpMethod.valueOf(this.httpMethod.getName()); } - @Override public URI getURI() { try { return URI.create(this.httpMethod.getURI().getEscapedURI()); diff --git a/spring-web/src/main/java/org/springframework/http/client/CommonsClientHttpRequestFactory.java b/spring-web/src/main/java/org/springframework/http/client/CommonsClientHttpRequestFactory.java index d985d95ad4..429b383442 100644 --- a/spring-web/src/main/java/org/springframework/http/client/CommonsClientHttpRequestFactory.java +++ b/spring-web/src/main/java/org/springframework/http/client/CommonsClientHttpRequestFactory.java @@ -112,7 +112,6 @@ public class CommonsClientHttpRequestFactory implements ClientHttpRequestFactory } - @Override public ClientHttpRequest createRequest(URI uri, HttpMethod httpMethod) throws IOException { HttpMethodBase commonsHttpMethod = createCommonsHttpMethod(httpMethod, uri.toString()); postProcessCommonsHttpMethod(commonsHttpMethod); @@ -163,7 +162,6 @@ public class CommonsClientHttpRequestFactory implements ClientHttpRequestFactory * Shutdown hook that closes the underlying {@link HttpConnectionManager}'s * connection pool, if any. */ - @Override public void destroy() { HttpConnectionManager connectionManager = getHttpClient().getHttpConnectionManager(); if (connectionManager instanceof MultiThreadedHttpConnectionManager) { diff --git a/spring-web/src/main/java/org/springframework/http/client/CommonsClientHttpResponse.java b/spring-web/src/main/java/org/springframework/http/client/CommonsClientHttpResponse.java index ed0daaf8c9..7cc8cec6e9 100644 --- a/spring-web/src/main/java/org/springframework/http/client/CommonsClientHttpResponse.java +++ b/spring-web/src/main/java/org/springframework/http/client/CommonsClientHttpResponse.java @@ -48,17 +48,14 @@ final class CommonsClientHttpResponse extends AbstractClientHttpResponse { } - @Override public int getRawStatusCode() { return this.httpMethod.getStatusCode(); } - @Override public String getStatusText() { return this.httpMethod.getStatusText(); } - @Override public HttpHeaders getHeaders() { if (this.headers == null) { this.headers = new HttpHeaders(); @@ -69,12 +66,10 @@ final class CommonsClientHttpResponse extends AbstractClientHttpResponse { return this.headers; } - @Override public InputStream getBody() throws IOException { return this.httpMethod.getResponseBodyAsStream(); } - @Override public void close() { this.httpMethod.releaseConnection(); } diff --git a/spring-web/src/main/java/org/springframework/http/client/HttpComponentsClientHttpRequest.java b/spring-web/src/main/java/org/springframework/http/client/HttpComponentsClientHttpRequest.java index f829f25ff0..3e833d4459 100644 --- a/spring-web/src/main/java/org/springframework/http/client/HttpComponentsClientHttpRequest.java +++ b/spring-web/src/main/java/org/springframework/http/client/HttpComponentsClientHttpRequest.java @@ -60,12 +60,10 @@ final class HttpComponentsClientHttpRequest extends AbstractBufferingClientHttpR } - @Override public HttpMethod getMethod() { return HttpMethod.valueOf(this.httpRequest.getMethod()); } - @Override public URI getURI() { return this.httpRequest.getURI(); } diff --git a/spring-web/src/main/java/org/springframework/http/client/HttpComponentsClientHttpRequestFactory.java b/spring-web/src/main/java/org/springframework/http/client/HttpComponentsClientHttpRequestFactory.java index f16d1fd54d..0131cfa50f 100644 --- a/spring-web/src/main/java/org/springframework/http/client/HttpComponentsClientHttpRequestFactory.java +++ b/spring-web/src/main/java/org/springframework/http/client/HttpComponentsClientHttpRequestFactory.java @@ -128,7 +128,6 @@ public class HttpComponentsClientHttpRequestFactory implements ClientHttpRequest getHttpClient().getParams().setIntParameter(CoreConnectionPNames.SO_TIMEOUT, timeout); } - @Override public ClientHttpRequest createRequest(URI uri, HttpMethod httpMethod) throws IOException { HttpUriRequest httpRequest = createHttpUriRequest(httpMethod, uri); postProcessHttpRequest(httpRequest); @@ -189,7 +188,6 @@ public class HttpComponentsClientHttpRequestFactory implements ClientHttpRequest * {@link org.apache.http.conn.ClientConnectionManager ClientConnectionManager}'s * connection pool, if any. */ - @Override public void destroy() { getHttpClient().getConnectionManager().shutdown(); } diff --git a/spring-web/src/main/java/org/springframework/http/client/HttpComponentsClientHttpResponse.java b/spring-web/src/main/java/org/springframework/http/client/HttpComponentsClientHttpResponse.java index 121f413df4..d4033e4216 100644 --- a/spring-web/src/main/java/org/springframework/http/client/HttpComponentsClientHttpResponse.java +++ b/spring-web/src/main/java/org/springframework/http/client/HttpComponentsClientHttpResponse.java @@ -49,17 +49,14 @@ final class HttpComponentsClientHttpResponse extends AbstractClientHttpResponse } - @Override public int getRawStatusCode() throws IOException { return this.httpResponse.getStatusLine().getStatusCode(); } - @Override public String getStatusText() throws IOException { return this.httpResponse.getStatusLine().getReasonPhrase(); } - @Override public HttpHeaders getHeaders() { if (this.headers == null) { this.headers = new HttpHeaders(); @@ -70,13 +67,11 @@ final class HttpComponentsClientHttpResponse extends AbstractClientHttpResponse return this.headers; } - @Override public InputStream getBody() throws IOException { HttpEntity entity = this.httpResponse.getEntity(); return entity != null ? entity.getContent() : null; } - @Override public void close() { HttpEntity entity = this.httpResponse.getEntity(); if (entity != null) { diff --git a/spring-web/src/main/java/org/springframework/http/client/InterceptingClientHttpRequest.java b/spring-web/src/main/java/org/springframework/http/client/InterceptingClientHttpRequest.java index 2b6b2c521e..9d39760479 100644 --- a/spring-web/src/main/java/org/springframework/http/client/InterceptingClientHttpRequest.java +++ b/spring-web/src/main/java/org/springframework/http/client/InterceptingClientHttpRequest.java @@ -52,12 +52,10 @@ class InterceptingClientHttpRequest extends AbstractBufferingClientHttpRequest { this.uri = uri; } - @Override public HttpMethod getMethod() { return method; } - @Override public URI getURI() { return uri; } @@ -77,7 +75,6 @@ class InterceptingClientHttpRequest extends AbstractBufferingClientHttpRequest { this.iterator = interceptors.iterator(); } - @Override public ClientHttpResponse execute(HttpRequest request, byte[] body) throws IOException { if (iterator.hasNext()) { ClientHttpRequestInterceptor nextInterceptor = iterator.next(); diff --git a/spring-web/src/main/java/org/springframework/http/client/SimpleBufferingClientHttpRequest.java b/spring-web/src/main/java/org/springframework/http/client/SimpleBufferingClientHttpRequest.java index e15528f922..56eaf1af85 100644 --- a/spring-web/src/main/java/org/springframework/http/client/SimpleBufferingClientHttpRequest.java +++ b/spring-web/src/main/java/org/springframework/http/client/SimpleBufferingClientHttpRequest.java @@ -45,12 +45,10 @@ final class SimpleBufferingClientHttpRequest extends AbstractBufferingClientHttp } - @Override public HttpMethod getMethod() { return HttpMethod.valueOf(this.connection.getRequestMethod()); } - @Override public URI getURI() { try { return this.connection.getURL().toURI(); diff --git a/spring-web/src/main/java/org/springframework/http/client/SimpleClientHttpRequestFactory.java b/spring-web/src/main/java/org/springframework/http/client/SimpleClientHttpRequestFactory.java index a64f9f8622..22d17b50f0 100644 --- a/spring-web/src/main/java/org/springframework/http/client/SimpleClientHttpRequestFactory.java +++ b/spring-web/src/main/java/org/springframework/http/client/SimpleClientHttpRequestFactory.java @@ -105,7 +105,6 @@ public class SimpleClientHttpRequestFactory implements ClientHttpRequestFactory } - @Override public ClientHttpRequest createRequest(URI uri, HttpMethod httpMethod) throws IOException { HttpURLConnection connection = openConnection(uri.toURL(), this.proxy); prepareConnection(connection, httpMethod.name()); diff --git a/spring-web/src/main/java/org/springframework/http/client/SimpleClientHttpResponse.java b/spring-web/src/main/java/org/springframework/http/client/SimpleClientHttpResponse.java index 986a9202f6..1fc33f0b69 100644 --- a/spring-web/src/main/java/org/springframework/http/client/SimpleClientHttpResponse.java +++ b/spring-web/src/main/java/org/springframework/http/client/SimpleClientHttpResponse.java @@ -43,17 +43,14 @@ final class SimpleClientHttpResponse extends AbstractClientHttpResponse { } - @Override public int getRawStatusCode() throws IOException { return this.connection.getResponseCode(); } - @Override public String getStatusText() throws IOException { return this.connection.getResponseMessage(); } - @Override public HttpHeaders getHeaders() { if (this.headers == null) { this.headers = new HttpHeaders(); @@ -75,13 +72,11 @@ final class SimpleClientHttpResponse extends AbstractClientHttpResponse { return this.headers; } - @Override public InputStream getBody() throws IOException { InputStream errorStream = this.connection.getErrorStream(); return (errorStream != null ? errorStream : this.connection.getInputStream()); } - @Override public void close() { this.connection.disconnect(); } diff --git a/spring-web/src/main/java/org/springframework/http/client/SimpleStreamingClientHttpRequest.java b/spring-web/src/main/java/org/springframework/http/client/SimpleStreamingClientHttpRequest.java index 02b5f42658..a5e831102c 100644 --- a/spring-web/src/main/java/org/springframework/http/client/SimpleStreamingClientHttpRequest.java +++ b/spring-web/src/main/java/org/springframework/http/client/SimpleStreamingClientHttpRequest.java @@ -50,12 +50,10 @@ final class SimpleStreamingClientHttpRequest extends AbstractClientHttpRequest { this.chunkSize = chunkSize; } - @Override public HttpMethod getMethod() { return HttpMethod.valueOf(this.connection.getRequestMethod()); } - @Override public URI getURI() { try { return this.connection.getURL().toURI(); diff --git a/spring-web/src/main/java/org/springframework/http/client/support/HttpRequestWrapper.java b/spring-web/src/main/java/org/springframework/http/client/support/HttpRequestWrapper.java index d66476d914..4aecd01dcd 100644 --- a/spring-web/src/main/java/org/springframework/http/client/support/HttpRequestWrapper.java +++ b/spring-web/src/main/java/org/springframework/http/client/support/HttpRequestWrapper.java @@ -55,7 +55,6 @@ public class HttpRequestWrapper implements HttpRequest { /** * Returns the method of the wrapped request. */ - @Override public HttpMethod getMethod() { return this.request.getMethod(); } @@ -63,7 +62,6 @@ public class HttpRequestWrapper implements HttpRequest { /** * Returns the URI of the wrapped request. */ - @Override public URI getURI() { return this.request.getURI(); } @@ -71,7 +69,6 @@ public class HttpRequestWrapper implements HttpRequest { /** * Returns the headers of the wrapped request. */ - @Override public HttpHeaders getHeaders() { return this.request.getHeaders(); } diff --git a/spring-web/src/main/java/org/springframework/http/client/support/ProxyFactoryBean.java b/spring-web/src/main/java/org/springframework/http/client/support/ProxyFactoryBean.java index 6ff8d581f3..b769c38453 100644 --- a/spring-web/src/main/java/org/springframework/http/client/support/ProxyFactoryBean.java +++ b/spring-web/src/main/java/org/springframework/http/client/support/ProxyFactoryBean.java @@ -63,7 +63,6 @@ public class ProxyFactoryBean implements FactoryBean, InitializingBean { this.port = port; } - @Override public void afterPropertiesSet() throws IllegalArgumentException { Assert.notNull(type, "'type' must not be null"); Assert.hasLength(hostname, "'hostname' must not be empty"); @@ -74,17 +73,14 @@ public class ProxyFactoryBean implements FactoryBean, InitializingBean { } - @Override public Proxy getObject() { return proxy; } - @Override public Class getObjectType() { return Proxy.class; } - @Override public boolean isSingleton() { return true; } diff --git a/spring-web/src/main/java/org/springframework/http/converter/AbstractHttpMessageConverter.java b/spring-web/src/main/java/org/springframework/http/converter/AbstractHttpMessageConverter.java index b5caa76c3f..680225e928 100644 --- a/spring-web/src/main/java/org/springframework/http/converter/AbstractHttpMessageConverter.java +++ b/spring-web/src/main/java/org/springframework/http/converter/AbstractHttpMessageConverter.java @@ -82,7 +82,6 @@ public abstract class AbstractHttpMessageConverter implements HttpMessageConv this.supportedMediaTypes = new ArrayList(supportedMediaTypes); } - @Override public List getSupportedMediaTypes() { return Collections.unmodifiableList(this.supportedMediaTypes); } @@ -93,7 +92,6 @@ public abstract class AbstractHttpMessageConverter implements HttpMessageConv * and if the {@linkplain #getSupportedMediaTypes() supported media types} * {@linkplain MediaType#includes(MediaType) include} the given media type. */ - @Override public boolean canRead(Class clazz, MediaType mediaType) { return supports(clazz) && canRead(mediaType); } @@ -123,7 +121,6 @@ public abstract class AbstractHttpMessageConverter implements HttpMessageConv * and if the {@linkplain #getSupportedMediaTypes() supported media types} * {@linkplain MediaType#includes(MediaType) include} the given media type. */ - @Override public boolean canWrite(Class clazz, MediaType mediaType) { return supports(clazz) && canWrite(mediaType); } @@ -152,7 +149,6 @@ public abstract class AbstractHttpMessageConverter implements HttpMessageConv * This implementation simple delegates to {@link #readInternal(Class, HttpInputMessage)}. * Future implementations might add some default behavior, however. */ - @Override public final T read(Class clazz, HttpInputMessage inputMessage) throws IOException { return readInternal(clazz, inputMessage); } @@ -162,7 +158,6 @@ public abstract class AbstractHttpMessageConverter implements HttpMessageConv * type was not provided, calls {@link #getContentLength}, and sets the corresponding headers * on the output message. It then calls {@link #writeInternal}. */ - @Override public final void write(T t, MediaType contentType, HttpOutputMessage outputMessage) throws IOException, HttpMessageNotWritableException { diff --git a/spring-web/src/main/java/org/springframework/http/converter/BufferedImageHttpMessageConverter.java b/spring-web/src/main/java/org/springframework/http/converter/BufferedImageHttpMessageConverter.java index 24eee6ca4d..d9bec7b477 100644 --- a/spring-web/src/main/java/org/springframework/http/converter/BufferedImageHttpMessageConverter.java +++ b/spring-web/src/main/java/org/springframework/http/converter/BufferedImageHttpMessageConverter.java @@ -115,7 +115,6 @@ public class BufferedImageHttpMessageConverter implements HttpMessageConverter clazz, MediaType mediaType) { return (BufferedImage.class.equals(clazz) && isReadable(mediaType)); } @@ -128,7 +127,6 @@ public class BufferedImageHttpMessageConverter implements HttpMessageConverter clazz, MediaType mediaType) { return (BufferedImage.class.equals(clazz) && isWritable(mediaType)); } @@ -141,12 +139,10 @@ public class BufferedImageHttpMessageConverter implements HttpMessageConverter getSupportedMediaTypes() { return Collections.unmodifiableList(this.readableMediaTypes); } - @Override public BufferedImage read(Class clazz, HttpInputMessage inputMessage) throws IOException, HttpMessageNotReadableException { @@ -192,7 +188,6 @@ public class BufferedImageHttpMessageConverter implements HttpMessageConverter clazz, MediaType mediaType) { if (!MultiValueMap.class.isAssignableFrom(clazz)) { return false; @@ -140,7 +139,6 @@ public class FormHttpMessageConverter implements HttpMessageConverter clazz, MediaType mediaType) { if (!MultiValueMap.class.isAssignableFrom(clazz)) { return false; @@ -163,12 +161,10 @@ public class FormHttpMessageConverter implements HttpMessageConverter getSupportedMediaTypes() { return Collections.unmodifiableList(this.supportedMediaTypes); } - @Override public MultiValueMap read(Class> clazz, HttpInputMessage inputMessage) throws IOException, HttpMessageNotReadableException { @@ -194,7 +190,6 @@ public class FormHttpMessageConverter implements HttpMessageConverter map, MediaType contentType, HttpOutputMessage outputMessage) throws IOException, HttpMessageNotWritableException { @@ -378,12 +373,10 @@ public class FormHttpMessageConverter implements HttpMessageConverter getObjectType() { return ObjectMapper.class; } - @Override public boolean isSingleton() { return true; } diff --git a/spring-web/src/main/java/org/springframework/http/converter/json/JacksonObjectMapperFactoryBean.java b/spring-web/src/main/java/org/springframework/http/converter/json/JacksonObjectMapperFactoryBean.java index 48ddfec469..42c9bc122d 100644 --- a/spring-web/src/main/java/org/springframework/http/converter/json/JacksonObjectMapperFactoryBean.java +++ b/spring-web/src/main/java/org/springframework/http/converter/json/JacksonObjectMapperFactoryBean.java @@ -191,7 +191,6 @@ public class JacksonObjectMapperFactoryBean implements FactoryBean } } - @Override public void afterPropertiesSet() { if (this.objectMapper == null) { this.objectMapper = new ObjectMapper(); @@ -230,17 +229,14 @@ public class JacksonObjectMapperFactoryBean implements FactoryBean /** * Return the singleton ObjectMapper. */ - @Override public ObjectMapper getObject() { return this.objectMapper; } - @Override public Class getObjectType() { return ObjectMapper.class; } - @Override public boolean isSingleton() { return true; } diff --git a/spring-web/src/main/java/org/springframework/http/converter/json/MappingJackson2HttpMessageConverter.java b/spring-web/src/main/java/org/springframework/http/converter/json/MappingJackson2HttpMessageConverter.java index 3a9e4f8320..a0b0a2a5b5 100644 --- a/spring-web/src/main/java/org/springframework/http/converter/json/MappingJackson2HttpMessageConverter.java +++ b/spring-web/src/main/java/org/springframework/http/converter/json/MappingJackson2HttpMessageConverter.java @@ -132,7 +132,6 @@ public class MappingJackson2HttpMessageConverter extends AbstractHttpMessageConv return canRead(clazz, null, mediaType); } - @Override public boolean canRead(Type type, Class contextClass, MediaType mediaType) { JavaType javaType = getJavaType(type, contextClass); return (this.objectMapper.canDeserialize(javaType) && canRead(mediaType)); @@ -157,7 +156,6 @@ public class MappingJackson2HttpMessageConverter extends AbstractHttpMessageConv return readJavaType(javaType, inputMessage); } - @Override public Object read(Type type, Class contextClass, HttpInputMessage inputMessage) throws IOException, HttpMessageNotReadableException { diff --git a/spring-web/src/main/java/org/springframework/http/converter/json/MappingJacksonHttpMessageConverter.java b/spring-web/src/main/java/org/springframework/http/converter/json/MappingJacksonHttpMessageConverter.java index 4b546cea0a..448b3be8e8 100644 --- a/spring-web/src/main/java/org/springframework/http/converter/json/MappingJacksonHttpMessageConverter.java +++ b/spring-web/src/main/java/org/springframework/http/converter/json/MappingJacksonHttpMessageConverter.java @@ -130,7 +130,6 @@ public class MappingJacksonHttpMessageConverter extends AbstractHttpMessageConve return canRead(clazz, null, mediaType); } - @Override public boolean canRead(Type type, Class contextClass, MediaType mediaType) { JavaType javaType = getJavaType(type, contextClass); return (this.objectMapper.canDeserialize(javaType) && canRead(mediaType)); @@ -155,7 +154,6 @@ public class MappingJacksonHttpMessageConverter extends AbstractHttpMessageConve return readJavaType(javaType, inputMessage); } - @Override public Object read(Type type, Class contextClass, HttpInputMessage inputMessage) throws IOException, HttpMessageNotReadableException { diff --git a/spring-web/src/main/java/org/springframework/http/converter/xml/Jaxb2CollectionHttpMessageConverter.java b/spring-web/src/main/java/org/springframework/http/converter/xml/Jaxb2CollectionHttpMessageConverter.java index d2e0e9b53d..af65ee275c 100644 --- a/spring-web/src/main/java/org/springframework/http/converter/xml/Jaxb2CollectionHttpMessageConverter.java +++ b/spring-web/src/main/java/org/springframework/http/converter/xml/Jaxb2CollectionHttpMessageConverter.java @@ -74,7 +74,6 @@ public class Jaxb2CollectionHttpMessageConverter * {@link Collection} where the generic type is a JAXB type annotated with * {@link XmlRootElement} or {@link XmlType}. */ - @Override public boolean canRead(Type type, Class contextClass, MediaType mediaType) { if (!(type instanceof ParameterizedType)) { return false; @@ -120,7 +119,6 @@ public class Jaxb2CollectionHttpMessageConverter throw new UnsupportedOperationException(); } - @Override public T read(Type type, Class contextClass, HttpInputMessage inputMessage) throws IOException, HttpMessageNotReadableException { diff --git a/spring-web/src/main/java/org/springframework/http/server/ServerHttpResponse.java b/spring-web/src/main/java/org/springframework/http/server/ServerHttpResponse.java index 90cb72ffd5..8ce306271f 100644 --- a/spring-web/src/main/java/org/springframework/http/server/ServerHttpResponse.java +++ b/spring-web/src/main/java/org/springframework/http/server/ServerHttpResponse.java @@ -38,7 +38,6 @@ public interface ServerHttpResponse extends HttpOutputMessage, Closeable { /** * Close this response, freeing any resources created. */ - @Override void close(); } diff --git a/spring-web/src/main/java/org/springframework/http/server/ServletServerHttpRequest.java b/spring-web/src/main/java/org/springframework/http/server/ServletServerHttpRequest.java index 9a150b5e92..5dd0dbd424 100644 --- a/spring-web/src/main/java/org/springframework/http/server/ServletServerHttpRequest.java +++ b/spring-web/src/main/java/org/springframework/http/server/ServletServerHttpRequest.java @@ -76,12 +76,10 @@ public class ServletServerHttpRequest implements ServerHttpRequest { return this.servletRequest; } - @Override public HttpMethod getMethod() { return HttpMethod.valueOf(this.servletRequest.getMethod()); } - @Override public URI getURI() { try { return new URI(this.servletRequest.getScheme(), null, this.servletRequest.getServerName(), @@ -93,7 +91,6 @@ public class ServletServerHttpRequest implements ServerHttpRequest { } } - @Override public HttpHeaders getHeaders() { if (this.headers == null) { this.headers = new HttpHeaders(); @@ -126,7 +123,6 @@ public class ServletServerHttpRequest implements ServerHttpRequest { return this.headers; } - @Override public InputStream getBody() throws IOException { if (isFormPost(this.servletRequest)) { return getBodyFromServletRequestParameters(this.servletRequest); diff --git a/spring-web/src/main/java/org/springframework/http/server/ServletServerHttpResponse.java b/spring-web/src/main/java/org/springframework/http/server/ServletServerHttpResponse.java index 4133a9c229..985085e51e 100644 --- a/spring-web/src/main/java/org/springframework/http/server/ServletServerHttpResponse.java +++ b/spring-web/src/main/java/org/springframework/http/server/ServletServerHttpResponse.java @@ -58,23 +58,19 @@ public class ServletServerHttpResponse implements ServerHttpResponse { return this.servletResponse; } - @Override public void setStatusCode(HttpStatus status) { this.servletResponse.setStatus(status.value()); } - @Override public HttpHeaders getHeaders() { return (this.headersWritten ? HttpHeaders.readOnlyHttpHeaders(this.headers) : this.headers); } - @Override public OutputStream getBody() throws IOException { writeHeaders(); return this.servletResponse.getOutputStream(); } - @Override public void close() { writeHeaders(); } diff --git a/spring-web/src/main/java/org/springframework/remoting/caucho/BurlapClientInterceptor.java b/spring-web/src/main/java/org/springframework/remoting/caucho/BurlapClientInterceptor.java index c7a74297bf..28b6bd5087 100644 --- a/spring-web/src/main/java/org/springframework/remoting/caucho/BurlapClientInterceptor.java +++ b/spring-web/src/main/java/org/springframework/remoting/caucho/BurlapClientInterceptor.java @@ -137,7 +137,6 @@ public class BurlapClientInterceptor extends UrlBasedRemoteAccessor implements M } - @Override public Object invoke(MethodInvocation invocation) throws Throwable { if (this.burlapProxy == null) { throw new IllegalStateException("BurlapClientInterceptor is not properly initialized - " + diff --git a/spring-web/src/main/java/org/springframework/remoting/caucho/BurlapExporter.java b/spring-web/src/main/java/org/springframework/remoting/caucho/BurlapExporter.java index ae302751fa..eca759bdb7 100644 --- a/spring-web/src/main/java/org/springframework/remoting/caucho/BurlapExporter.java +++ b/spring-web/src/main/java/org/springframework/remoting/caucho/BurlapExporter.java @@ -47,7 +47,6 @@ public class BurlapExporter extends RemoteExporter implements InitializingBean { private BurlapSkeleton skeleton; - @Override public void afterPropertiesSet() { prepare(); } diff --git a/spring-web/src/main/java/org/springframework/remoting/caucho/BurlapProxyFactoryBean.java b/spring-web/src/main/java/org/springframework/remoting/caucho/BurlapProxyFactoryBean.java index 0bfe6e43a0..f15c1eda0e 100644 --- a/spring-web/src/main/java/org/springframework/remoting/caucho/BurlapProxyFactoryBean.java +++ b/spring-web/src/main/java/org/springframework/remoting/caucho/BurlapProxyFactoryBean.java @@ -52,17 +52,14 @@ public class BurlapProxyFactoryBean extends BurlapClientInterceptor implements F } - @Override public Object getObject() { return this.serviceProxy; } - @Override public Class getObjectType() { return getServiceInterface(); } - @Override public boolean isSingleton() { return true; } diff --git a/spring-web/src/main/java/org/springframework/remoting/caucho/BurlapServiceExporter.java b/spring-web/src/main/java/org/springframework/remoting/caucho/BurlapServiceExporter.java index 7f9c7ec7db..ca25dd79bf 100644 --- a/spring-web/src/main/java/org/springframework/remoting/caucho/BurlapServiceExporter.java +++ b/spring-web/src/main/java/org/springframework/remoting/caucho/BurlapServiceExporter.java @@ -54,7 +54,6 @@ public class BurlapServiceExporter extends BurlapExporter implements HttpRequest /** * Processes the incoming Burlap request and creates a Burlap response. */ - @Override public void handleRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { diff --git a/spring-web/src/main/java/org/springframework/remoting/caucho/HessianClientInterceptor.java b/spring-web/src/main/java/org/springframework/remoting/caucho/HessianClientInterceptor.java index 81dcdf7a76..ff89f1bb86 100644 --- a/spring-web/src/main/java/org/springframework/remoting/caucho/HessianClientInterceptor.java +++ b/spring-web/src/main/java/org/springframework/remoting/caucho/HessianClientInterceptor.java @@ -211,7 +211,6 @@ public class HessianClientInterceptor extends UrlBasedRemoteAccessor implements } - @Override public Object invoke(MethodInvocation invocation) throws Throwable { if (this.hessianProxy == null) { throw new IllegalStateException("HessianClientInterceptor is not properly initialized - " + diff --git a/spring-web/src/main/java/org/springframework/remoting/caucho/HessianExporter.java b/spring-web/src/main/java/org/springframework/remoting/caucho/HessianExporter.java index 9548d6b3e8..5aba1cb154 100644 --- a/spring-web/src/main/java/org/springframework/remoting/caucho/HessianExporter.java +++ b/spring-web/src/main/java/org/springframework/remoting/caucho/HessianExporter.java @@ -93,7 +93,6 @@ public class HessianExporter extends RemoteExporter implements InitializingBean } - @Override public void afterPropertiesSet() { prepare(); } diff --git a/spring-web/src/main/java/org/springframework/remoting/caucho/HessianProxyFactoryBean.java b/spring-web/src/main/java/org/springframework/remoting/caucho/HessianProxyFactoryBean.java index f9e4e1de06..7421d08f01 100644 --- a/spring-web/src/main/java/org/springframework/remoting/caucho/HessianProxyFactoryBean.java +++ b/spring-web/src/main/java/org/springframework/remoting/caucho/HessianProxyFactoryBean.java @@ -52,17 +52,14 @@ public class HessianProxyFactoryBean extends HessianClientInterceptor implements } - @Override public Object getObject() { return this.serviceProxy; } - @Override public Class getObjectType() { return getServiceInterface(); } - @Override public boolean isSingleton() { return true; } diff --git a/spring-web/src/main/java/org/springframework/remoting/caucho/HessianServiceExporter.java b/spring-web/src/main/java/org/springframework/remoting/caucho/HessianServiceExporter.java index 3952671c32..4c94d0aa63 100644 --- a/spring-web/src/main/java/org/springframework/remoting/caucho/HessianServiceExporter.java +++ b/spring-web/src/main/java/org/springframework/remoting/caucho/HessianServiceExporter.java @@ -53,7 +53,6 @@ public class HessianServiceExporter extends HessianExporter implements HttpReque /** * Processes the incoming Hessian request and creates a Hessian response. */ - @Override public void handleRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { diff --git a/spring-web/src/main/java/org/springframework/remoting/caucho/SimpleBurlapServiceExporter.java b/spring-web/src/main/java/org/springframework/remoting/caucho/SimpleBurlapServiceExporter.java index 304f962201..6e5471d6ad 100644 --- a/spring-web/src/main/java/org/springframework/remoting/caucho/SimpleBurlapServiceExporter.java +++ b/spring-web/src/main/java/org/springframework/remoting/caucho/SimpleBurlapServiceExporter.java @@ -50,7 +50,6 @@ public class SimpleBurlapServiceExporter extends BurlapExporter implements HttpH /** * Processes the incoming Burlap request and creates a Burlap response. */ - @Override public void handle(HttpExchange exchange) throws IOException { if (!"POST".equals(exchange.getRequestMethod())) { exchange.getResponseHeaders().set("Allow", "POST"); diff --git a/spring-web/src/main/java/org/springframework/remoting/caucho/SimpleHessianServiceExporter.java b/spring-web/src/main/java/org/springframework/remoting/caucho/SimpleHessianServiceExporter.java index f46dc95a49..a4e483657d 100644 --- a/spring-web/src/main/java/org/springframework/remoting/caucho/SimpleHessianServiceExporter.java +++ b/spring-web/src/main/java/org/springframework/remoting/caucho/SimpleHessianServiceExporter.java @@ -50,7 +50,6 @@ public class SimpleHessianServiceExporter extends HessianExporter implements Htt /** * Processes the incoming Hessian request and creates a Hessian response. */ - @Override public void handle(HttpExchange exchange) throws IOException { if (!"POST".equals(exchange.getRequestMethod())) { exchange.getResponseHeaders().set("Allow", "POST"); diff --git a/spring-web/src/main/java/org/springframework/remoting/httpinvoker/AbstractHttpInvokerRequestExecutor.java b/spring-web/src/main/java/org/springframework/remoting/httpinvoker/AbstractHttpInvokerRequestExecutor.java index 8b6c47b339..5a024973ea 100644 --- a/spring-web/src/main/java/org/springframework/remoting/httpinvoker/AbstractHttpInvokerRequestExecutor.java +++ b/spring-web/src/main/java/org/springframework/remoting/httpinvoker/AbstractHttpInvokerRequestExecutor.java @@ -113,7 +113,6 @@ public abstract class AbstractHttpInvokerRequestExecutor return this.acceptGzipEncoding; } - @Override public void setBeanClassLoader(ClassLoader classLoader) { this.beanClassLoader = classLoader; } @@ -126,7 +125,6 @@ public abstract class AbstractHttpInvokerRequestExecutor } - @Override public final RemoteInvocationResult executeRequest( HttpInvokerClientConfiguration config, RemoteInvocation invocation) throws Exception { diff --git a/spring-web/src/main/java/org/springframework/remoting/httpinvoker/HttpInvokerClientInterceptor.java b/spring-web/src/main/java/org/springframework/remoting/httpinvoker/HttpInvokerClientInterceptor.java index ccc1f704f6..18668f5300 100644 --- a/spring-web/src/main/java/org/springframework/remoting/httpinvoker/HttpInvokerClientInterceptor.java +++ b/spring-web/src/main/java/org/springframework/remoting/httpinvoker/HttpInvokerClientInterceptor.java @@ -91,7 +91,6 @@ public class HttpInvokerClientInterceptor extends RemoteInvocationBasedAccessor /** * Return the codebase URL to download classes from if not found locally. */ - @Override public String getCodebaseUrl() { return this.codebaseUrl; } @@ -132,7 +131,6 @@ public class HttpInvokerClientInterceptor extends RemoteInvocationBasedAccessor } - @Override public Object invoke(MethodInvocation methodInvocation) throws Throwable { if (AopUtils.isToStringMethod(methodInvocation.getMethod())) { return "HTTP invoker proxy for service URL [" + getServiceUrl() + "]"; diff --git a/spring-web/src/main/java/org/springframework/remoting/httpinvoker/HttpInvokerProxyFactoryBean.java b/spring-web/src/main/java/org/springframework/remoting/httpinvoker/HttpInvokerProxyFactoryBean.java index 3514f5e2e5..eee01cd025 100644 --- a/spring-web/src/main/java/org/springframework/remoting/httpinvoker/HttpInvokerProxyFactoryBean.java +++ b/spring-web/src/main/java/org/springframework/remoting/httpinvoker/HttpInvokerProxyFactoryBean.java @@ -63,17 +63,14 @@ public class HttpInvokerProxyFactoryBean extends HttpInvokerClientInterceptor } - @Override public Object getObject() { return this.serviceProxy; } - @Override public Class getObjectType() { return getServiceInterface(); } - @Override public boolean isSingleton() { return true; } diff --git a/spring-web/src/main/java/org/springframework/remoting/httpinvoker/HttpInvokerServiceExporter.java b/spring-web/src/main/java/org/springframework/remoting/httpinvoker/HttpInvokerServiceExporter.java index 0e85a7bcc4..d95b47122c 100644 --- a/spring-web/src/main/java/org/springframework/remoting/httpinvoker/HttpInvokerServiceExporter.java +++ b/spring-web/src/main/java/org/springframework/remoting/httpinvoker/HttpInvokerServiceExporter.java @@ -65,7 +65,6 @@ public class HttpInvokerServiceExporter extends RemoteInvocationSerializingExpor * @see #invokeAndCreateResult(org.springframework.remoting.support.RemoteInvocation, Object) * @see #writeRemoteInvocationResult(HttpServletRequest, HttpServletResponse, RemoteInvocationResult) */ - @Override public void handleRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { diff --git a/spring-web/src/main/java/org/springframework/remoting/httpinvoker/SimpleHttpInvokerServiceExporter.java b/spring-web/src/main/java/org/springframework/remoting/httpinvoker/SimpleHttpInvokerServiceExporter.java index 88283205a9..ed94d9d8e9 100644 --- a/spring-web/src/main/java/org/springframework/remoting/httpinvoker/SimpleHttpInvokerServiceExporter.java +++ b/spring-web/src/main/java/org/springframework/remoting/httpinvoker/SimpleHttpInvokerServiceExporter.java @@ -61,7 +61,6 @@ public class SimpleHttpInvokerServiceExporter extends RemoteInvocationSerializin * @see #invokeAndCreateResult(org.springframework.remoting.support.RemoteInvocation, Object) * @see #writeRemoteInvocationResult(com.sun.net.httpserver.HttpExchange, org.springframework.remoting.support.RemoteInvocationResult) */ - @Override public void handle(HttpExchange exchange) throws IOException { try { RemoteInvocation invocation = readRemoteInvocation(exchange); diff --git a/spring-web/src/main/java/org/springframework/remoting/jaxrpc/JaxRpcPortClientInterceptor.java b/spring-web/src/main/java/org/springframework/remoting/jaxrpc/JaxRpcPortClientInterceptor.java index bb19449254..373b301dc7 100644 --- a/spring-web/src/main/java/org/springframework/remoting/jaxrpc/JaxRpcPortClientInterceptor.java +++ b/spring-web/src/main/java/org/springframework/remoting/jaxrpc/JaxRpcPortClientInterceptor.java @@ -344,7 +344,6 @@ public class JaxRpcPortClientInterceptor extends LocalJaxRpcServiceFactory * Prepares the JAX-RPC service and port if the "lookupServiceOnStartup" * is turned on (which it is by default). */ - @Override public void afterPropertiesSet() { if (this.lookupServiceOnStartup) { prepare(); @@ -543,7 +542,6 @@ public class JaxRpcPortClientInterceptor extends LocalJaxRpcServiceFactory * @see #prepare() * @see #doInvoke */ - @Override public Object invoke(MethodInvocation invocation) throws Throwable { if (AopUtils.isToStringMethod(invocation.getMethod())) { return "JAX-RPC proxy for port [" + getPortName() + "] of service [" + getServiceName() + "]"; diff --git a/spring-web/src/main/java/org/springframework/remoting/jaxrpc/JaxRpcPortProxyFactoryBean.java b/spring-web/src/main/java/org/springframework/remoting/jaxrpc/JaxRpcPortProxyFactoryBean.java index 65abc2807c..610168c678 100644 --- a/spring-web/src/main/java/org/springframework/remoting/jaxrpc/JaxRpcPortProxyFactoryBean.java +++ b/spring-web/src/main/java/org/springframework/remoting/jaxrpc/JaxRpcPortProxyFactoryBean.java @@ -54,7 +54,6 @@ public class JaxRpcPortProxyFactoryBean extends JaxRpcPortClientInterceptor private Object serviceProxy; - @Override public void setBeanClassLoader(ClassLoader classLoader) { this.beanClassLoader = classLoader; } @@ -76,17 +75,14 @@ public class JaxRpcPortProxyFactoryBean extends JaxRpcPortClientInterceptor } - @Override public Object getObject() { return this.serviceProxy; } - @Override public Class getObjectType() { return getServiceInterface(); } - @Override public boolean isSingleton() { return true; } diff --git a/spring-web/src/main/java/org/springframework/remoting/jaxrpc/LocalJaxRpcServiceFactoryBean.java b/spring-web/src/main/java/org/springframework/remoting/jaxrpc/LocalJaxRpcServiceFactoryBean.java index efdd96bcee..35d8afa8c5 100644 --- a/spring-web/src/main/java/org/springframework/remoting/jaxrpc/LocalJaxRpcServiceFactoryBean.java +++ b/spring-web/src/main/java/org/springframework/remoting/jaxrpc/LocalJaxRpcServiceFactoryBean.java @@ -44,23 +44,19 @@ public class LocalJaxRpcServiceFactoryBean extends LocalJaxRpcServiceFactory private Service service; - @Override public void afterPropertiesSet() throws ServiceException { this.service = createJaxRpcService(); } - @Override public Service getObject() throws Exception { return this.service; } - @Override public Class getObjectType() { return (this.service != null ? this.service.getClass() : Service.class); } - @Override public boolean isSingleton() { return true; } diff --git a/spring-web/src/main/java/org/springframework/remoting/jaxrpc/ServletEndpointSupport.java b/spring-web/src/main/java/org/springframework/remoting/jaxrpc/ServletEndpointSupport.java index 04d52e6ae4..4a3d34185b 100644 --- a/spring-web/src/main/java/org/springframework/remoting/jaxrpc/ServletEndpointSupport.java +++ b/spring-web/src/main/java/org/springframework/remoting/jaxrpc/ServletEndpointSupport.java @@ -77,7 +77,6 @@ public abstract class ServletEndpointSupport implements ServiceLifecycle { * @throws ServiceException if the context is not a ServletEndpointContext * @see #onInit */ - @Override public final void init(Object context) throws ServiceException { if (!(context instanceof ServletEndpointContext)) { throw new ServiceException("ServletEndpointSupport needs ServletEndpointContext, not [" + context + "]"); @@ -146,7 +145,6 @@ public abstract class ServletEndpointSupport implements ServiceLifecycle { * This implementation of destroy is empty. * Can be overridden in subclasses. */ - @Override public void destroy() { } diff --git a/spring-web/src/main/java/org/springframework/remoting/jaxws/AbstractJaxWsServiceExporter.java b/spring-web/src/main/java/org/springframework/remoting/jaxws/AbstractJaxWsServiceExporter.java index 52ad40354c..d4078cae2e 100644 --- a/spring-web/src/main/java/org/springframework/remoting/jaxws/AbstractJaxWsServiceExporter.java +++ b/spring-web/src/main/java/org/springframework/remoting/jaxws/AbstractJaxWsServiceExporter.java @@ -109,7 +109,6 @@ public abstract class AbstractJaxWsServiceExporter implements BeanFactoryAware, /** * Obtains all web service beans and publishes them as JAX-WS endpoints. */ - @Override public void setBeanFactory(BeanFactory beanFactory) { if (!(beanFactory instanceof ListableBeanFactory)) { throw new IllegalStateException(getClass().getSimpleName() + " requires a ListableBeanFactory"); @@ -122,7 +121,6 @@ public abstract class AbstractJaxWsServiceExporter implements BeanFactoryAware, * Immediately publish all endpoints when fully configured. * @see #publishEndpoints() */ - @Override public void afterPropertiesSet() throws Exception { publishEndpoints(); } @@ -203,7 +201,6 @@ public abstract class AbstractJaxWsServiceExporter implements BeanFactoryAware, /** * Stops all published endpoints, taking the web services offline. */ - @Override public void destroy() { for (Endpoint endpoint : this.publishedEndpoints) { endpoint.stop(); diff --git a/spring-web/src/main/java/org/springframework/remoting/jaxws/JaxWsPortClientInterceptor.java b/spring-web/src/main/java/org/springframework/remoting/jaxws/JaxWsPortClientInterceptor.java index 4139a926d5..9efd206e5f 100644 --- a/spring-web/src/main/java/org/springframework/remoting/jaxws/JaxWsPortClientInterceptor.java +++ b/spring-web/src/main/java/org/springframework/remoting/jaxws/JaxWsPortClientInterceptor.java @@ -299,7 +299,6 @@ public class JaxWsPortClientInterceptor extends LocalJaxWsServiceFactory * {@link #setWebServiceFeatures}, and also for building a client * proxy in the {@link JaxWsPortProxyFactoryBean} subclass. */ - @Override public void setBeanClassLoader(ClassLoader classLoader) { this.beanClassLoader = classLoader; } @@ -312,7 +311,6 @@ public class JaxWsPortClientInterceptor extends LocalJaxWsServiceFactory } - @Override public void afterPropertiesSet() { if (this.lookupServiceOnStartup) { prepare(); @@ -476,7 +474,6 @@ public class JaxWsPortClientInterceptor extends LocalJaxWsServiceFactory } - @Override public Object invoke(MethodInvocation invocation) throws Throwable { if (AopUtils.isToStringMethod(invocation.getMethod())) { return "JAX-WS proxy for port [" + getPortName() + "] of service [" + getServiceName() + "]"; diff --git a/spring-web/src/main/java/org/springframework/remoting/jaxws/JaxWsPortProxyFactoryBean.java b/spring-web/src/main/java/org/springframework/remoting/jaxws/JaxWsPortProxyFactoryBean.java index ee7ccdfe31..29630cefc6 100644 --- a/spring-web/src/main/java/org/springframework/remoting/jaxws/JaxWsPortProxyFactoryBean.java +++ b/spring-web/src/main/java/org/springframework/remoting/jaxws/JaxWsPortProxyFactoryBean.java @@ -50,17 +50,14 @@ public class JaxWsPortProxyFactoryBean extends JaxWsPortClientInterceptor } - @Override public Object getObject() { return this.serviceProxy; } - @Override public Class getObjectType() { return getServiceInterface(); } - @Override public boolean isSingleton() { return true; } diff --git a/spring-web/src/main/java/org/springframework/remoting/jaxws/LocalJaxWsServiceFactoryBean.java b/spring-web/src/main/java/org/springframework/remoting/jaxws/LocalJaxWsServiceFactoryBean.java index da97f8437a..672ff47390 100644 --- a/spring-web/src/main/java/org/springframework/remoting/jaxws/LocalJaxWsServiceFactoryBean.java +++ b/spring-web/src/main/java/org/springframework/remoting/jaxws/LocalJaxWsServiceFactoryBean.java @@ -41,22 +41,18 @@ public class LocalJaxWsServiceFactoryBean extends LocalJaxWsServiceFactory private Service service; - @Override public void afterPropertiesSet() { this.service = createJaxWsService(); } - @Override public Service getObject() { return this.service; } - @Override public Class getObjectType() { return (this.service != null ? this.service.getClass() : Service.class); } - @Override public boolean isSingleton() { return true; } diff --git a/spring-web/src/main/java/org/springframework/web/SpringServletContainerInitializer.java b/spring-web/src/main/java/org/springframework/web/SpringServletContainerInitializer.java index 717f4ec3f9..2c579172c1 100644 --- a/spring-web/src/main/java/org/springframework/web/SpringServletContainerInitializer.java +++ b/spring-web/src/main/java/org/springframework/web/SpringServletContainerInitializer.java @@ -147,7 +147,6 @@ public class SpringServletContainerInitializer implements ServletContainerInitia * @see WebApplicationInitializer#onStartup(ServletContext) * @see AnnotationAwareOrderComparator */ - @Override public void onStartup(Set> webAppInitializerClasses, ServletContext servletContext) throws ServletException { diff --git a/spring-web/src/main/java/org/springframework/web/accept/AbstractMappingContentNegotiationStrategy.java b/spring-web/src/main/java/org/springframework/web/accept/AbstractMappingContentNegotiationStrategy.java index a85e4b19b6..edd0b8e22b 100644 --- a/spring-web/src/main/java/org/springframework/web/accept/AbstractMappingContentNegotiationStrategy.java +++ b/spring-web/src/main/java/org/springframework/web/accept/AbstractMappingContentNegotiationStrategy.java @@ -42,7 +42,6 @@ public abstract class AbstractMappingContentNegotiationStrategy extends MappingM super(mediaTypes); } - @Override public List resolveMediaTypes(NativeWebRequest webRequest) { String key = getMediaTypeKey(webRequest); if (StringUtils.hasText(key)) { diff --git a/spring-web/src/main/java/org/springframework/web/accept/ContentNegotiationManager.java b/spring-web/src/main/java/org/springframework/web/accept/ContentNegotiationManager.java index 6a7d17c35a..961ffdcc72 100644 --- a/spring-web/src/main/java/org/springframework/web/accept/ContentNegotiationManager.java +++ b/spring-web/src/main/java/org/springframework/web/accept/ContentNegotiationManager.java @@ -97,7 +97,6 @@ public class ContentNegotiationManager implements ContentNegotiationStrategy, Me * @return the requested media types or an empty list, never {@code null} * @throws HttpMediaTypeNotAcceptableException if the requested media types cannot be parsed */ - @Override public List resolveMediaTypes(NativeWebRequest webRequest) throws HttpMediaTypeNotAcceptableException { for (ContentNegotiationStrategy strategy : this.contentNegotiationStrategies) { List mediaTypes = strategy.resolveMediaTypes(webRequest); @@ -112,7 +111,6 @@ public class ContentNegotiationManager implements ContentNegotiationStrategy, Me * Delegate to all configured MediaTypeFileExtensionResolver instances and aggregate * the list of all file extensions found. */ - @Override public List resolveFileExtensions(MediaType mediaType) { Set result = new LinkedHashSet(); for (MediaTypeFileExtensionResolver resolver : this.fileExtensionResolvers) { @@ -125,7 +123,6 @@ public class ContentNegotiationManager implements ContentNegotiationStrategy, Me * Delegate to all configured MediaTypeFileExtensionResolver instances and aggregate * the list of all known file extensions. */ - @Override public List getAllFileExtensions() { Set result = new LinkedHashSet(); for (MediaTypeFileExtensionResolver resolver : this.fileExtensionResolvers) { diff --git a/spring-web/src/main/java/org/springframework/web/accept/ContentNegotiationManagerFactoryBean.java b/spring-web/src/main/java/org/springframework/web/accept/ContentNegotiationManagerFactoryBean.java index f230f1c7f0..8b805802d2 100644 --- a/spring-web/src/main/java/org/springframework/web/accept/ContentNegotiationManagerFactoryBean.java +++ b/spring-web/src/main/java/org/springframework/web/accept/ContentNegotiationManagerFactoryBean.java @@ -150,12 +150,10 @@ public class ContentNegotiationManagerFactoryBean this.defaultContentType = defaultContentType; } - @Override public void setServletContext(ServletContext servletContext) { this.servletContext = servletContext; } - @Override public void afterPropertiesSet() throws Exception { List strategies = new ArrayList(); @@ -194,17 +192,14 @@ public class ContentNegotiationManagerFactoryBean this.contentNegotiationManager = new ContentNegotiationManager(array); } - @Override public Class getObjectType() { return ContentNegotiationManager.class; } - @Override public boolean isSingleton() { return true; } - @Override public ContentNegotiationManager getObject() throws Exception { return this.contentNegotiationManager; } diff --git a/spring-web/src/main/java/org/springframework/web/accept/FixedContentNegotiationStrategy.java b/spring-web/src/main/java/org/springframework/web/accept/FixedContentNegotiationStrategy.java index 5180154dd2..84ac58cfee 100644 --- a/spring-web/src/main/java/org/springframework/web/accept/FixedContentNegotiationStrategy.java +++ b/spring-web/src/main/java/org/springframework/web/accept/FixedContentNegotiationStrategy.java @@ -43,7 +43,6 @@ public class FixedContentNegotiationStrategy implements ContentNegotiationStrate this.defaultContentType = defaultContentType; } - @Override public List resolveMediaTypes(NativeWebRequest webRequest) { if (logger.isDebugEnabled()) { logger.debug("Requested media types is " + this.defaultContentType + " (based on default MediaType)"); diff --git a/spring-web/src/main/java/org/springframework/web/accept/HeaderContentNegotiationStrategy.java b/spring-web/src/main/java/org/springframework/web/accept/HeaderContentNegotiationStrategy.java index 1cfcd67e5d..ef84fb179d 100644 --- a/spring-web/src/main/java/org/springframework/web/accept/HeaderContentNegotiationStrategy.java +++ b/spring-web/src/main/java/org/springframework/web/accept/HeaderContentNegotiationStrategy.java @@ -38,7 +38,6 @@ public class HeaderContentNegotiationStrategy implements ContentNegotiationStrat * {@inheritDoc} * @throws HttpMediaTypeNotAcceptableException if the 'Accept' header cannot be parsed. */ - @Override public List resolveMediaTypes(NativeWebRequest webRequest) throws HttpMediaTypeNotAcceptableException { String acceptHeader = webRequest.getHeader(ACCEPT_HEADER); try { diff --git a/spring-web/src/main/java/org/springframework/web/accept/MappingMediaTypeFileExtensionResolver.java b/spring-web/src/main/java/org/springframework/web/accept/MappingMediaTypeFileExtensionResolver.java index 71e670d0fd..293f26ce7a 100644 --- a/spring-web/src/main/java/org/springframework/web/accept/MappingMediaTypeFileExtensionResolver.java +++ b/spring-web/src/main/java/org/springframework/web/accept/MappingMediaTypeFileExtensionResolver.java @@ -63,13 +63,11 @@ public class MappingMediaTypeFileExtensionResolver implements MediaTypeFileExten * Find the file extensions mapped to the given MediaType. * @return 0 or more extensions, never {@code null} */ - @Override public List resolveFileExtensions(MediaType mediaType) { List fileExtensions = this.fileExtensions.get(mediaType); return (fileExtensions != null) ? fileExtensions : Collections.emptyList(); } - @Override public List getAllFileExtensions() { return Collections.unmodifiableList(this.allFileExtensions); } diff --git a/spring-web/src/main/java/org/springframework/web/bind/EscapedErrors.java b/spring-web/src/main/java/org/springframework/web/bind/EscapedErrors.java index 3cb0b96b89..67144395e2 100644 --- a/spring-web/src/main/java/org/springframework/web/bind/EscapedErrors.java +++ b/spring-web/src/main/java/org/springframework/web/bind/EscapedErrors.java @@ -58,150 +58,121 @@ public class EscapedErrors implements Errors { } - @Override public String getObjectName() { return this.source.getObjectName(); } - @Override public void setNestedPath(String nestedPath) { this.source.setNestedPath(nestedPath); } - @Override public String getNestedPath() { return this.source.getNestedPath(); } - @Override public void pushNestedPath(String subPath) { this.source.pushNestedPath(subPath); } - @Override public void popNestedPath() throws IllegalStateException { this.source.popNestedPath(); } - @Override public void reject(String errorCode) { this.source.reject(errorCode); } - @Override public void reject(String errorCode, String defaultMessage) { this.source.reject(errorCode, defaultMessage); } - @Override public void reject(String errorCode, Object[] errorArgs, String defaultMessage) { this.source.reject(errorCode, errorArgs, defaultMessage); } - @Override public void rejectValue(String field, String errorCode) { this.source.rejectValue(field, errorCode); } - @Override public void rejectValue(String field, String errorCode, String defaultMessage) { this.source.rejectValue(field, errorCode, defaultMessage); } - @Override public void rejectValue(String field, String errorCode, Object[] errorArgs, String defaultMessage) { this.source.rejectValue(field, errorCode, errorArgs, defaultMessage); } - @Override public void addAllErrors(Errors errors) { this.source.addAllErrors(errors); } - @Override public boolean hasErrors() { return this.source.hasErrors(); } - @Override public int getErrorCount() { return this.source.getErrorCount(); } - @Override public List getAllErrors() { return escapeObjectErrors(this.source.getAllErrors()); } - @Override public boolean hasGlobalErrors() { return this.source.hasGlobalErrors(); } - @Override public int getGlobalErrorCount() { return this.source.getGlobalErrorCount(); } - @Override public List getGlobalErrors() { return escapeObjectErrors(this.source.getGlobalErrors()); } - @Override public ObjectError getGlobalError() { return escapeObjectError(this.source.getGlobalError()); } - @Override public boolean hasFieldErrors() { return this.source.hasFieldErrors(); } - @Override public int getFieldErrorCount() { return this.source.getFieldErrorCount(); } - @Override public List getFieldErrors() { return this.source.getFieldErrors(); } - @Override public FieldError getFieldError() { return this.source.getFieldError(); } - @Override public boolean hasFieldErrors(String field) { return this.source.hasFieldErrors(field); } - @Override public int getFieldErrorCount(String field) { return this.source.getFieldErrorCount(field); } - @Override public List getFieldErrors(String field) { return escapeObjectErrors(this.source.getFieldErrors(field)); } - @Override public FieldError getFieldError(String field) { return escapeObjectError(this.source.getFieldError(field)); } - @Override public Object getFieldValue(String field) { Object value = this.source.getFieldValue(field); return (value instanceof String ? HtmlUtils.htmlEscape((String) value) : value); } - @Override public Class getFieldType(String field) { return this.source.getFieldType(field); } diff --git a/spring-web/src/main/java/org/springframework/web/bind/annotation/support/HandlerMethodResolver.java b/spring-web/src/main/java/org/springframework/web/bind/annotation/support/HandlerMethodResolver.java index caada588f0..699f2aa8a2 100644 --- a/spring-web/src/main/java/org/springframework/web/bind/annotation/support/HandlerMethodResolver.java +++ b/spring-web/src/main/java/org/springframework/web/bind/annotation/support/HandlerMethodResolver.java @@ -84,7 +84,6 @@ public class HandlerMethodResolver { for (Class currentHandlerType : handlerTypes) { final Class targetClass = (specificHandlerType != null ? specificHandlerType : currentHandlerType); ReflectionUtils.doWithMethods(currentHandlerType, new ReflectionUtils.MethodCallback() { - @Override public void doWith(Method method) { Method specificMethod = ClassUtils.getMostSpecificMethod(method, targetClass); Method bridgedMethod = BridgeMethodResolver.findBridgedMethod(specificMethod); diff --git a/spring-web/src/main/java/org/springframework/web/bind/support/ConfigurableWebBindingInitializer.java b/spring-web/src/main/java/org/springframework/web/bind/support/ConfigurableWebBindingInitializer.java index 3056ad0311..8b0d4ffb27 100644 --- a/spring-web/src/main/java/org/springframework/web/bind/support/ConfigurableWebBindingInitializer.java +++ b/spring-web/src/main/java/org/springframework/web/bind/support/ConfigurableWebBindingInitializer.java @@ -181,7 +181,6 @@ public class ConfigurableWebBindingInitializer implements WebBindingInitializer } - @Override public void initBinder(WebDataBinder binder, WebRequest request) { binder.setAutoGrowNestedPaths(this.autoGrowNestedPaths); if (this.directFieldAccess) { diff --git a/spring-web/src/main/java/org/springframework/web/bind/support/DefaultDataBinderFactory.java b/spring-web/src/main/java/org/springframework/web/bind/support/DefaultDataBinderFactory.java index d673f17b2c..bab588d5a4 100644 --- a/spring-web/src/main/java/org/springframework/web/bind/support/DefaultDataBinderFactory.java +++ b/spring-web/src/main/java/org/springframework/web/bind/support/DefaultDataBinderFactory.java @@ -43,7 +43,6 @@ public class DefaultDataBinderFactory implements WebDataBinderFactory { * initialize it through a {@link WebBindingInitializer}. * @throws Exception in case of invalid state or arguments */ - @Override public final WebDataBinder createBinder(NativeWebRequest webRequest, Object target, String objectName) throws Exception { WebDataBinder dataBinder = createBinderInstance(target, objectName, webRequest); diff --git a/spring-web/src/main/java/org/springframework/web/bind/support/DefaultSessionAttributeStore.java b/spring-web/src/main/java/org/springframework/web/bind/support/DefaultSessionAttributeStore.java index 498849d608..1eeceb0e2a 100644 --- a/spring-web/src/main/java/org/springframework/web/bind/support/DefaultSessionAttributeStore.java +++ b/spring-web/src/main/java/org/springframework/web/bind/support/DefaultSessionAttributeStore.java @@ -46,7 +46,6 @@ public class DefaultSessionAttributeStore implements SessionAttributeStore { } - @Override public void storeAttribute(WebRequest request, String attributeName, Object attributeValue) { Assert.notNull(request, "WebRequest must not be null"); Assert.notNull(attributeName, "Attribute name must not be null"); @@ -55,7 +54,6 @@ public class DefaultSessionAttributeStore implements SessionAttributeStore { request.setAttribute(storeAttributeName, attributeValue, WebRequest.SCOPE_SESSION); } - @Override public Object retrieveAttribute(WebRequest request, String attributeName) { Assert.notNull(request, "WebRequest must not be null"); Assert.notNull(attributeName, "Attribute name must not be null"); @@ -63,7 +61,6 @@ public class DefaultSessionAttributeStore implements SessionAttributeStore { return request.getAttribute(storeAttributeName, WebRequest.SCOPE_SESSION); } - @Override public void cleanupAttribute(WebRequest request, String attributeName) { Assert.notNull(request, "WebRequest must not be null"); Assert.notNull(attributeName, "Attribute name must not be null"); diff --git a/spring-web/src/main/java/org/springframework/web/bind/support/SimpleSessionStatus.java b/spring-web/src/main/java/org/springframework/web/bind/support/SimpleSessionStatus.java index 7f20bf4e8f..f9d1d7c102 100644 --- a/spring-web/src/main/java/org/springframework/web/bind/support/SimpleSessionStatus.java +++ b/spring-web/src/main/java/org/springframework/web/bind/support/SimpleSessionStatus.java @@ -28,12 +28,10 @@ public class SimpleSessionStatus implements SessionStatus { private boolean complete = false; - @Override public void setComplete() { this.complete = true; } - @Override public boolean isComplete() { return this.complete; } diff --git a/spring-web/src/main/java/org/springframework/web/client/DefaultResponseErrorHandler.java b/spring-web/src/main/java/org/springframework/web/client/DefaultResponseErrorHandler.java index 45eb677ea9..bdb8e616d6 100644 --- a/spring-web/src/main/java/org/springframework/web/client/DefaultResponseErrorHandler.java +++ b/spring-web/src/main/java/org/springframework/web/client/DefaultResponseErrorHandler.java @@ -45,7 +45,6 @@ public class DefaultResponseErrorHandler implements ResponseErrorHandler { /** * Delegates to {@link #hasError(HttpStatus)} with the response status code. */ - @Override public boolean hasError(ClientHttpResponse response) throws IOException { return hasError(getHttpStatusCode(response)); } @@ -82,7 +81,6 @@ public class DefaultResponseErrorHandler implements ResponseErrorHandler { * if it is {@link org.springframework.http.HttpStatus.Series#SERVER_ERROR}, * and a {@link RestClientException} in other cases. */ - @Override public void handleError(ClientHttpResponse response) throws IOException { HttpStatus statusCode = getHttpStatusCode(response); switch (statusCode.series()) { diff --git a/spring-web/src/main/java/org/springframework/web/client/HttpMessageConverterExtractor.java b/spring-web/src/main/java/org/springframework/web/client/HttpMessageConverterExtractor.java index 4fc24562a2..b4232ff47c 100644 --- a/spring-web/src/main/java/org/springframework/web/client/HttpMessageConverterExtractor.java +++ b/spring-web/src/main/java/org/springframework/web/client/HttpMessageConverterExtractor.java @@ -76,7 +76,6 @@ public class HttpMessageConverterExtractor implements ResponseExtractor { this.logger = logger; } - @Override @SuppressWarnings("unchecked") public T extractData(ClientHttpResponse response) throws IOException { if (!hasMessageBody(response)) { diff --git a/spring-web/src/main/java/org/springframework/web/client/RestTemplate.java b/spring-web/src/main/java/org/springframework/web/client/RestTemplate.java index 91cdfabb44..cd729964f4 100644 --- a/spring-web/src/main/java/org/springframework/web/client/RestTemplate.java +++ b/spring-web/src/main/java/org/springframework/web/client/RestTemplate.java @@ -207,7 +207,6 @@ public class RestTemplate extends InterceptingHttpAccessor implements RestOperat // GET - @Override public T getForObject(String url, Class responseType, Object... urlVariables) throws RestClientException { AcceptHeaderRequestCallback requestCallback = new AcceptHeaderRequestCallback(responseType); HttpMessageConverterExtractor responseExtractor = @@ -215,7 +214,6 @@ public class RestTemplate extends InterceptingHttpAccessor implements RestOperat return execute(url, HttpMethod.GET, requestCallback, responseExtractor, urlVariables); } - @Override public T getForObject(String url, Class responseType, Map urlVariables) throws RestClientException { AcceptHeaderRequestCallback requestCallback = new AcceptHeaderRequestCallback(responseType); HttpMessageConverterExtractor responseExtractor = @@ -223,7 +221,6 @@ public class RestTemplate extends InterceptingHttpAccessor implements RestOperat return execute(url, HttpMethod.GET, requestCallback, responseExtractor, urlVariables); } - @Override public T getForObject(URI url, Class responseType) throws RestClientException { AcceptHeaderRequestCallback requestCallback = new AcceptHeaderRequestCallback(responseType); HttpMessageConverterExtractor responseExtractor = @@ -231,7 +228,6 @@ public class RestTemplate extends InterceptingHttpAccessor implements RestOperat return execute(url, HttpMethod.GET, requestCallback, responseExtractor); } - @Override public ResponseEntity getForEntity(String url, Class responseType, Object... urlVariables) throws RestClientException { AcceptHeaderRequestCallback requestCallback = new AcceptHeaderRequestCallback(responseType); @@ -240,7 +236,6 @@ public class RestTemplate extends InterceptingHttpAccessor implements RestOperat return execute(url, HttpMethod.GET, requestCallback, responseExtractor, urlVariables); } - @Override public ResponseEntity getForEntity(String url, Class responseType, Map urlVariables) throws RestClientException { AcceptHeaderRequestCallback requestCallback = new AcceptHeaderRequestCallback(responseType); @@ -249,7 +244,6 @@ public class RestTemplate extends InterceptingHttpAccessor implements RestOperat return execute(url, HttpMethod.GET, requestCallback, responseExtractor, urlVariables); } - @Override public ResponseEntity getForEntity(URI url, Class responseType) throws RestClientException { AcceptHeaderRequestCallback requestCallback = new AcceptHeaderRequestCallback(responseType); ResponseEntityResponseExtractor responseExtractor = @@ -259,31 +253,26 @@ public class RestTemplate extends InterceptingHttpAccessor implements RestOperat // HEAD - @Override public HttpHeaders headForHeaders(String url, Object... urlVariables) throws RestClientException { return execute(url, HttpMethod.HEAD, null, this.headersExtractor, urlVariables); } - @Override public HttpHeaders headForHeaders(String url, Map urlVariables) throws RestClientException { return execute(url, HttpMethod.HEAD, null, this.headersExtractor, urlVariables); } - @Override public HttpHeaders headForHeaders(URI url) throws RestClientException { return execute(url, HttpMethod.HEAD, null, this.headersExtractor); } // POST - @Override public URI postForLocation(String url, Object request, Object... urlVariables) throws RestClientException { HttpEntityRequestCallback requestCallback = new HttpEntityRequestCallback(request); HttpHeaders headers = execute(url, HttpMethod.POST, requestCallback, this.headersExtractor, urlVariables); return headers.getLocation(); } - @Override public URI postForLocation(String url, Object request, Map urlVariables) throws RestClientException { HttpEntityRequestCallback requestCallback = new HttpEntityRequestCallback(request); @@ -291,14 +280,12 @@ public class RestTemplate extends InterceptingHttpAccessor implements RestOperat return headers.getLocation(); } - @Override public URI postForLocation(URI url, Object request) throws RestClientException { HttpEntityRequestCallback requestCallback = new HttpEntityRequestCallback(request); HttpHeaders headers = execute(url, HttpMethod.POST, requestCallback, this.headersExtractor); return headers.getLocation(); } - @Override public T postForObject(String url, Object request, Class responseType, Object... uriVariables) throws RestClientException { HttpEntityRequestCallback requestCallback = new HttpEntityRequestCallback(request, responseType); @@ -307,7 +294,6 @@ public class RestTemplate extends InterceptingHttpAccessor implements RestOperat return execute(url, HttpMethod.POST, requestCallback, responseExtractor, uriVariables); } - @Override public T postForObject(String url, Object request, Class responseType, Map uriVariables) throws RestClientException { HttpEntityRequestCallback requestCallback = new HttpEntityRequestCallback(request, responseType); @@ -316,7 +302,6 @@ public class RestTemplate extends InterceptingHttpAccessor implements RestOperat return execute(url, HttpMethod.POST, requestCallback, responseExtractor, uriVariables); } - @Override public T postForObject(URI url, Object request, Class responseType) throws RestClientException { HttpEntityRequestCallback requestCallback = new HttpEntityRequestCallback(request, responseType); HttpMessageConverterExtractor responseExtractor = @@ -324,7 +309,6 @@ public class RestTemplate extends InterceptingHttpAccessor implements RestOperat return execute(url, HttpMethod.POST, requestCallback, responseExtractor); } - @Override public ResponseEntity postForEntity(String url, Object request, Class responseType, Object... uriVariables) throws RestClientException { HttpEntityRequestCallback requestCallback = new HttpEntityRequestCallback(request, responseType); @@ -333,7 +317,6 @@ public class RestTemplate extends InterceptingHttpAccessor implements RestOperat return execute(url, HttpMethod.POST, requestCallback, responseExtractor, uriVariables); } - @Override public ResponseEntity postForEntity(String url, Object request, Class responseType, @@ -345,7 +328,6 @@ public class RestTemplate extends InterceptingHttpAccessor implements RestOperat return execute(url, HttpMethod.POST, requestCallback, responseExtractor, uriVariables); } - @Override public ResponseEntity postForEntity(URI url, Object request, Class responseType) throws RestClientException { HttpEntityRequestCallback requestCallback = new HttpEntityRequestCallback(request, responseType); ResponseEntityResponseExtractor responseExtractor = @@ -355,19 +337,16 @@ public class RestTemplate extends InterceptingHttpAccessor implements RestOperat // PUT - @Override public void put(String url, Object request, Object... urlVariables) throws RestClientException { HttpEntityRequestCallback requestCallback = new HttpEntityRequestCallback(request); execute(url, HttpMethod.PUT, requestCallback, null, urlVariables); } - @Override public void put(String url, Object request, Map urlVariables) throws RestClientException { HttpEntityRequestCallback requestCallback = new HttpEntityRequestCallback(request); execute(url, HttpMethod.PUT, requestCallback, null, urlVariables); } - @Override public void put(URI url, Object request) throws RestClientException { HttpEntityRequestCallback requestCallback = new HttpEntityRequestCallback(request); execute(url, HttpMethod.PUT, requestCallback, null); @@ -375,36 +354,30 @@ public class RestTemplate extends InterceptingHttpAccessor implements RestOperat // DELETE - @Override public void delete(String url, Object... urlVariables) throws RestClientException { execute(url, HttpMethod.DELETE, null, null, urlVariables); } - @Override public void delete(String url, Map urlVariables) throws RestClientException { execute(url, HttpMethod.DELETE, null, null, urlVariables); } - @Override public void delete(URI url) throws RestClientException { execute(url, HttpMethod.DELETE, null, null); } // OPTIONS - @Override public Set optionsForAllow(String url, Object... urlVariables) throws RestClientException { HttpHeaders headers = execute(url, HttpMethod.OPTIONS, null, this.headersExtractor, urlVariables); return headers.getAllow(); } - @Override public Set optionsForAllow(String url, Map urlVariables) throws RestClientException { HttpHeaders headers = execute(url, HttpMethod.OPTIONS, null, this.headersExtractor, urlVariables); return headers.getAllow(); } - @Override public Set optionsForAllow(URI url) throws RestClientException { HttpHeaders headers = execute(url, HttpMethod.OPTIONS, null, this.headersExtractor); return headers.getAllow(); @@ -412,7 +385,6 @@ public class RestTemplate extends InterceptingHttpAccessor implements RestOperat // exchange - @Override public ResponseEntity exchange(String url, HttpMethod method, HttpEntity requestEntity, Class responseType, Object... uriVariables) throws RestClientException { @@ -421,7 +393,6 @@ public class RestTemplate extends InterceptingHttpAccessor implements RestOperat return execute(url, method, requestCallback, responseExtractor, uriVariables); } - @Override public ResponseEntity exchange(String url, HttpMethod method, HttpEntity requestEntity, Class responseType, Map uriVariables) throws RestClientException { @@ -430,7 +401,6 @@ public class RestTemplate extends InterceptingHttpAccessor implements RestOperat return execute(url, method, requestCallback, responseExtractor, uriVariables); } - @Override public ResponseEntity exchange(URI url, HttpMethod method, HttpEntity requestEntity, Class responseType) throws RestClientException { @@ -439,7 +409,6 @@ public class RestTemplate extends InterceptingHttpAccessor implements RestOperat return execute(url, method, requestCallback, responseExtractor); } - @Override public ResponseEntity exchange(String url, HttpMethod method, HttpEntity requestEntity, ParameterizedTypeReference responseType, Object... uriVariables) throws RestClientException { @@ -449,7 +418,6 @@ public class RestTemplate extends InterceptingHttpAccessor implements RestOperat return execute(url, method, requestCallback, responseExtractor, uriVariables); } - @Override public ResponseEntity exchange(String url, HttpMethod method, HttpEntity requestEntity, ParameterizedTypeReference responseType, Map uriVariables) throws RestClientException { @@ -459,7 +427,6 @@ public class RestTemplate extends InterceptingHttpAccessor implements RestOperat return execute(url, method, requestCallback, responseExtractor, uriVariables); } - @Override public ResponseEntity exchange(URI url, HttpMethod method, HttpEntity requestEntity, ParameterizedTypeReference responseType) throws RestClientException { @@ -471,7 +438,6 @@ public class RestTemplate extends InterceptingHttpAccessor implements RestOperat // general execution - @Override public T execute(String url, HttpMethod method, RequestCallback requestCallback, ResponseExtractor responseExtractor, Object... urlVariables) throws RestClientException { @@ -480,7 +446,6 @@ public class RestTemplate extends InterceptingHttpAccessor implements RestOperat return doExecute(expanded, method, requestCallback, responseExtractor); } - @Override public T execute(String url, HttpMethod method, RequestCallback requestCallback, ResponseExtractor responseExtractor, Map urlVariables) throws RestClientException { @@ -489,7 +454,6 @@ public class RestTemplate extends InterceptingHttpAccessor implements RestOperat return doExecute(expanded, method, requestCallback, responseExtractor); } - @Override public T execute(URI url, HttpMethod method, RequestCallback requestCallback, ResponseExtractor responseExtractor) throws RestClientException { @@ -580,7 +544,6 @@ public class RestTemplate extends InterceptingHttpAccessor implements RestOperat this.responseType = responseType; } - @Override @SuppressWarnings("unchecked") public void doWithRequest(ClientHttpRequest request) throws IOException { if (responseType != null) { @@ -719,7 +682,6 @@ public class RestTemplate extends InterceptingHttpAccessor implements RestOperat } } - @Override public ResponseEntity extractData(ClientHttpResponse response) throws IOException { if (delegate != null) { T body = delegate.extractData(response); @@ -737,7 +699,6 @@ public class RestTemplate extends InterceptingHttpAccessor implements RestOperat */ private static class HeadersExtractor implements ResponseExtractor { - @Override public HttpHeaders extractData(ClientHttpResponse response) throws IOException { return response.getHeaders(); } diff --git a/spring-web/src/main/java/org/springframework/web/context/AbstractContextLoaderInitializer.java b/spring-web/src/main/java/org/springframework/web/context/AbstractContextLoaderInitializer.java index 486da7952a..54defc908f 100644 --- a/spring-web/src/main/java/org/springframework/web/context/AbstractContextLoaderInitializer.java +++ b/spring-web/src/main/java/org/springframework/web/context/AbstractContextLoaderInitializer.java @@ -41,7 +41,6 @@ public abstract class AbstractContextLoaderInitializer implements WebApplication /** Logger available to subclasses. */ protected final Log logger = LogFactory.getLog(getClass()); - @Override public void onStartup(ServletContext servletContext) throws ServletException { this.registerContextLoaderListener(servletContext); } diff --git a/spring-web/src/main/java/org/springframework/web/context/ConfigurableWebApplicationContext.java b/spring-web/src/main/java/org/springframework/web/context/ConfigurableWebApplicationContext.java index 1712408562..a6185a81e8 100644 --- a/spring-web/src/main/java/org/springframework/web/context/ConfigurableWebApplicationContext.java +++ b/spring-web/src/main/java/org/springframework/web/context/ConfigurableWebApplicationContext.java @@ -74,7 +74,6 @@ public interface ConfigurableWebApplicationContext extends WebApplicationContext /** * Return the {@link ConfigurableWebEnvironment} used by this web application context. */ - @Override ConfigurableWebEnvironment getEnvironment(); /** diff --git a/spring-web/src/main/java/org/springframework/web/context/ContextCleanupListener.java b/spring-web/src/main/java/org/springframework/web/context/ContextCleanupListener.java index 677ea452b1..2e1956cb2b 100644 --- a/spring-web/src/main/java/org/springframework/web/context/ContextCleanupListener.java +++ b/spring-web/src/main/java/org/springframework/web/context/ContextCleanupListener.java @@ -43,11 +43,9 @@ public class ContextCleanupListener implements ServletContextListener { private static final Log logger = LogFactory.getLog(ContextCleanupListener.class); - @Override public void contextInitialized(ServletContextEvent event) { } - @Override public void contextDestroyed(ServletContextEvent event) { cleanupAttributes(event.getServletContext()); } diff --git a/spring-web/src/main/java/org/springframework/web/context/ContextLoaderListener.java b/spring-web/src/main/java/org/springframework/web/context/ContextLoaderListener.java index 1e03001c99..279fd71636 100644 --- a/spring-web/src/main/java/org/springframework/web/context/ContextLoaderListener.java +++ b/spring-web/src/main/java/org/springframework/web/context/ContextLoaderListener.java @@ -104,7 +104,6 @@ public class ContextLoaderListener extends ContextLoader implements ServletConte /** * Initialize the root web application context. */ - @Override public void contextInitialized(ServletContextEvent event) { this.contextLoader = createContextLoader(); if (this.contextLoader == null) { @@ -139,7 +138,6 @@ public class ContextLoaderListener extends ContextLoader implements ServletConte /** * Close the root web application context. */ - @Override public void contextDestroyed(ServletContextEvent event) { if (this.contextLoader != null) { this.contextLoader.closeWebApplicationContext(event.getServletContext()); diff --git a/spring-web/src/main/java/org/springframework/web/context/request/AbstractRequestAttributesScope.java b/spring-web/src/main/java/org/springframework/web/context/request/AbstractRequestAttributesScope.java index 0132583726..155eadeb7e 100644 --- a/spring-web/src/main/java/org/springframework/web/context/request/AbstractRequestAttributesScope.java +++ b/spring-web/src/main/java/org/springframework/web/context/request/AbstractRequestAttributesScope.java @@ -36,7 +36,6 @@ import org.springframework.beans.factory.config.Scope; */ public abstract class AbstractRequestAttributesScope implements Scope { - @Override public Object get(String name, ObjectFactory objectFactory) { RequestAttributes attributes = RequestContextHolder.currentRequestAttributes(); Object scopedObject = attributes.getAttribute(name, getScope()); @@ -47,7 +46,6 @@ public abstract class AbstractRequestAttributesScope implements Scope { return scopedObject; } - @Override public Object remove(String name) { RequestAttributes attributes = RequestContextHolder.currentRequestAttributes(); Object scopedObject = attributes.getAttribute(name, getScope()); @@ -60,13 +58,11 @@ public abstract class AbstractRequestAttributesScope implements Scope { } } - @Override public void registerDestructionCallback(String name, Runnable callback) { RequestAttributes attributes = RequestContextHolder.currentRequestAttributes(); attributes.registerDestructionCallback(name, callback, getScope()); } - @Override public Object resolveContextualObject(String key) { RequestAttributes attributes = RequestContextHolder.currentRequestAttributes(); return attributes.resolveReference(key); diff --git a/spring-web/src/main/java/org/springframework/web/context/request/DestructionCallbackBindingListener.java b/spring-web/src/main/java/org/springframework/web/context/request/DestructionCallbackBindingListener.java index f1467553b8..27202c36be 100644 --- a/spring-web/src/main/java/org/springframework/web/context/request/DestructionCallbackBindingListener.java +++ b/spring-web/src/main/java/org/springframework/web/context/request/DestructionCallbackBindingListener.java @@ -45,11 +45,9 @@ public class DestructionCallbackBindingListener implements HttpSessionBindingLis } - @Override public void valueBound(HttpSessionBindingEvent event) { } - @Override public void valueUnbound(HttpSessionBindingEvent event) { this.destructionCallback.run(); } diff --git a/spring-web/src/main/java/org/springframework/web/context/request/FacesRequestAttributes.java b/spring-web/src/main/java/org/springframework/web/context/request/FacesRequestAttributes.java index 32f4585234..8570211fa3 100644 --- a/spring-web/src/main/java/org/springframework/web/context/request/FacesRequestAttributes.java +++ b/spring-web/src/main/java/org/springframework/web/context/request/FacesRequestAttributes.java @@ -106,7 +106,6 @@ public class FacesRequestAttributes implements RequestAttributes { } - @Override public Object getAttribute(String name, int scope) { if (scope == SCOPE_GLOBAL_SESSION && portletApiPresent) { return PortletSessionAccessor.getAttribute(name, getExternalContext()); @@ -116,7 +115,6 @@ public class FacesRequestAttributes implements RequestAttributes { } } - @Override public void setAttribute(String name, Object value, int scope) { if (scope == SCOPE_GLOBAL_SESSION && portletApiPresent) { PortletSessionAccessor.setAttribute(name, value, getExternalContext()); @@ -126,7 +124,6 @@ public class FacesRequestAttributes implements RequestAttributes { } } - @Override public void removeAttribute(String name, int scope) { if (scope == SCOPE_GLOBAL_SESSION && portletApiPresent) { PortletSessionAccessor.removeAttribute(name, getExternalContext()); @@ -136,7 +133,6 @@ public class FacesRequestAttributes implements RequestAttributes { } } - @Override public String[] getAttributeNames(int scope) { if (scope == SCOPE_GLOBAL_SESSION && portletApiPresent) { return PortletSessionAccessor.getAttributeNames(getExternalContext()); @@ -146,7 +142,6 @@ public class FacesRequestAttributes implements RequestAttributes { } } - @Override public void registerDestructionCallback(String name, Runnable callback, int scope) { if (logger.isWarnEnabled()) { logger.warn("Could not register destruction callback [" + callback + "] for attribute '" + name + @@ -154,7 +149,6 @@ public class FacesRequestAttributes implements RequestAttributes { } } - @Override public Object resolveReference(String key) { if (REFERENCE_REQUEST.equals(key)) { return getExternalContext().getRequest(); @@ -227,7 +221,6 @@ public class FacesRequestAttributes implements RequestAttributes { } } - @Override public String getSessionId() { Object session = getExternalContext().getSession(true); try { @@ -240,7 +233,6 @@ public class FacesRequestAttributes implements RequestAttributes { } } - @Override public Object getSessionMutex() { // Enforce presence of a session first to allow listeners // to create the mutex attribute, if any. diff --git a/spring-web/src/main/java/org/springframework/web/context/request/FacesWebRequest.java b/spring-web/src/main/java/org/springframework/web/context/request/FacesWebRequest.java index 940e0c9d0a..f921d2a541 100644 --- a/spring-web/src/main/java/org/springframework/web/context/request/FacesWebRequest.java +++ b/spring-web/src/main/java/org/springframework/web/context/request/FacesWebRequest.java @@ -43,17 +43,14 @@ public class FacesWebRequest extends FacesRequestAttributes implements NativeWeb } - @Override public Object getNativeRequest() { return getExternalContext().getRequest(); } - @Override public Object getNativeResponse() { return getExternalContext().getResponse(); } - @Override @SuppressWarnings("unchecked") public T getNativeRequest(Class requiredType) { if (requiredType != null) { @@ -65,7 +62,6 @@ public class FacesWebRequest extends FacesRequestAttributes implements NativeWeb return null; } - @Override @SuppressWarnings("unchecked") public T getNativeResponse(Class requiredType) { if (requiredType != null) { @@ -78,82 +74,66 @@ public class FacesWebRequest extends FacesRequestAttributes implements NativeWeb } - @Override public String getHeader(String headerName) { return getExternalContext().getRequestHeaderMap().get(headerName); } - @Override public String[] getHeaderValues(String headerName) { return getExternalContext().getRequestHeaderValuesMap().get(headerName); } - @Override public Iterator getHeaderNames() { return getExternalContext().getRequestHeaderMap().keySet().iterator(); } - @Override public String getParameter(String paramName) { return getExternalContext().getRequestParameterMap().get(paramName); } - @Override public Iterator getParameterNames() { return getExternalContext().getRequestParameterNames(); } - @Override public String[] getParameterValues(String paramName) { return getExternalContext().getRequestParameterValuesMap().get(paramName); } - @Override public Map getParameterMap() { return getExternalContext().getRequestParameterValuesMap(); } - @Override public Locale getLocale() { return getFacesContext().getExternalContext().getRequestLocale(); } - @Override public String getContextPath() { return getFacesContext().getExternalContext().getRequestContextPath(); } - @Override public String getRemoteUser() { return getFacesContext().getExternalContext().getRemoteUser(); } - @Override public Principal getUserPrincipal() { return getFacesContext().getExternalContext().getUserPrincipal(); } - @Override public boolean isUserInRole(String role) { return getFacesContext().getExternalContext().isUserInRole(role); } - @Override public boolean isSecure() { return false; } - @Override public boolean checkNotModified(long lastModifiedTimestamp) { return false; } - @Override public boolean checkNotModified(String eTag) { return false; } - @Override public String getDescription(boolean includeClientInfo) { ExternalContext externalContext = getExternalContext(); StringBuilder sb = new StringBuilder(); diff --git a/spring-web/src/main/java/org/springframework/web/context/request/Log4jNestedDiagnosticContextInterceptor.java b/spring-web/src/main/java/org/springframework/web/context/request/Log4jNestedDiagnosticContextInterceptor.java index cfc25e82f7..c369abbcaa 100644 --- a/spring-web/src/main/java/org/springframework/web/context/request/Log4jNestedDiagnosticContextInterceptor.java +++ b/spring-web/src/main/java/org/springframework/web/context/request/Log4jNestedDiagnosticContextInterceptor.java @@ -58,7 +58,6 @@ public class Log4jNestedDiagnosticContextInterceptor implements AsyncWebRequestI /** * Adds a message the Log4J NDC before the request is processed. */ - @Override public void preHandle(WebRequest request) throws Exception { NDC.push(getNestedDiagnosticContextMessage(request)); } @@ -75,14 +74,12 @@ public class Log4jNestedDiagnosticContextInterceptor implements AsyncWebRequestI return request.getDescription(isIncludeClientInfo()); } - @Override public void postHandle(WebRequest request, ModelMap model) throws Exception { } /** * Removes the log message from the Log4J NDC after the request is processed. */ - @Override public void afterCompletion(WebRequest request, Exception ex) throws Exception { NDC.pop(); if (NDC.getDepth() == 0) { @@ -94,7 +91,6 @@ public class Log4jNestedDiagnosticContextInterceptor implements AsyncWebRequestI * Removes the log message from the Log4J NDC when the processing thread is * exited after the start of asynchronous request handling. */ - @Override public void afterConcurrentHandlingStarted(WebRequest request) { NDC.pop(); if (NDC.getDepth() == 0) { diff --git a/spring-web/src/main/java/org/springframework/web/context/request/RequestContextListener.java b/spring-web/src/main/java/org/springframework/web/context/request/RequestContextListener.java index 1316d29694..6c8ff6de88 100644 --- a/spring-web/src/main/java/org/springframework/web/context/request/RequestContextListener.java +++ b/spring-web/src/main/java/org/springframework/web/context/request/RequestContextListener.java @@ -49,7 +49,6 @@ public class RequestContextListener implements ServletRequestListener { RequestContextListener.class.getName() + ".REQUEST_ATTRIBUTES"; - @Override public void requestInitialized(ServletRequestEvent requestEvent) { if (!(requestEvent.getServletRequest() instanceof HttpServletRequest)) { throw new IllegalArgumentException( @@ -62,7 +61,6 @@ public class RequestContextListener implements ServletRequestListener { RequestContextHolder.setRequestAttributes(attributes); } - @Override public void requestDestroyed(ServletRequestEvent requestEvent) { ServletRequestAttributes attributes = (ServletRequestAttributes) requestEvent.getServletRequest().getAttribute(REQUEST_ATTRIBUTES_ATTRIBUTE); diff --git a/spring-web/src/main/java/org/springframework/web/context/request/RequestScope.java b/spring-web/src/main/java/org/springframework/web/context/request/RequestScope.java index 370a3ee841..b95814a00e 100644 --- a/spring-web/src/main/java/org/springframework/web/context/request/RequestScope.java +++ b/spring-web/src/main/java/org/springframework/web/context/request/RequestScope.java @@ -52,7 +52,6 @@ public class RequestScope extends AbstractRequestAttributesScope { * There is no conversation id concept for a request, so this method * returns {@code null}. */ - @Override public String getConversationId() { return null; } diff --git a/spring-web/src/main/java/org/springframework/web/context/request/ServletRequestAttributes.java b/spring-web/src/main/java/org/springframework/web/context/request/ServletRequestAttributes.java index 35c06593f1..6f8331f05f 100644 --- a/spring-web/src/main/java/org/springframework/web/context/request/ServletRequestAttributes.java +++ b/spring-web/src/main/java/org/springframework/web/context/request/ServletRequestAttributes.java @@ -89,7 +89,6 @@ public class ServletRequestAttributes extends AbstractRequestAttributes { } - @Override public Object getAttribute(String name, int scope) { if (scope == SCOPE_REQUEST) { if (!isRequestActive()) { @@ -118,7 +117,6 @@ public class ServletRequestAttributes extends AbstractRequestAttributes { } } - @Override public void setAttribute(String name, Object value, int scope) { if (scope == SCOPE_REQUEST) { if (!isRequestActive()) { @@ -136,7 +134,6 @@ public class ServletRequestAttributes extends AbstractRequestAttributes { } } - @Override public void removeAttribute(String name, int scope) { if (scope == SCOPE_REQUEST) { if (isRequestActive()) { @@ -162,7 +159,6 @@ public class ServletRequestAttributes extends AbstractRequestAttributes { } } - @Override public String[] getAttributeNames(int scope) { if (scope == SCOPE_REQUEST) { if (!isRequestActive()) { @@ -185,7 +181,6 @@ public class ServletRequestAttributes extends AbstractRequestAttributes { } } - @Override public void registerDestructionCallback(String name, Runnable callback, int scope) { if (scope == SCOPE_REQUEST) { registerRequestDestructionCallback(name, callback); @@ -195,7 +190,6 @@ public class ServletRequestAttributes extends AbstractRequestAttributes { } } - @Override public Object resolveReference(String key) { if (REFERENCE_REQUEST.equals(key)) { return this.request; @@ -208,12 +202,10 @@ public class ServletRequestAttributes extends AbstractRequestAttributes { } } - @Override public String getSessionId() { return getSession(true).getId(); } - @Override public Object getSessionMutex() { return WebUtils.getSessionMutex(getSession(true)); } diff --git a/spring-web/src/main/java/org/springframework/web/context/request/ServletWebRequest.java b/spring-web/src/main/java/org/springframework/web/context/request/ServletWebRequest.java index 12ef426339..ca6318f344 100644 --- a/spring-web/src/main/java/org/springframework/web/context/request/ServletWebRequest.java +++ b/spring-web/src/main/java/org/springframework/web/context/request/ServletWebRequest.java @@ -79,94 +79,76 @@ public class ServletWebRequest extends ServletRequestAttributes implements Nativ return this.response; } - @Override public Object getNativeRequest() { return getRequest(); } - @Override public Object getNativeResponse() { return getResponse(); } - @Override public T getNativeRequest(Class requiredType) { return WebUtils.getNativeRequest(getRequest(), requiredType); } - @Override public T getNativeResponse(Class requiredType) { return WebUtils.getNativeResponse(getResponse(), requiredType); } - @Override public String getHeader(String headerName) { return getRequest().getHeader(headerName); } - @Override public String[] getHeaderValues(String headerName) { String[] headerValues = StringUtils.toStringArray(getRequest().getHeaders(headerName)); return (!ObjectUtils.isEmpty(headerValues) ? headerValues : null); } - @Override public Iterator getHeaderNames() { return CollectionUtils.toIterator(getRequest().getHeaderNames()); } - @Override public String getParameter(String paramName) { return getRequest().getParameter(paramName); } - @Override public String[] getParameterValues(String paramName) { return getRequest().getParameterValues(paramName); } - @Override public Iterator getParameterNames() { return CollectionUtils.toIterator(getRequest().getParameterNames()); } - @Override public Map getParameterMap() { return getRequest().getParameterMap(); } - @Override public Locale getLocale() { return getRequest().getLocale(); } - @Override public String getContextPath() { return getRequest().getContextPath(); } - @Override public String getRemoteUser() { return getRequest().getRemoteUser(); } - @Override public Principal getUserPrincipal() { return getRequest().getUserPrincipal(); } - @Override public boolean isUserInRole(String role) { return getRequest().isUserInRole(role); } - @Override public boolean isSecure() { return getRequest().isSecure(); } - @Override public boolean checkNotModified(long lastModifiedTimestamp) { if (lastModifiedTimestamp >= 0 && !this.notModified && (this.response == null || !this.response.containsHeader(HEADER_LAST_MODIFIED))) { @@ -184,7 +166,6 @@ public class ServletWebRequest extends ServletRequestAttributes implements Nativ return this.notModified; } - @Override public boolean checkNotModified(String eTag) { if (StringUtils.hasLength(eTag) && !this.notModified && (this.response == null || !this.response.containsHeader(HEADER_ETAG))) { @@ -207,7 +188,6 @@ public class ServletWebRequest extends ServletRequestAttributes implements Nativ return this.notModified; } - @Override public String getDescription(boolean includeClientInfo) { HttpServletRequest request = getRequest(); StringBuilder sb = new StringBuilder(); diff --git a/spring-web/src/main/java/org/springframework/web/context/request/SessionScope.java b/spring-web/src/main/java/org/springframework/web/context/request/SessionScope.java index 1696c1fcf4..19bcb0d772 100644 --- a/spring-web/src/main/java/org/springframework/web/context/request/SessionScope.java +++ b/spring-web/src/main/java/org/springframework/web/context/request/SessionScope.java @@ -81,7 +81,6 @@ public class SessionScope extends AbstractRequestAttributesScope { return this.scope; } - @Override public String getConversationId() { return RequestContextHolder.currentRequestAttributes().getSessionId(); } diff --git a/spring-web/src/main/java/org/springframework/web/context/request/async/CallableProcessingInterceptorAdapter.java b/spring-web/src/main/java/org/springframework/web/context/request/async/CallableProcessingInterceptorAdapter.java index 36689b1e42..264e44237f 100644 --- a/spring-web/src/main/java/org/springframework/web/context/request/async/CallableProcessingInterceptorAdapter.java +++ b/spring-web/src/main/java/org/springframework/web/context/request/async/CallableProcessingInterceptorAdapter.java @@ -32,21 +32,18 @@ public abstract class CallableProcessingInterceptorAdapter implements CallablePr /** * This implementation is empty. */ - @Override public void beforeConcurrentHandling(NativeWebRequest request, Callable task) throws Exception { } /** * This implementation is empty. */ - @Override public void preProcess(NativeWebRequest request, Callable task) throws Exception { } /** * This implementation is empty. */ - @Override public void postProcess(NativeWebRequest request, Callable task, Object concurrentResult) throws Exception { } @@ -54,7 +51,6 @@ public abstract class CallableProcessingInterceptorAdapter implements CallablePr * This implementation always returns * {@link CallableProcessingInterceptor#RESULT_NONE RESULT_NONE}. */ - @Override public Object handleTimeout(NativeWebRequest request, Callable task) throws Exception { return RESULT_NONE; } @@ -62,7 +58,6 @@ public abstract class CallableProcessingInterceptorAdapter implements CallablePr /** * This implementation is empty. */ - @Override public void afterCompletion(NativeWebRequest request, Callable task) throws Exception { } diff --git a/spring-web/src/main/java/org/springframework/web/context/request/async/DeferredResultProcessingInterceptorAdapter.java b/spring-web/src/main/java/org/springframework/web/context/request/async/DeferredResultProcessingInterceptorAdapter.java index 42409c6fe2..774761bdb6 100644 --- a/spring-web/src/main/java/org/springframework/web/context/request/async/DeferredResultProcessingInterceptorAdapter.java +++ b/spring-web/src/main/java/org/springframework/web/context/request/async/DeferredResultProcessingInterceptorAdapter.java @@ -30,21 +30,18 @@ public abstract class DeferredResultProcessingInterceptorAdapter implements Defe /** * This implementation is empty. */ - @Override public void beforeConcurrentHandling(NativeWebRequest request, DeferredResult deferredResult) throws Exception { } /** * This implementation is empty. */ - @Override public void preProcess(NativeWebRequest request, DeferredResult deferredResult) throws Exception { } /** * This implementation is empty. */ - @Override public void postProcess(NativeWebRequest request, DeferredResult deferredResult, Object concurrentResult) throws Exception { } @@ -52,7 +49,6 @@ public abstract class DeferredResultProcessingInterceptorAdapter implements Defe /** * This implementation returns {@code true} by default. */ - @Override public boolean handleTimeout(NativeWebRequest request, DeferredResult deferredResult) throws Exception { return true; } @@ -60,7 +56,6 @@ public abstract class DeferredResultProcessingInterceptorAdapter implements Defe /** * This implementation is empty. */ - @Override public void afterCompletion(NativeWebRequest request, DeferredResult deferredResult) throws Exception { } diff --git a/spring-web/src/main/java/org/springframework/web/context/request/async/NoSupportAsyncWebRequest.java b/spring-web/src/main/java/org/springframework/web/context/request/async/NoSupportAsyncWebRequest.java index 5fa0f94a79..6158a82931 100644 --- a/spring-web/src/main/java/org/springframework/web/context/request/async/NoSupportAsyncWebRequest.java +++ b/spring-web/src/main/java/org/springframework/web/context/request/async/NoSupportAsyncWebRequest.java @@ -33,39 +33,32 @@ public class NoSupportAsyncWebRequest extends ServletWebRequest implements Async super(request, response); } - @Override public void addCompletionHandler(Runnable runnable) { // ignored } - @Override public void setTimeout(Long timeout) { // ignored } - @Override public void addTimeoutHandler(Runnable runnable) { // ignored } - @Override public boolean isAsyncStarted() { return false; } // Not supported - @Override public void startAsync() { throw new UnsupportedOperationException("No async support in a pre-Servlet 3.0 runtime"); } - @Override public boolean isAsyncComplete() { throw new UnsupportedOperationException("No async support in a pre-Servlet 3.0 runtime"); } - @Override public void dispatch() { throw new UnsupportedOperationException("No async support in a pre-Servlet 3.0 runtime"); } diff --git a/spring-web/src/main/java/org/springframework/web/context/request/async/StandardServletAsyncWebRequest.java b/spring-web/src/main/java/org/springframework/web/context/request/async/StandardServletAsyncWebRequest.java index abb8329dce..8e5e6d4d6b 100644 --- a/spring-web/src/main/java/org/springframework/web/context/request/async/StandardServletAsyncWebRequest.java +++ b/spring-web/src/main/java/org/springframework/web/context/request/async/StandardServletAsyncWebRequest.java @@ -68,23 +68,19 @@ public class StandardServletAsyncWebRequest extends ServletWebRequest implements *

In Servlet 3 async processing, the timeout period begins after the * container processing thread has exited. */ - @Override public void setTimeout(Long timeout) { Assert.state(!isAsyncStarted(), "Cannot change the timeout with concurrent handling in progress"); this.timeout = timeout; } - @Override public void addTimeoutHandler(Runnable timeoutHandler) { this.timeoutHandlers.add(timeoutHandler); } - @Override public void addCompletionHandler(Runnable runnable) { this.completionHandlers.add(runnable); } - @Override public boolean isAsyncStarted() { return ((this.asyncContext != null) && getRequest().isAsyncStarted()); } @@ -94,12 +90,10 @@ public class StandardServletAsyncWebRequest extends ServletWebRequest implements *

It is important to avoid use of request and response objects after async * processing has completed. Servlet containers often re-use them. */ - @Override public boolean isAsyncComplete() { return this.asyncCompleted.get(); } - @Override public void startAsync() { Assert.state(getRequest().isAsyncSupported(), "Async support must be enabled on a servlet and for all filters involved " + @@ -117,7 +111,6 @@ public class StandardServletAsyncWebRequest extends ServletWebRequest implements } } - @Override public void dispatch() { Assert.notNull(this.asyncContext, "Cannot dispatch without an AsyncContext"); this.asyncContext.dispatch(); @@ -127,22 +120,18 @@ public class StandardServletAsyncWebRequest extends ServletWebRequest implements // Implementation of AsyncListener methods // --------------------------------------------------------------------- - @Override public void onStartAsync(AsyncEvent event) throws IOException { } - @Override public void onError(AsyncEvent event) throws IOException { } - @Override public void onTimeout(AsyncEvent event) throws IOException { for (Runnable handler : this.timeoutHandlers) { handler.run(); } } - @Override public void onComplete(AsyncEvent event) throws IOException { for (Runnable handler : this.completionHandlers) { handler.run(); diff --git a/spring-web/src/main/java/org/springframework/web/context/request/async/WebAsyncManager.java b/spring-web/src/main/java/org/springframework/web/context/request/async/WebAsyncManager.java index d0582e931c..2e104d8e75 100644 --- a/spring-web/src/main/java/org/springframework/web/context/request/async/WebAsyncManager.java +++ b/spring-web/src/main/java/org/springframework/web/context/request/async/WebAsyncManager.java @@ -107,7 +107,6 @@ public final class WebAsyncManager { Assert.state(!isConcurrentHandlingStarted(), "Can't set AsyncWebRequest with concurrent handling in progress"); this.asyncWebRequest = asyncWebRequest; this.asyncWebRequest.addCompletionHandler(new Runnable() { - @Override public void run() { asyncWebRequest.removeAttribute(WebAsyncUtils.WEB_ASYNC_MANAGER_ATTRIBUTE, RequestAttributes.SCOPE_REQUEST); } @@ -292,7 +291,6 @@ public final class WebAsyncManager { final CallableInterceptorChain interceptorChain = new CallableInterceptorChain(interceptors); this.asyncWebRequest.addTimeoutHandler(new Runnable() { - @Override public void run() { logger.debug("Processing timeout"); Object result = interceptorChain.triggerAfterTimeout(asyncWebRequest, callable); @@ -303,7 +301,6 @@ public final class WebAsyncManager { }); this.asyncWebRequest.addCompletionHandler(new Runnable() { - @Override public void run() { interceptorChain.triggerAfterCompletion(asyncWebRequest, callable); } @@ -314,7 +311,6 @@ public final class WebAsyncManager { startAsyncProcessing(processingContext); this.taskExecutor.submit(new Runnable() { - @Override public void run() { Object result = null; try { @@ -386,7 +382,6 @@ public final class WebAsyncManager { final DeferredResultInterceptorChain interceptorChain = new DeferredResultInterceptorChain(interceptors); this.asyncWebRequest.addTimeoutHandler(new Runnable() { - @Override public void run() { try { interceptorChain.triggerAfterTimeout(asyncWebRequest, deferredResult); @@ -398,7 +393,6 @@ public final class WebAsyncManager { }); this.asyncWebRequest.addCompletionHandler(new Runnable() { - @Override public void run() { interceptorChain.triggerAfterCompletion(asyncWebRequest, deferredResult); } @@ -411,7 +405,6 @@ public final class WebAsyncManager { try { interceptorChain.applyPreProcess(this.asyncWebRequest, deferredResult); deferredResult.setResultHandler(new DeferredResultHandler() { - @Override public void handleResult(Object result) { result = interceptorChain.applyPostProcess(asyncWebRequest, deferredResult, result); setConcurrentResultAndDispatch(result); diff --git a/spring-web/src/main/java/org/springframework/web/context/support/AbstractRefreshableWebApplicationContext.java b/spring-web/src/main/java/org/springframework/web/context/support/AbstractRefreshableWebApplicationContext.java index 2583bb7a0f..f36bddc316 100644 --- a/spring-web/src/main/java/org/springframework/web/context/support/AbstractRefreshableWebApplicationContext.java +++ b/spring-web/src/main/java/org/springframework/web/context/support/AbstractRefreshableWebApplicationContext.java @@ -98,17 +98,14 @@ public abstract class AbstractRefreshableWebApplicationContext extends AbstractR } - @Override public void setServletContext(ServletContext servletContext) { this.servletContext = servletContext; } - @Override public ServletContext getServletContext() { return this.servletContext; } - @Override public void setServletConfig(ServletConfig servletConfig) { this.servletConfig = servletConfig; if (servletConfig != null && this.servletContext == null) { @@ -116,12 +113,10 @@ public abstract class AbstractRefreshableWebApplicationContext extends AbstractR } } - @Override public ServletConfig getServletConfig() { return this.servletConfig; } - @Override public void setNamespace(String namespace) { this.namespace = namespace; if (namespace != null) { @@ -129,7 +124,6 @@ public abstract class AbstractRefreshableWebApplicationContext extends AbstractR } } - @Override public String getNamespace() { return this.namespace; } @@ -221,7 +215,6 @@ public abstract class AbstractRefreshableWebApplicationContext extends AbstractR this.getEnvironment().initPropertySources(this.servletContext, this.servletConfig); } - @Override public Theme getTheme(String themeName) { return this.themeSource.getTheme(themeName); } diff --git a/spring-web/src/main/java/org/springframework/web/context/support/GenericWebApplicationContext.java b/spring-web/src/main/java/org/springframework/web/context/support/GenericWebApplicationContext.java index cd376fd6d1..ac87960cd0 100644 --- a/spring-web/src/main/java/org/springframework/web/context/support/GenericWebApplicationContext.java +++ b/spring-web/src/main/java/org/springframework/web/context/support/GenericWebApplicationContext.java @@ -116,12 +116,10 @@ public class GenericWebApplicationContext extends GenericApplicationContext /** * Set the ServletContext that this WebApplicationContext runs in. */ - @Override public void setServletContext(ServletContext servletContext) { this.servletContext = servletContext; } - @Override public ServletContext getServletContext() { return this.servletContext; } @@ -207,7 +205,6 @@ public class GenericWebApplicationContext extends GenericApplicationContext this.getEnvironment().initPropertySources(this.servletContext, null); } - @Override public Theme getTheme(String themeName) { return this.themeSource.getTheme(themeName); } @@ -217,29 +214,24 @@ public class GenericWebApplicationContext extends GenericApplicationContext // Pseudo-implementation of ConfigurableWebApplicationContext // --------------------------------------------------------------------- - @Override public void setServletConfig(ServletConfig servletConfig) { // no-op } - @Override public ServletConfig getServletConfig() { throw new UnsupportedOperationException( "GenericWebApplicationContext does not support getServletConfig()"); } - @Override public void setNamespace(String namespace) { // no-op } - @Override public String getNamespace() { throw new UnsupportedOperationException( "GenericWebApplicationContext does not support getNamespace()"); } - @Override public void setConfigLocation(String configLocation) { if (StringUtils.hasText(configLocation)) { throw new UnsupportedOperationException( @@ -248,7 +240,6 @@ public class GenericWebApplicationContext extends GenericApplicationContext } } - @Override public void setConfigLocations(String[] configLocations) { if (!ObjectUtils.isEmpty(configLocations)) { throw new UnsupportedOperationException( @@ -257,7 +248,6 @@ public class GenericWebApplicationContext extends GenericApplicationContext } } - @Override public String[] getConfigLocations() { throw new UnsupportedOperationException( "GenericWebApplicationContext does not support getConfigLocations()"); diff --git a/spring-web/src/main/java/org/springframework/web/context/support/ServletContextAttributeExporter.java b/spring-web/src/main/java/org/springframework/web/context/support/ServletContextAttributeExporter.java index 6c5427058f..6cde766017 100644 --- a/spring-web/src/main/java/org/springframework/web/context/support/ServletContextAttributeExporter.java +++ b/spring-web/src/main/java/org/springframework/web/context/support/ServletContextAttributeExporter.java @@ -63,7 +63,6 @@ public class ServletContextAttributeExporter implements ServletContextAware { this.attributes = attributes; } - @Override public void setServletContext(ServletContext servletContext) { for (Map.Entry entry : attributes.entrySet()) { String attributeName = entry.getKey(); diff --git a/spring-web/src/main/java/org/springframework/web/context/support/ServletContextAttributeFactoryBean.java b/spring-web/src/main/java/org/springframework/web/context/support/ServletContextAttributeFactoryBean.java index 5e2d1d0029..3d15803bfa 100644 --- a/spring-web/src/main/java/org/springframework/web/context/support/ServletContextAttributeFactoryBean.java +++ b/spring-web/src/main/java/org/springframework/web/context/support/ServletContextAttributeFactoryBean.java @@ -55,7 +55,6 @@ public class ServletContextAttributeFactoryBean implements FactoryBean, this.attributeName = attributeName; } - @Override public void setServletContext(ServletContext servletContext) { if (this.attributeName == null) { throw new IllegalArgumentException("Property 'attributeName' is required"); @@ -67,17 +66,14 @@ public class ServletContextAttributeFactoryBean implements FactoryBean, } - @Override public Object getObject() throws Exception { return this.attribute; } - @Override public Class getObjectType() { return (this.attribute != null ? this.attribute.getClass() : null); } - @Override public boolean isSingleton() { return true; } diff --git a/spring-web/src/main/java/org/springframework/web/context/support/ServletContextAwareProcessor.java b/spring-web/src/main/java/org/springframework/web/context/support/ServletContextAwareProcessor.java index 8da02f48f0..8970e16c8b 100644 --- a/spring-web/src/main/java/org/springframework/web/context/support/ServletContextAwareProcessor.java +++ b/spring-web/src/main/java/org/springframework/web/context/support/ServletContextAwareProcessor.java @@ -70,7 +70,6 @@ public class ServletContextAwareProcessor implements BeanPostProcessor { } - @Override public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { if (this.servletContext != null && bean instanceof ServletContextAware) { ((ServletContextAware) bean).setServletContext(this.servletContext); @@ -81,7 +80,6 @@ public class ServletContextAwareProcessor implements BeanPostProcessor { return bean; } - @Override public Object postProcessAfterInitialization(Object bean, String beanName) { return bean; } diff --git a/spring-web/src/main/java/org/springframework/web/context/support/ServletContextFactoryBean.java b/spring-web/src/main/java/org/springframework/web/context/support/ServletContextFactoryBean.java index beb46be6d2..90ba7cf31f 100644 --- a/spring-web/src/main/java/org/springframework/web/context/support/ServletContextFactoryBean.java +++ b/spring-web/src/main/java/org/springframework/web/context/support/ServletContextFactoryBean.java @@ -49,23 +49,19 @@ public class ServletContextFactoryBean implements FactoryBean, S private ServletContext servletContext; - @Override public void setServletContext(ServletContext servletContext) { this.servletContext = servletContext; } - @Override public ServletContext getObject() { return this.servletContext; } - @Override public Class getObjectType() { return (this.servletContext != null ? this.servletContext.getClass() : ServletContext.class); } - @Override public boolean isSingleton() { return true; } diff --git a/spring-web/src/main/java/org/springframework/web/context/support/ServletContextParameterFactoryBean.java b/spring-web/src/main/java/org/springframework/web/context/support/ServletContextParameterFactoryBean.java index 27f30651ea..6af3d80863 100644 --- a/spring-web/src/main/java/org/springframework/web/context/support/ServletContextParameterFactoryBean.java +++ b/spring-web/src/main/java/org/springframework/web/context/support/ServletContextParameterFactoryBean.java @@ -50,7 +50,6 @@ public class ServletContextParameterFactoryBean implements FactoryBean, this.initParamName = initParamName; } - @Override public void setServletContext(ServletContext servletContext) { if (this.initParamName == null) { throw new IllegalArgumentException("initParamName is required"); @@ -62,17 +61,14 @@ public class ServletContextParameterFactoryBean implements FactoryBean, } - @Override public String getObject() { return this.paramValue; } - @Override public Class getObjectType() { return String.class; } - @Override public boolean isSingleton() { return true; } diff --git a/spring-web/src/main/java/org/springframework/web/context/support/ServletContextPropertyPlaceholderConfigurer.java b/spring-web/src/main/java/org/springframework/web/context/support/ServletContextPropertyPlaceholderConfigurer.java index e2a8f1f2f2..ea6cda9767 100644 --- a/spring-web/src/main/java/org/springframework/web/context/support/ServletContextPropertyPlaceholderConfigurer.java +++ b/spring-web/src/main/java/org/springframework/web/context/support/ServletContextPropertyPlaceholderConfigurer.java @@ -109,7 +109,6 @@ public class ServletContextPropertyPlaceholderConfigurer extends PropertyPlaceho * against the ServletContext: It will effectively behave like a plain * PropertyPlaceholderConfigurer in such a scenario. */ - @Override public void setServletContext(ServletContext servletContext) { this.servletContext = servletContext; } diff --git a/spring-web/src/main/java/org/springframework/web/context/support/ServletContextResource.java b/spring-web/src/main/java/org/springframework/web/context/support/ServletContextResource.java index a05b782f8c..673c39c9a1 100644 --- a/spring-web/src/main/java/org/springframework/web/context/support/ServletContextResource.java +++ b/spring-web/src/main/java/org/springframework/web/context/support/ServletContextResource.java @@ -134,7 +134,6 @@ public class ServletContextResource extends AbstractFileResolvingResource implem * but throws a FileNotFoundException if no resource found. * @see javax.servlet.ServletContext#getResourceAsStream(String) */ - @Override public InputStream getInputStream() throws IOException { InputStream is = this.servletContext.getResourceAsStream(this.path); if (is == null) { @@ -203,12 +202,10 @@ public class ServletContextResource extends AbstractFileResolvingResource implem * This implementation returns a description that includes the ServletContext * resource location. */ - @Override public String getDescription() { return "ServletContext resource [" + this.path + "]"; } - @Override public String getPathWithinContext() { return this.path; } diff --git a/spring-web/src/main/java/org/springframework/web/context/support/ServletContextScope.java b/spring-web/src/main/java/org/springframework/web/context/support/ServletContextScope.java index d16a99d3f3..180645580f 100644 --- a/spring-web/src/main/java/org/springframework/web/context/support/ServletContextScope.java +++ b/spring-web/src/main/java/org/springframework/web/context/support/ServletContextScope.java @@ -62,7 +62,6 @@ public class ServletContextScope implements Scope, DisposableBean { } - @Override public Object get(String name, ObjectFactory objectFactory) { Object scopedObject = this.servletContext.getAttribute(name); if (scopedObject == null) { @@ -72,7 +71,6 @@ public class ServletContextScope implements Scope, DisposableBean { return scopedObject; } - @Override public Object remove(String name) { Object scopedObject = this.servletContext.getAttribute(name); if (scopedObject != null) { @@ -85,17 +83,14 @@ public class ServletContextScope implements Scope, DisposableBean { } } - @Override public void registerDestructionCallback(String name, Runnable callback) { this.destructionCallbacks.put(name, callback); } - @Override public Object resolveContextualObject(String key) { return null; } - @Override public String getConversationId() { return null; } @@ -106,7 +101,6 @@ public class ServletContextScope implements Scope, DisposableBean { * To be called on ServletContext shutdown. * @see org.springframework.web.context.ContextCleanupListener */ - @Override public void destroy() { for (Runnable runnable : this.destructionCallbacks.values()) { runnable.run(); diff --git a/spring-web/src/main/java/org/springframework/web/context/support/StandardServletEnvironment.java b/spring-web/src/main/java/org/springframework/web/context/support/StandardServletEnvironment.java index 6704b261aa..b929c4bbe3 100644 --- a/spring-web/src/main/java/org/springframework/web/context/support/StandardServletEnvironment.java +++ b/spring-web/src/main/java/org/springframework/web/context/support/StandardServletEnvironment.java @@ -90,7 +90,6 @@ public class StandardServletEnvironment extends StandardEnvironment super.customizePropertySources(propertySources); } - @Override public void initPropertySources(ServletContext servletContext, ServletConfig servletConfig) { WebApplicationContextUtils.initServletPropertySources( this.getPropertySources(), servletContext, servletConfig); diff --git a/spring-web/src/main/java/org/springframework/web/context/support/StaticWebApplicationContext.java b/spring-web/src/main/java/org/springframework/web/context/support/StaticWebApplicationContext.java index 98f21c2e45..5de71bda60 100644 --- a/spring-web/src/main/java/org/springframework/web/context/support/StaticWebApplicationContext.java +++ b/spring-web/src/main/java/org/springframework/web/context/support/StaticWebApplicationContext.java @@ -75,17 +75,14 @@ public class StaticWebApplicationContext extends StaticApplicationContext /** * Set the ServletContext that this WebApplicationContext runs in. */ - @Override public void setServletContext(ServletContext servletContext) { this.servletContext = servletContext; } - @Override public ServletContext getServletContext() { return this.servletContext; } - @Override public void setServletConfig(ServletConfig servletConfig) { this.servletConfig = servletConfig; if (servletConfig != null && this.servletContext == null) { @@ -93,12 +90,10 @@ public class StaticWebApplicationContext extends StaticApplicationContext } } - @Override public ServletConfig getServletConfig() { return this.servletConfig; } - @Override public void setNamespace(String namespace) { this.namespace = namespace; if (namespace != null) { @@ -106,7 +101,6 @@ public class StaticWebApplicationContext extends StaticApplicationContext } } - @Override public String getNamespace() { return this.namespace; } @@ -115,7 +109,6 @@ public class StaticWebApplicationContext extends StaticApplicationContext * The {@link StaticWebApplicationContext} class does not support this method. * @throws UnsupportedOperationException always */ - @Override public void setConfigLocation(String configLocation) { if (configLocation != null) { throw new UnsupportedOperationException("StaticWebApplicationContext does not support config locations"); @@ -126,14 +119,12 @@ public class StaticWebApplicationContext extends StaticApplicationContext * The {@link StaticWebApplicationContext} class does not support this method. * @throws UnsupportedOperationException always */ - @Override public void setConfigLocations(String[] configLocations) { if (configLocations != null) { throw new UnsupportedOperationException("StaticWebApplicationContext does not support config locations"); } } - @Override public String[] getConfigLocations() { return null; } @@ -202,7 +193,6 @@ public class StaticWebApplicationContext extends StaticApplicationContext this.getEnvironment().getPropertySources(), this.servletContext, this.servletConfig); } - @Override public Theme getTheme(String themeName) { return this.themeSource.getTheme(themeName); } diff --git a/spring-web/src/main/java/org/springframework/web/context/support/WebApplicationContextUtils.java b/spring-web/src/main/java/org/springframework/web/context/support/WebApplicationContextUtils.java index f7a5f81daa..9091e337a4 100644 --- a/spring-web/src/main/java/org/springframework/web/context/support/WebApplicationContextUtils.java +++ b/spring-web/src/main/java/org/springframework/web/context/support/WebApplicationContextUtils.java @@ -292,7 +292,6 @@ public abstract class WebApplicationContextUtils { @SuppressWarnings("serial") private static class RequestObjectFactory implements ObjectFactory, Serializable { - @Override public ServletRequest getObject() { return currentRequestAttributes().getRequest(); } @@ -310,7 +309,6 @@ public abstract class WebApplicationContextUtils { @SuppressWarnings("serial") private static class SessionObjectFactory implements ObjectFactory, Serializable { - @Override public HttpSession getObject() { return currentRequestAttributes().getRequest().getSession(); } @@ -328,7 +326,6 @@ public abstract class WebApplicationContextUtils { @SuppressWarnings("serial") private static class WebRequestObjectFactory implements ObjectFactory, Serializable { - @Override public WebRequest getObject() { return new ServletWebRequest(currentRequestAttributes().getRequest()); } @@ -347,7 +344,6 @@ public abstract class WebApplicationContextUtils { public static void registerFacesDependencies(ConfigurableListableBeanFactory beanFactory) { beanFactory.registerResolvableDependency(FacesContext.class, new ObjectFactory() { - @Override public FacesContext getObject() { return FacesContext.getCurrentInstance(); } @@ -357,7 +353,6 @@ public abstract class WebApplicationContextUtils { } }); beanFactory.registerResolvableDependency(ExternalContext.class, new ObjectFactory() { - @Override public ExternalContext getObject() { return FacesContext.getCurrentInstance().getExternalContext(); } diff --git a/spring-web/src/main/java/org/springframework/web/context/support/WebApplicationObjectSupport.java b/spring-web/src/main/java/org/springframework/web/context/support/WebApplicationObjectSupport.java index b333d59279..9aa2547d62 100644 --- a/spring-web/src/main/java/org/springframework/web/context/support/WebApplicationObjectSupport.java +++ b/spring-web/src/main/java/org/springframework/web/context/support/WebApplicationObjectSupport.java @@ -40,7 +40,6 @@ public abstract class WebApplicationObjectSupport extends ApplicationObjectSuppo private ServletContext servletContext; - @Override public final void setServletContext(ServletContext servletContext) { if (servletContext != this.servletContext) { this.servletContext = servletContext; diff --git a/spring-web/src/main/java/org/springframework/web/filter/CompositeFilter.java b/spring-web/src/main/java/org/springframework/web/filter/CompositeFilter.java index 37e9c015ff..a3551ff767 100644 --- a/spring-web/src/main/java/org/springframework/web/filter/CompositeFilter.java +++ b/spring-web/src/main/java/org/springframework/web/filter/CompositeFilter.java @@ -52,7 +52,6 @@ public class CompositeFilter implements Filter { * * @see Filter#init(FilterConfig) */ - @Override public void destroy() { for (int i = filters.size(); i-- > 0;) { Filter filter = filters.get(i); @@ -65,7 +64,6 @@ public class CompositeFilter implements Filter { * * @see Filter#init(FilterConfig) */ - @Override public void init(FilterConfig config) throws ServletException { for (Filter filter : filters) { filter.init(config); @@ -79,7 +77,6 @@ public class CompositeFilter implements Filter { * * @see Filter#doFilter(ServletRequest, ServletResponse, FilterChain) */ - @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { new VirtualFilterChain(chain, filters).doFilter(request, response); @@ -95,7 +92,6 @@ public class CompositeFilter implements Filter { this.additionalFilters = additionalFilters; } - @Override public void doFilter(final ServletRequest request, final ServletResponse response) throws IOException, ServletException { if (currentPosition == additionalFilters.size()) { diff --git a/spring-web/src/main/java/org/springframework/web/filter/DelegatingFilterProxy.java b/spring-web/src/main/java/org/springframework/web/filter/DelegatingFilterProxy.java index 4fb7f4fed4..ea1a2155bc 100644 --- a/spring-web/src/main/java/org/springframework/web/filter/DelegatingFilterProxy.java +++ b/spring-web/src/main/java/org/springframework/web/filter/DelegatingFilterProxy.java @@ -239,7 +239,6 @@ public class DelegatingFilterProxy extends GenericFilterBean { } } - @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain) throws ServletException, IOException { diff --git a/spring-web/src/main/java/org/springframework/web/filter/GenericFilterBean.java b/spring-web/src/main/java/org/springframework/web/filter/GenericFilterBean.java index 1491a2b861..816a52c3c1 100644 --- a/spring-web/src/main/java/org/springframework/web/filter/GenericFilterBean.java +++ b/spring-web/src/main/java/org/springframework/web/filter/GenericFilterBean.java @@ -103,7 +103,6 @@ public abstract class GenericFilterBean implements * @see org.springframework.beans.factory.BeanNameAware * @see #getFilterName() */ - @Override public final void setBeanName(String beanName) { this.beanName = beanName; } @@ -117,7 +116,6 @@ public abstract class GenericFilterBean implements * used, this {@code Environment} can be essentially ignored. * @see #init(FilterConfig) */ - @Override public void setEnvironment(Environment environment) { this.environment = environment; } @@ -129,7 +127,6 @@ public abstract class GenericFilterBean implements * @see org.springframework.web.context.ServletContextAware * @see #getServletContext() */ - @Override public final void setServletContext(ServletContext servletContext) { this.servletContext = servletContext; } @@ -142,7 +139,6 @@ public abstract class GenericFilterBean implements * @see #initFilterBean() * @see #init(javax.servlet.FilterConfig) */ - @Override public void afterPropertiesSet() throws ServletException { initFilterBean(); } @@ -170,7 +166,6 @@ public abstract class GenericFilterBean implements * properties are missing), or if subclass initialization fails. * @see #initFilterBean */ - @Override public final void init(FilterConfig filterConfig) throws ServletException { Assert.notNull(filterConfig, "FilterConfig must not be null"); if (logger.isDebugEnabled()) { @@ -279,7 +274,6 @@ public abstract class GenericFilterBean implements * as well as filter bean destruction in a Spring application context. *

This default implementation is empty. */ - @Override public void destroy() { } diff --git a/spring-web/src/main/java/org/springframework/web/filter/OncePerRequestFilter.java b/spring-web/src/main/java/org/springframework/web/filter/OncePerRequestFilter.java index cdb1c05182..d422184207 100644 --- a/spring-web/src/main/java/org/springframework/web/filter/OncePerRequestFilter.java +++ b/spring-web/src/main/java/org/springframework/web/filter/OncePerRequestFilter.java @@ -83,7 +83,6 @@ public abstract class OncePerRequestFilter extends GenericFilterBean { * @see #shouldNotFilter * @see #doFilterInternal */ - @Override public final void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain) throws ServletException, IOException { diff --git a/spring-web/src/main/java/org/springframework/web/jsf/DelegatingPhaseListenerMulticaster.java b/spring-web/src/main/java/org/springframework/web/jsf/DelegatingPhaseListenerMulticaster.java index eeea3a8cc9..d554e05cf5 100644 --- a/spring-web/src/main/java/org/springframework/web/jsf/DelegatingPhaseListenerMulticaster.java +++ b/spring-web/src/main/java/org/springframework/web/jsf/DelegatingPhaseListenerMulticaster.java @@ -62,19 +62,16 @@ import org.springframework.web.context.WebApplicationContext; @SuppressWarnings("serial") public class DelegatingPhaseListenerMulticaster implements PhaseListener { - @Override public PhaseId getPhaseId() { return PhaseId.ANY_PHASE; } - @Override public void beforePhase(PhaseEvent event) { for (PhaseListener listener : getDelegates(event.getFacesContext())) { listener.beforePhase(event); } } - @Override public void afterPhase(PhaseEvent event) { for (PhaseListener listener : getDelegates(event.getFacesContext())) { listener.afterPhase(event); diff --git a/spring-web/src/main/java/org/springframework/web/method/ControllerAdviceBean.java b/spring-web/src/main/java/org/springframework/web/method/ControllerAdviceBean.java index eeefa75044..d1aa1a36d0 100644 --- a/spring-web/src/main/java/org/springframework/web/method/ControllerAdviceBean.java +++ b/spring-web/src/main/java/org/springframework/web/method/ControllerAdviceBean.java @@ -101,7 +101,6 @@ public class ControllerAdviceBean implements Ordered { * Returns the order value extracted from the {@link ControllerAdvice} * annotation or {@link Ordered#LOWEST_PRECEDENCE} otherwise. */ - @Override public int getOrder() { return this.order; } diff --git a/spring-web/src/main/java/org/springframework/web/method/HandlerMethodSelector.java b/spring-web/src/main/java/org/springframework/web/method/HandlerMethodSelector.java index d948f0bfa7..4d93eff7f2 100644 --- a/spring-web/src/main/java/org/springframework/web/method/HandlerMethodSelector.java +++ b/spring-web/src/main/java/org/springframework/web/method/HandlerMethodSelector.java @@ -56,7 +56,6 @@ public abstract class HandlerMethodSelector { for (Class currentHandlerType : handlerTypes) { final Class targetClass = (specificHandlerType != null ? specificHandlerType : currentHandlerType); ReflectionUtils.doWithMethods(currentHandlerType, new ReflectionUtils.MethodCallback() { - @Override public void doWith(Method method) { Method specificMethod = ClassUtils.getMostSpecificMethod(method, targetClass); Method bridgedMethod = BridgeMethodResolver.findBridgedMethod(specificMethod); diff --git a/spring-web/src/main/java/org/springframework/web/method/annotation/AbstractCookieValueMethodArgumentResolver.java b/spring-web/src/main/java/org/springframework/web/method/annotation/AbstractCookieValueMethodArgumentResolver.java index 6b1fe43392..07c44b32a8 100644 --- a/spring-web/src/main/java/org/springframework/web/method/annotation/AbstractCookieValueMethodArgumentResolver.java +++ b/spring-web/src/main/java/org/springframework/web/method/annotation/AbstractCookieValueMethodArgumentResolver.java @@ -48,7 +48,6 @@ public abstract class AbstractCookieValueMethodArgumentResolver extends Abstract super(beanFactory); } - @Override public boolean supportsParameter(MethodParameter parameter) { return parameter.hasParameterAnnotation(CookieValue.class); } diff --git a/spring-web/src/main/java/org/springframework/web/method/annotation/AbstractNamedValueMethodArgumentResolver.java b/spring-web/src/main/java/org/springframework/web/method/annotation/AbstractNamedValueMethodArgumentResolver.java index e2e3af023d..9e35288687 100644 --- a/spring-web/src/main/java/org/springframework/web/method/annotation/AbstractNamedValueMethodArgumentResolver.java +++ b/spring-web/src/main/java/org/springframework/web/method/annotation/AbstractNamedValueMethodArgumentResolver.java @@ -74,7 +74,6 @@ public abstract class AbstractNamedValueMethodArgumentResolver implements Handle this.expressionContext = (beanFactory != null) ? new BeanExpressionContext(beanFactory, new RequestScope()) : null; } - @Override public final Object resolveArgument( MethodParameter parameter, ModelAndViewContainer mavContainer, NativeWebRequest webRequest, WebDataBinderFactory binderFactory) diff --git a/spring-web/src/main/java/org/springframework/web/method/annotation/AbstractWebArgumentResolverAdapter.java b/spring-web/src/main/java/org/springframework/web/method/annotation/AbstractWebArgumentResolverAdapter.java index 3a8740026d..76e1630318 100644 --- a/spring-web/src/main/java/org/springframework/web/method/annotation/AbstractWebArgumentResolverAdapter.java +++ b/spring-web/src/main/java/org/springframework/web/method/annotation/AbstractWebArgumentResolverAdapter.java @@ -63,7 +63,6 @@ public abstract class AbstractWebArgumentResolverAdapter implements HandlerMetho * Actually resolve the value and check the resolved value is not * {@link WebArgumentResolver#UNRESOLVED} absorbing _any_ exceptions. */ - @Override public boolean supportsParameter(MethodParameter parameter) { try { NativeWebRequest webRequest = getWebRequest(); @@ -92,7 +91,6 @@ public abstract class AbstractWebArgumentResolverAdapter implements HandlerMetho * @exception IllegalStateException if the resolved value is not assignable * to the method parameter. */ - @Override public Object resolveArgument( MethodParameter parameter, ModelAndViewContainer mavContainer, NativeWebRequest webRequest, WebDataBinderFactory binderFactory) diff --git a/spring-web/src/main/java/org/springframework/web/method/annotation/ErrorsMethodArgumentResolver.java b/spring-web/src/main/java/org/springframework/web/method/annotation/ErrorsMethodArgumentResolver.java index bb2b31f6b1..63e713685b 100644 --- a/spring-web/src/main/java/org/springframework/web/method/annotation/ErrorsMethodArgumentResolver.java +++ b/spring-web/src/main/java/org/springframework/web/method/annotation/ErrorsMethodArgumentResolver.java @@ -40,13 +40,11 @@ import org.springframework.web.method.support.ModelAndViewContainer; */ public class ErrorsMethodArgumentResolver implements HandlerMethodArgumentResolver { - @Override public boolean supportsParameter(MethodParameter parameter) { Class paramType = parameter.getParameterType(); return Errors.class.isAssignableFrom(paramType); } - @Override public Object resolveArgument( MethodParameter parameter, ModelAndViewContainer mavContainer, NativeWebRequest webRequest, WebDataBinderFactory binderFactory) diff --git a/spring-web/src/main/java/org/springframework/web/method/annotation/ExceptionHandlerMethodResolver.java b/spring-web/src/main/java/org/springframework/web/method/annotation/ExceptionHandlerMethodResolver.java index 7db05ab78c..626b0fe218 100644 --- a/spring-web/src/main/java/org/springframework/web/method/annotation/ExceptionHandlerMethodResolver.java +++ b/spring-web/src/main/java/org/springframework/web/method/annotation/ExceptionHandlerMethodResolver.java @@ -143,7 +143,6 @@ public class ExceptionHandlerMethodResolver { */ public final static MethodFilter EXCEPTION_HANDLER_METHODS = new MethodFilter() { - @Override public boolean matches(Method method) { return AnnotationUtils.findAnnotation(method, ExceptionHandler.class) != null; } diff --git a/spring-web/src/main/java/org/springframework/web/method/annotation/ExpressionValueMethodArgumentResolver.java b/spring-web/src/main/java/org/springframework/web/method/annotation/ExpressionValueMethodArgumentResolver.java index 91c41c0927..92a2aa88d1 100644 --- a/spring-web/src/main/java/org/springframework/web/method/annotation/ExpressionValueMethodArgumentResolver.java +++ b/spring-web/src/main/java/org/springframework/web/method/annotation/ExpressionValueMethodArgumentResolver.java @@ -48,7 +48,6 @@ public class ExpressionValueMethodArgumentResolver extends AbstractNamedValueMet super(beanFactory); } - @Override public boolean supportsParameter(MethodParameter parameter) { return parameter.hasParameterAnnotation(Value.class); } diff --git a/spring-web/src/main/java/org/springframework/web/method/annotation/MapMethodProcessor.java b/spring-web/src/main/java/org/springframework/web/method/annotation/MapMethodProcessor.java index ed8a0c025e..df430b5f0d 100644 --- a/spring-web/src/main/java/org/springframework/web/method/annotation/MapMethodProcessor.java +++ b/spring-web/src/main/java/org/springframework/web/method/annotation/MapMethodProcessor.java @@ -38,12 +38,10 @@ import org.springframework.web.method.support.ModelAndViewContainer; */ public class MapMethodProcessor implements HandlerMethodArgumentResolver, HandlerMethodReturnValueHandler { - @Override public boolean supportsParameter(MethodParameter parameter) { return Map.class.isAssignableFrom(parameter.getParameterType()); } - @Override public Object resolveArgument( MethodParameter parameter, ModelAndViewContainer mavContainer, NativeWebRequest webRequest, WebDataBinderFactory binderFactory) @@ -52,12 +50,10 @@ public class MapMethodProcessor implements HandlerMethodArgumentResolver, Handle return mavContainer.getModel(); } - @Override public boolean supportsReturnType(MethodParameter returnType) { return Map.class.isAssignableFrom(returnType.getParameterType()); } - @Override @SuppressWarnings({ "unchecked", "rawtypes" }) public void handleReturnValue( Object returnValue, MethodParameter returnType, diff --git a/spring-web/src/main/java/org/springframework/web/method/annotation/ModelAttributeMethodProcessor.java b/spring-web/src/main/java/org/springframework/web/method/annotation/ModelAttributeMethodProcessor.java index aee03bef14..d2e2529360 100644 --- a/spring-web/src/main/java/org/springframework/web/method/annotation/ModelAttributeMethodProcessor.java +++ b/spring-web/src/main/java/org/springframework/web/method/annotation/ModelAttributeMethodProcessor.java @@ -71,7 +71,6 @@ public class ModelAttributeMethodProcessor implements HandlerMethodArgumentResol * @return true if the parameter is annotated with {@link ModelAttribute} * or in default resolution mode also if it is not a simple type. */ - @Override public boolean supportsParameter(MethodParameter parameter) { if (parameter.hasParameterAnnotation(ModelAttribute.class)) { return true; @@ -93,7 +92,6 @@ public class ModelAttributeMethodProcessor implements HandlerMethodArgumentResol * and the next method parameter is not of type {@link Errors}. * @throws Exception if WebDataBinder initialization fails. */ - @Override public final Object resolveArgument( MethodParameter parameter, ModelAndViewContainer mavContainer, NativeWebRequest request, WebDataBinderFactory binderFactory) @@ -182,7 +180,6 @@ public class ModelAttributeMethodProcessor implements HandlerMethodArgumentResol * Return {@code true} if there is a method-level {@code @ModelAttribute} * or if it is a non-simple type when {@code annotationNotRequired=true}. */ - @Override public boolean supportsReturnType(MethodParameter returnType) { if (returnType.getMethodAnnotation(ModelAttribute.class) != null) { return true; @@ -198,7 +195,6 @@ public class ModelAttributeMethodProcessor implements HandlerMethodArgumentResol /** * Add non-null return values to the {@link ModelAndViewContainer}. */ - @Override public void handleReturnValue( Object returnValue, MethodParameter returnType, ModelAndViewContainer mavContainer, NativeWebRequest webRequest) diff --git a/spring-web/src/main/java/org/springframework/web/method/annotation/ModelMethodProcessor.java b/spring-web/src/main/java/org/springframework/web/method/annotation/ModelMethodProcessor.java index c1bc413851..c529efd8a3 100644 --- a/spring-web/src/main/java/org/springframework/web/method/annotation/ModelMethodProcessor.java +++ b/spring-web/src/main/java/org/springframework/web/method/annotation/ModelMethodProcessor.java @@ -37,12 +37,10 @@ import org.springframework.web.method.support.ModelAndViewContainer; */ public class ModelMethodProcessor implements HandlerMethodArgumentResolver, HandlerMethodReturnValueHandler { - @Override public boolean supportsParameter(MethodParameter parameter) { return Model.class.isAssignableFrom(parameter.getParameterType()); } - @Override public Object resolveArgument( MethodParameter parameter, ModelAndViewContainer mavContainer, NativeWebRequest webRequest, WebDataBinderFactory binderFactory) @@ -51,12 +49,10 @@ public class ModelMethodProcessor implements HandlerMethodArgumentResolver, Hand return mavContainer.getModel(); } - @Override public boolean supportsReturnType(MethodParameter returnType) { return Model.class.isAssignableFrom(returnType.getParameterType()); } - @Override public void handleReturnValue( Object returnValue, MethodParameter returnType, ModelAndViewContainer mavContainer, NativeWebRequest webRequest) diff --git a/spring-web/src/main/java/org/springframework/web/method/annotation/RequestHeaderMapMethodArgumentResolver.java b/spring-web/src/main/java/org/springframework/web/method/annotation/RequestHeaderMapMethodArgumentResolver.java index e335b9dbf5..4843782efb 100644 --- a/spring-web/src/main/java/org/springframework/web/method/annotation/RequestHeaderMapMethodArgumentResolver.java +++ b/spring-web/src/main/java/org/springframework/web/method/annotation/RequestHeaderMapMethodArgumentResolver.java @@ -45,13 +45,11 @@ import org.springframework.web.method.support.ModelAndViewContainer; */ public class RequestHeaderMapMethodArgumentResolver implements HandlerMethodArgumentResolver { - @Override public boolean supportsParameter(MethodParameter parameter) { return parameter.hasParameterAnnotation(RequestHeader.class) && Map.class.isAssignableFrom(parameter.getParameterType()); } - @Override public Object resolveArgument( MethodParameter parameter, ModelAndViewContainer mavContainer, NativeWebRequest webRequest, WebDataBinderFactory binderFactory) diff --git a/spring-web/src/main/java/org/springframework/web/method/annotation/RequestHeaderMethodArgumentResolver.java b/spring-web/src/main/java/org/springframework/web/method/annotation/RequestHeaderMethodArgumentResolver.java index e5596839f5..e7b46bdb6a 100644 --- a/spring-web/src/main/java/org/springframework/web/method/annotation/RequestHeaderMethodArgumentResolver.java +++ b/spring-web/src/main/java/org/springframework/web/method/annotation/RequestHeaderMethodArgumentResolver.java @@ -52,7 +52,6 @@ public class RequestHeaderMethodArgumentResolver extends AbstractNamedValueMetho super(beanFactory); } - @Override public boolean supportsParameter(MethodParameter parameter) { return parameter.hasParameterAnnotation(RequestHeader.class) && !Map.class.isAssignableFrom(parameter.getParameterType()); diff --git a/spring-web/src/main/java/org/springframework/web/method/annotation/RequestParamMapMethodArgumentResolver.java b/spring-web/src/main/java/org/springframework/web/method/annotation/RequestParamMapMethodArgumentResolver.java index 8708e5a5a0..befe7178d9 100644 --- a/spring-web/src/main/java/org/springframework/web/method/annotation/RequestParamMapMethodArgumentResolver.java +++ b/spring-web/src/main/java/org/springframework/web/method/annotation/RequestParamMapMethodArgumentResolver.java @@ -45,7 +45,6 @@ import org.springframework.web.method.support.ModelAndViewContainer; */ public class RequestParamMapMethodArgumentResolver implements HandlerMethodArgumentResolver { - @Override public boolean supportsParameter(MethodParameter parameter) { RequestParam requestParamAnnot = parameter.getParameterAnnotation(RequestParam.class); if (requestParamAnnot != null) { @@ -56,7 +55,6 @@ public class RequestParamMapMethodArgumentResolver implements HandlerMethodArgum return false; } - @Override public Object resolveArgument( MethodParameter parameter, ModelAndViewContainer mavContainer, NativeWebRequest webRequest, WebDataBinderFactory binderFactory) diff --git a/spring-web/src/main/java/org/springframework/web/method/annotation/RequestParamMethodArgumentResolver.java b/spring-web/src/main/java/org/springframework/web/method/annotation/RequestParamMethodArgumentResolver.java index 30cb121e3e..3f351595ec 100644 --- a/spring-web/src/main/java/org/springframework/web/method/annotation/RequestParamMethodArgumentResolver.java +++ b/spring-web/src/main/java/org/springframework/web/method/annotation/RequestParamMethodArgumentResolver.java @@ -102,7 +102,6 @@ public class RequestParamMethodArgumentResolver extends AbstractNamedValueMethod * even if not with @{@link RequestParam}. * */ - @Override public boolean supportsParameter(MethodParameter parameter) { Class paramType = parameter.getParameterType(); if (parameter.hasParameterAnnotation(RequestParam.class)) { diff --git a/spring-web/src/main/java/org/springframework/web/method/annotation/SessionStatusMethodArgumentResolver.java b/spring-web/src/main/java/org/springframework/web/method/annotation/SessionStatusMethodArgumentResolver.java index c9ae58b647..f19ae73727 100644 --- a/spring-web/src/main/java/org/springframework/web/method/annotation/SessionStatusMethodArgumentResolver.java +++ b/spring-web/src/main/java/org/springframework/web/method/annotation/SessionStatusMethodArgumentResolver.java @@ -32,12 +32,10 @@ import org.springframework.web.method.support.ModelAndViewContainer; */ public class SessionStatusMethodArgumentResolver implements HandlerMethodArgumentResolver { - @Override public boolean supportsParameter(MethodParameter parameter) { return SessionStatus.class.equals(parameter.getParameterType()); } - @Override public Object resolveArgument( MethodParameter parameter, ModelAndViewContainer mavContainer, NativeWebRequest webRequest, WebDataBinderFactory binderFactory) diff --git a/spring-web/src/main/java/org/springframework/web/method/support/HandlerMethodArgumentResolverComposite.java b/spring-web/src/main/java/org/springframework/web/method/support/HandlerMethodArgumentResolverComposite.java index 6fa290d05d..21c88153fb 100644 --- a/spring-web/src/main/java/org/springframework/web/method/support/HandlerMethodArgumentResolverComposite.java +++ b/spring-web/src/main/java/org/springframework/web/method/support/HandlerMethodArgumentResolverComposite.java @@ -59,7 +59,6 @@ public class HandlerMethodArgumentResolverComposite implements HandlerMethodArgu * Whether the given {@linkplain MethodParameter method parameter} is supported by any registered * {@link HandlerMethodArgumentResolver}. */ - @Override public boolean supportsParameter(MethodParameter parameter) { return getArgumentResolver(parameter) != null; } @@ -68,7 +67,6 @@ public class HandlerMethodArgumentResolverComposite implements HandlerMethodArgu * Iterate over registered {@link HandlerMethodArgumentResolver}s and invoke the one that supports it. * @exception IllegalStateException if no suitable {@link HandlerMethodArgumentResolver} is found. */ - @Override public Object resolveArgument( MethodParameter parameter, ModelAndViewContainer mavContainer, NativeWebRequest webRequest, WebDataBinderFactory binderFactory) diff --git a/spring-web/src/main/java/org/springframework/web/method/support/HandlerMethodReturnValueHandlerComposite.java b/spring-web/src/main/java/org/springframework/web/method/support/HandlerMethodReturnValueHandlerComposite.java index 991c5ef73e..fb364be2b3 100644 --- a/spring-web/src/main/java/org/springframework/web/method/support/HandlerMethodReturnValueHandlerComposite.java +++ b/spring-web/src/main/java/org/springframework/web/method/support/HandlerMethodReturnValueHandlerComposite.java @@ -51,7 +51,6 @@ public class HandlerMethodReturnValueHandlerComposite implements HandlerMethodRe * Whether the given {@linkplain MethodParameter method return type} is supported by any registered * {@link HandlerMethodReturnValueHandler}. */ - @Override public boolean supportsReturnType(MethodParameter returnType) { return getReturnValueHandler(returnType) != null; } @@ -60,7 +59,6 @@ public class HandlerMethodReturnValueHandlerComposite implements HandlerMethodRe * Iterate over registered {@link HandlerMethodReturnValueHandler}s and invoke the one that supports it. * @exception IllegalStateException if no suitable {@link HandlerMethodReturnValueHandler} is found. */ - @Override public void handleReturnValue( Object returnValue, MethodParameter returnType, ModelAndViewContainer mavContainer, NativeWebRequest webRequest) diff --git a/spring-web/src/main/java/org/springframework/web/multipart/commons/CommonsMultipartFile.java b/spring-web/src/main/java/org/springframework/web/multipart/commons/CommonsMultipartFile.java index b649e587e0..ae9ae6ecf1 100644 --- a/spring-web/src/main/java/org/springframework/web/multipart/commons/CommonsMultipartFile.java +++ b/spring-web/src/main/java/org/springframework/web/multipart/commons/CommonsMultipartFile.java @@ -65,12 +65,10 @@ public class CommonsMultipartFile implements MultipartFile, Serializable { } - @Override public String getName() { return this.fileItem.getFieldName(); } - @Override public String getOriginalFilename() { String filename = this.fileItem.getName(); if (filename == null) { @@ -93,22 +91,18 @@ public class CommonsMultipartFile implements MultipartFile, Serializable { } } - @Override public String getContentType() { return this.fileItem.getContentType(); } - @Override public boolean isEmpty() { return (this.size == 0); } - @Override public long getSize() { return this.size; } - @Override public byte[] getBytes() { if (!isAvailable()) { throw new IllegalStateException("File has been moved - cannot be read again"); @@ -117,7 +111,6 @@ public class CommonsMultipartFile implements MultipartFile, Serializable { return (bytes != null ? bytes : new byte[0]); } - @Override public InputStream getInputStream() throws IOException { if (!isAvailable()) { throw new IllegalStateException("File has been moved - cannot be read again"); @@ -126,7 +119,6 @@ public class CommonsMultipartFile implements MultipartFile, Serializable { return (inputStream != null ? inputStream : new ByteArrayInputStream(new byte[0])); } - @Override public void transferTo(File dest) throws IOException, IllegalStateException { if (!isAvailable()) { throw new IllegalStateException("File has already been moved - cannot be transferred again"); diff --git a/spring-web/src/main/java/org/springframework/web/multipart/commons/CommonsMultipartResolver.java b/spring-web/src/main/java/org/springframework/web/multipart/commons/CommonsMultipartResolver.java index 977042863d..25f743befc 100644 --- a/spring-web/src/main/java/org/springframework/web/multipart/commons/CommonsMultipartResolver.java +++ b/spring-web/src/main/java/org/springframework/web/multipart/commons/CommonsMultipartResolver.java @@ -111,7 +111,6 @@ public class CommonsMultipartResolver extends CommonsFileUploadSupport return new ServletFileUpload(fileItemFactory); } - @Override public void setServletContext(ServletContext servletContext) { if (!isUploadTempDirSpecified()) { getFileItemFactory().setRepository(WebUtils.getTempDir(servletContext)); @@ -119,12 +118,10 @@ public class CommonsMultipartResolver extends CommonsFileUploadSupport } - @Override public boolean isMultipart(HttpServletRequest request) { return (request != null && ServletFileUpload.isMultipartContent(request)); } - @Override public MultipartHttpServletRequest resolveMultipart(final HttpServletRequest request) throws MultipartException { Assert.notNull(request, "Request must not be null"); if (this.resolveLazily) { @@ -185,7 +182,6 @@ public class CommonsMultipartResolver extends CommonsFileUploadSupport return encoding; } - @Override public void cleanupMultipart(MultipartHttpServletRequest request) { if (request != null) { try { diff --git a/spring-web/src/main/java/org/springframework/web/multipart/support/AbstractMultipartHttpServletRequest.java b/spring-web/src/main/java/org/springframework/web/multipart/support/AbstractMultipartHttpServletRequest.java index decbe3859f..9f8b4e52bd 100644 --- a/spring-web/src/main/java/org/springframework/web/multipart/support/AbstractMultipartHttpServletRequest.java +++ b/spring-web/src/main/java/org/springframework/web/multipart/support/AbstractMultipartHttpServletRequest.java @@ -59,12 +59,10 @@ public abstract class AbstractMultipartHttpServletRequest extends HttpServletReq return (HttpServletRequest) super.getRequest(); } - @Override public HttpMethod getRequestMethod() { return HttpMethod.valueOf(getRequest().getMethod()); } - @Override public HttpHeaders getRequestHeaders() { HttpHeaders headers = new HttpHeaders(); Enumeration headerNames = getHeaderNames(); @@ -75,17 +73,14 @@ public abstract class AbstractMultipartHttpServletRequest extends HttpServletReq return headers; } - @Override public Iterator getFileNames() { return getMultipartFiles().keySet().iterator(); } - @Override public MultipartFile getFile(String name) { return getMultipartFiles().getFirst(name); } - @Override public List getFiles(String name) { List multipartFiles = getMultipartFiles().get(name); if (multipartFiles != null) { @@ -96,12 +91,10 @@ public abstract class AbstractMultipartHttpServletRequest extends HttpServletReq } } - @Override public Map getFileMap() { return getMultipartFiles().toSingleValueMap(); } - @Override public MultiValueMap getMultiFileMap() { return getMultipartFiles(); } diff --git a/spring-web/src/main/java/org/springframework/web/multipart/support/DefaultMultipartHttpServletRequest.java b/spring-web/src/main/java/org/springframework/web/multipart/support/DefaultMultipartHttpServletRequest.java index 33c9925ea7..ee0a9b7f65 100644 --- a/spring-web/src/main/java/org/springframework/web/multipart/support/DefaultMultipartHttpServletRequest.java +++ b/spring-web/src/main/java/org/springframework/web/multipart/support/DefaultMultipartHttpServletRequest.java @@ -110,7 +110,6 @@ public class DefaultMultipartHttpServletRequest extends AbstractMultipartHttpSer return paramMap; } - @Override public String getMultipartContentType(String paramOrFileName) { MultipartFile file = getFile(paramOrFileName); if (file != null) { @@ -121,7 +120,6 @@ public class DefaultMultipartHttpServletRequest extends AbstractMultipartHttpSer } } - @Override public HttpHeaders getMultipartHeaders(String paramOrFileName) { String contentType = getMultipartContentType(paramOrFileName); if (contentType != null) { diff --git a/spring-web/src/main/java/org/springframework/web/multipart/support/StandardMultipartHttpServletRequest.java b/spring-web/src/main/java/org/springframework/web/multipart/support/StandardMultipartHttpServletRequest.java index 46a9886fe2..38287b4f95 100644 --- a/spring-web/src/main/java/org/springframework/web/multipart/support/StandardMultipartHttpServletRequest.java +++ b/spring-web/src/main/java/org/springframework/web/multipart/support/StandardMultipartHttpServletRequest.java @@ -95,7 +95,6 @@ public class StandardMultipartHttpServletRequest extends AbstractMultipartHttpSe } - @Override public String getMultipartContentType(String paramOrFileName) { try { Part part = getPart(paramOrFileName); @@ -106,7 +105,6 @@ public class StandardMultipartHttpServletRequest extends AbstractMultipartHttpSe } } - @Override public HttpHeaders getMultipartHeaders(String paramOrFileName) { try { Part part = getPart(paramOrFileName); @@ -141,42 +139,34 @@ public class StandardMultipartHttpServletRequest extends AbstractMultipartHttpSe this.filename = filename; } - @Override public String getName() { return this.part.getName(); } - @Override public String getOriginalFilename() { return this.filename; } - @Override public String getContentType() { return this.part.getContentType(); } - @Override public boolean isEmpty() { return (this.part.getSize() == 0); } - @Override public long getSize() { return this.part.getSize(); } - @Override public byte[] getBytes() throws IOException { return FileCopyUtils.copyToByteArray(this.part.getInputStream()); } - @Override public InputStream getInputStream() throws IOException { return this.part.getInputStream(); } - @Override public void transferTo(File dest) throws IOException, IllegalStateException { this.part.write(dest.getPath()); } diff --git a/spring-web/src/main/java/org/springframework/web/multipart/support/StandardServletMultipartResolver.java b/spring-web/src/main/java/org/springframework/web/multipart/support/StandardServletMultipartResolver.java index 25cc39510a..f2b564e1c6 100644 --- a/spring-web/src/main/java/org/springframework/web/multipart/support/StandardServletMultipartResolver.java +++ b/spring-web/src/main/java/org/springframework/web/multipart/support/StandardServletMultipartResolver.java @@ -45,7 +45,6 @@ import org.springframework.web.multipart.MultipartResolver; */ public class StandardServletMultipartResolver implements MultipartResolver { - @Override public boolean isMultipart(HttpServletRequest request) { // Same check as in Commons FileUpload... if (!"post".equals(request.getMethod().toLowerCase())) { @@ -55,12 +54,10 @@ public class StandardServletMultipartResolver implements MultipartResolver { return (contentType != null && contentType.toLowerCase().startsWith("multipart/")); } - @Override public MultipartHttpServletRequest resolveMultipart(HttpServletRequest request) throws MultipartException { return new StandardMultipartHttpServletRequest(request); } - @Override public void cleanupMultipart(MultipartHttpServletRequest request) { // To be on the safe side: explicitly delete the parts, // but only actual file parts (for Resin compatibility) diff --git a/spring-web/src/main/java/org/springframework/web/util/HierarchicalUriComponents.java b/spring-web/src/main/java/org/springframework/web/util/HierarchicalUriComponents.java index 9591e80cf5..f3a5ec9013 100644 --- a/spring-web/src/main/java/org/springframework/web/util/HierarchicalUriComponents.java +++ b/spring-web/src/main/java/org/springframework/web/util/HierarchicalUriComponents.java @@ -639,30 +639,25 @@ final class HierarchicalUriComponents extends UriComponents { this.path = path; } - @Override public String getPath() { return path; } - @Override public List getPathSegments() { String delimiter = new String(new char[]{PATH_DELIMITER}); String[] pathSegments = StringUtils.tokenizeToStringArray(path, delimiter); return Collections.unmodifiableList(Arrays.asList(pathSegments)); } - @Override public PathComponent encode(String encoding) throws UnsupportedEncodingException { String encodedPath = encodeUriComponent(getPath(),encoding, Type.PATH); return new FullPathComponent(encodedPath); } - @Override public void verify() { verifyUriComponent(this.path, Type.PATH); } - @Override public PathComponent expand(UriTemplateVariables uriVariables) { String expandedPath = expandUriComponent(getPath(), uriVariables); return new FullPathComponent(expandedPath); @@ -691,7 +686,6 @@ final class HierarchicalUriComponents extends UriComponents { this.pathSegments = Collections.unmodifiableList(pathSegments); } - @Override public String getPath() { StringBuilder pathBuilder = new StringBuilder(); pathBuilder.append(PATH_DELIMITER); @@ -705,12 +699,10 @@ final class HierarchicalUriComponents extends UriComponents { return pathBuilder.toString(); } - @Override public List getPathSegments() { return this.pathSegments; } - @Override public PathComponent encode(String encoding) throws UnsupportedEncodingException { List pathSegments = getPathSegments(); List encodedPathSegments = new ArrayList(pathSegments.size()); @@ -721,14 +713,12 @@ final class HierarchicalUriComponents extends UriComponents { return new PathSegmentComponent(encodedPathSegments); } - @Override public void verify() { for (String pathSegment : getPathSegments()) { verifyUriComponent(pathSegment, Type.PATH_SEGMENT); } } - @Override public PathComponent expand(UriTemplateVariables uriVariables) { List pathSegments = getPathSegments(); List expandedPathSegments = new ArrayList(pathSegments.size()); @@ -763,7 +753,6 @@ final class HierarchicalUriComponents extends UriComponents { this.pathComponents = pathComponents; } - @Override public String getPath() { StringBuilder pathBuilder = new StringBuilder(); for (PathComponent pathComponent : this.pathComponents) { @@ -772,7 +761,6 @@ final class HierarchicalUriComponents extends UriComponents { return pathBuilder.toString(); } - @Override public List getPathSegments() { List result = new ArrayList(); for (PathComponent pathComponent : this.pathComponents) { @@ -781,7 +769,6 @@ final class HierarchicalUriComponents extends UriComponents { return result; } - @Override public PathComponent encode(String encoding) throws UnsupportedEncodingException { List encodedComponents = new ArrayList(pathComponents.size()); for (PathComponent pathComponent : pathComponents) { @@ -790,14 +777,12 @@ final class HierarchicalUriComponents extends UriComponents { return new PathComponentComposite(encodedComponents); } - @Override public void verify() { for (PathComponent pathComponent : pathComponents) { pathComponent.verify(); } } - @Override public PathComponent expand(UriTemplateVariables uriVariables) { List expandedComponents = new ArrayList(this.pathComponents.size()); for (PathComponent pathComponent : this.pathComponents) { @@ -814,26 +799,21 @@ final class HierarchicalUriComponents extends UriComponents { */ final static PathComponent NULL_PATH_COMPONENT = new PathComponent() { - @Override public String getPath() { return null; } - @Override public List getPathSegments() { return Collections.emptyList(); } - @Override public PathComponent encode(String encoding) throws UnsupportedEncodingException { return this; } - @Override public void verify() { } - @Override public PathComponent expand(UriTemplateVariables uriVariables) { return this; } diff --git a/spring-web/src/main/java/org/springframework/web/util/HttpSessionMutexListener.java b/spring-web/src/main/java/org/springframework/web/util/HttpSessionMutexListener.java index c0a7f344e6..ab7a710147 100644 --- a/spring-web/src/main/java/org/springframework/web/util/HttpSessionMutexListener.java +++ b/spring-web/src/main/java/org/springframework/web/util/HttpSessionMutexListener.java @@ -44,12 +44,10 @@ import javax.servlet.http.HttpSessionListener; */ public class HttpSessionMutexListener implements HttpSessionListener { - @Override public void sessionCreated(HttpSessionEvent event) { event.getSession().setAttribute(WebUtils.SESSION_MUTEX_ATTRIBUTE, new Mutex()); } - @Override public void sessionDestroyed(HttpSessionEvent event) { event.getSession().removeAttribute(WebUtils.SESSION_MUTEX_ATTRIBUTE); } diff --git a/spring-web/src/main/java/org/springframework/web/util/IntrospectorCleanupListener.java b/spring-web/src/main/java/org/springframework/web/util/IntrospectorCleanupListener.java index 8a96df095a..bf0ed911b4 100644 --- a/spring-web/src/main/java/org/springframework/web/util/IntrospectorCleanupListener.java +++ b/spring-web/src/main/java/org/springframework/web/util/IntrospectorCleanupListener.java @@ -71,12 +71,10 @@ import org.springframework.beans.CachedIntrospectionResults; */ public class IntrospectorCleanupListener implements ServletContextListener { - @Override public void contextInitialized(ServletContextEvent event) { CachedIntrospectionResults.acceptClassLoader(Thread.currentThread().getContextClassLoader()); } - @Override public void contextDestroyed(ServletContextEvent event) { CachedIntrospectionResults.clearClassLoader(Thread.currentThread().getContextClassLoader()); Introspector.flushCaches(); diff --git a/spring-web/src/main/java/org/springframework/web/util/Log4jConfigListener.java b/spring-web/src/main/java/org/springframework/web/util/Log4jConfigListener.java index ad38baa0df..0ca9e35d32 100644 --- a/spring-web/src/main/java/org/springframework/web/util/Log4jConfigListener.java +++ b/spring-web/src/main/java/org/springframework/web/util/Log4jConfigListener.java @@ -41,12 +41,10 @@ import javax.servlet.ServletContextListener; */ public class Log4jConfigListener implements ServletContextListener { - @Override public void contextInitialized(ServletContextEvent event) { Log4jWebConfigurer.initLogging(event.getServletContext()); } - @Override public void contextDestroyed(ServletContextEvent event) { Log4jWebConfigurer.shutdownLogging(event.getServletContext()); } diff --git a/spring-web/src/main/java/org/springframework/web/util/UriComponents.java b/spring-web/src/main/java/org/springframework/web/util/UriComponents.java index 7c5bd604a2..f04c5f695b 100644 --- a/spring-web/src/main/java/org/springframework/web/util/UriComponents.java +++ b/spring-web/src/main/java/org/springframework/web/util/UriComponents.java @@ -246,7 +246,6 @@ public abstract class UriComponents { this.uriVariables = uriVariables; } - @Override public Object getValue(String name) { if (!this.uriVariables.containsKey(name)) { throw new IllegalArgumentException("Map has no value for '" + name + "'"); @@ -267,7 +266,6 @@ public abstract class UriComponents { this.valueIterator = Arrays.asList(uriVariableValues).iterator(); } - @Override public Object getValue(String name) { if (!valueIterator.hasNext()) { throw new IllegalArgumentException( diff --git a/spring-web/src/main/java/org/springframework/web/util/UriComponentsBuilder.java b/spring-web/src/main/java/org/springframework/web/util/UriComponentsBuilder.java index 975d3f5c4b..141cd7b86e 100644 --- a/spring-web/src/main/java/org/springframework/web/util/UriComponentsBuilder.java +++ b/spring-web/src/main/java/org/springframework/web/util/UriComponentsBuilder.java @@ -611,18 +611,15 @@ public class UriComponentsBuilder { this.path = new StringBuilder(path); } - @Override public HierarchicalUriComponents.PathComponent build() { return new HierarchicalUriComponents.FullPathComponent(path.toString()); } - @Override public PathComponentBuilder appendPath(String path) { this.path.append(path); return this; } - @Override public PathComponentBuilder appendPathSegments(String... pathSegments) { PathComponentCompositeBuilder builder = new PathComponentCompositeBuilder(this); builder.appendPathSegments(pathSegments); @@ -651,19 +648,16 @@ public class UriComponentsBuilder { return result; } - @Override public HierarchicalUriComponents.PathComponent build() { return new HierarchicalUriComponents.PathSegmentComponent(pathSegments); } - @Override public PathComponentBuilder appendPath(String path) { PathComponentCompositeBuilder builder = new PathComponentCompositeBuilder(this); builder.appendPath(path); return builder; } - @Override public PathComponentBuilder appendPathSegments(String... pathSegments) { this.pathSegments.addAll(removeEmptyPathSegments(pathSegments)); return this; @@ -681,7 +675,6 @@ public class UriComponentsBuilder { pathComponentBuilders.add(builder); } - @Override public HierarchicalUriComponents.PathComponent build() { List pathComponents = new ArrayList(pathComponentBuilders.size()); @@ -692,13 +685,11 @@ public class UriComponentsBuilder { return new HierarchicalUriComponents.PathComponentComposite(pathComponents); } - @Override public PathComponentBuilder appendPath(String path) { this.pathComponentBuilders.add(new FullPathComponentBuilder(path)); return this; } - @Override public PathComponentBuilder appendPathSegments(String... pathSegments) { this.pathComponentBuilders.add(new PathSegmentComponentBuilder(pathSegments)); return this; @@ -711,17 +702,14 @@ public class UriComponentsBuilder { */ private static PathComponentBuilder NULL_PATH_COMPONENT_BUILDER = new PathComponentBuilder() { - @Override public HierarchicalUriComponents.PathComponent build() { return HierarchicalUriComponents.NULL_PATH_COMPONENT; } - @Override public PathComponentBuilder appendPath(String path) { return new FullPathComponentBuilder(path); } - @Override public PathComponentBuilder appendPathSegments(String... pathSegments) { return new PathSegmentComponentBuilder(pathSegments); } diff --git a/spring-web/src/main/java/org/springframework/web/util/WebAppRootListener.java b/spring-web/src/main/java/org/springframework/web/util/WebAppRootListener.java index 36078f7b63..832ea24d31 100644 --- a/spring-web/src/main/java/org/springframework/web/util/WebAppRootListener.java +++ b/spring-web/src/main/java/org/springframework/web/util/WebAppRootListener.java @@ -52,12 +52,10 @@ import javax.servlet.ServletContextListener; */ public class WebAppRootListener implements ServletContextListener { - @Override public void contextInitialized(ServletContextEvent event) { WebUtils.setWebAppRootSystemProperty(event.getServletContext()); } - @Override public void contextDestroyed(ServletContextEvent event) { WebUtils.removeWebAppRootSystemProperty(event.getServletContext()); } diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/FrameworkPortlet.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/FrameworkPortlet.java index d67899df6a..b876da36b7 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/FrameworkPortlet.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/FrameworkPortlet.java @@ -421,7 +421,6 @@ public abstract class FrameworkPortlet extends GenericPortletBean * triggering a refresh of this servlet's context-dependent state. * @param event the incoming ApplicationContext event */ - @Override public void onApplicationEvent(ContextRefreshedEvent event) { this.refreshEventReceived = true; onRefresh(event.getApplicationContext()); diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/GenericPortletBean.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/GenericPortletBean.java index 4febdfc9e8..13b981b941 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/GenericPortletBean.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/GenericPortletBean.java @@ -174,7 +174,6 @@ public abstract class GenericPortletBean extends GenericPortlet * @throws IllegalArgumentException if environment is not assignable to * {@code ConfigurableEnvironment}. */ - @Override public void setEnvironment(Environment environment) { Assert.isInstanceOf(ConfigurableEnvironment.class, environment); this.environment = (ConfigurableEnvironment)environment; @@ -185,7 +184,6 @@ public abstract class GenericPortletBean extends GenericPortlet *

If {@code null}, a new environment will be initialized via * {@link #createEnvironment()}. */ - @Override public ConfigurableEnvironment getEnvironment() { if (this.environment == null) { this.environment = this.createEnvironment(); diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/AbstractRefreshablePortletApplicationContext.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/AbstractRefreshablePortletApplicationContext.java index 1df9110d19..c61dd503ed 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/AbstractRefreshablePortletApplicationContext.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/AbstractRefreshablePortletApplicationContext.java @@ -104,22 +104,18 @@ public abstract class AbstractRefreshablePortletApplicationContext extends Abstr } } - @Override public ServletContext getServletContext() { return this.servletContext; } - @Override public void setPortletContext(PortletContext portletContext) { this.portletContext = portletContext; } - @Override public PortletContext getPortletContext() { return this.portletContext; } - @Override public void setPortletConfig(PortletConfig portletConfig) { this.portletConfig = portletConfig; if (portletConfig != null && this.portletContext == null) { @@ -127,12 +123,10 @@ public abstract class AbstractRefreshablePortletApplicationContext extends Abstr } } - @Override public PortletConfig getPortletConfig() { return this.portletConfig; } - @Override public void setNamespace(String namespace) { this.namespace = namespace; if (namespace != null) { @@ -140,7 +134,6 @@ public abstract class AbstractRefreshablePortletApplicationContext extends Abstr } } - @Override public String getNamespace() { return this.namespace; } diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletApplicationContextUtils.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletApplicationContextUtils.java index e218e2938e..40d39905e1 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletApplicationContextUtils.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletApplicationContextUtils.java @@ -244,7 +244,6 @@ public abstract class PortletApplicationContextUtils { @SuppressWarnings("serial") private static class RequestObjectFactory implements ObjectFactory, Serializable { - @Override public PortletRequest getObject() { return currentRequestAttributes().getRequest(); } @@ -262,7 +261,6 @@ public abstract class PortletApplicationContextUtils { @SuppressWarnings("serial") private static class SessionObjectFactory implements ObjectFactory, Serializable { - @Override public PortletSession getObject() { return currentRequestAttributes().getRequest().getPortletSession(); } @@ -280,7 +278,6 @@ public abstract class PortletApplicationContextUtils { @SuppressWarnings("serial") private static class WebRequestObjectFactory implements ObjectFactory, Serializable { - @Override public WebRequest getObject() { return new PortletWebRequest(currentRequestAttributes().getRequest()); } diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletApplicationObjectSupport.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletApplicationObjectSupport.java index d780573c15..0007c187e4 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletApplicationObjectSupport.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletApplicationObjectSupport.java @@ -36,7 +36,6 @@ public abstract class PortletApplicationObjectSupport extends ApplicationObjectS private PortletContext portletContext; - @Override public void setPortletContext(PortletContext portletContext) { this.portletContext = portletContext; } diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletContextAwareProcessor.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletContextAwareProcessor.java index c941c6a187..b9df018158 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletContextAwareProcessor.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletContextAwareProcessor.java @@ -69,7 +69,6 @@ public class PortletContextAwareProcessor implements BeanPostProcessor { } - @Override public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { if (this.portletContext != null && bean instanceof PortletContextAware) { ((PortletContextAware) bean).setPortletContext(this.portletContext); @@ -80,7 +79,6 @@ public class PortletContextAwareProcessor implements BeanPostProcessor { return bean; } - @Override public Object postProcessAfterInitialization(Object bean, String beanName) { return bean; } diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletContextResource.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletContextResource.java index 492d1432e8..22fe3c7dd8 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletContextResource.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletContextResource.java @@ -134,7 +134,6 @@ public class PortletContextResource extends AbstractFileResolvingResource implem * but throws a FileNotFoundException if not found. * @see javax.portlet.PortletContext#getResourceAsStream(String) */ - @Override public InputStream getInputStream() throws IOException { InputStream is = this.portletContext.getResourceAsStream(this.path); if (is == null) { @@ -189,12 +188,10 @@ public class PortletContextResource extends AbstractFileResolvingResource implem return StringUtils.getFilename(this.path); } - @Override public String getDescription() { return "PortletContext resource [" + this.path + "]"; } - @Override public String getPathWithinContext() { return this.path; } diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletContextScope.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletContextScope.java index e2c42a09bb..5dd52cfd49 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletContextScope.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletContextScope.java @@ -62,7 +62,6 @@ public class PortletContextScope implements Scope, DisposableBean { } - @Override public Object get(String name, ObjectFactory objectFactory) { Object scopedObject = this.portletContext.getAttribute(name); if (scopedObject == null) { @@ -72,7 +71,6 @@ public class PortletContextScope implements Scope, DisposableBean { return scopedObject; } - @Override public Object remove(String name) { Object scopedObject = this.portletContext.getAttribute(name); if (scopedObject != null) { @@ -85,17 +83,14 @@ public class PortletContextScope implements Scope, DisposableBean { } } - @Override public void registerDestructionCallback(String name, Runnable callback) { this.destructionCallbacks.put(name, callback); } - @Override public Object resolveContextualObject(String key) { return null; } - @Override public String getConversationId() { return null; } @@ -106,7 +101,6 @@ public class PortletContextScope implements Scope, DisposableBean { * To be called on ServletContext shutdown. * @see org.springframework.web.context.ContextCleanupListener */ - @Override public void destroy() { for (Runnable runnable : this.destructionCallbacks.values()) { runnable.run(); diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletRequestAttributes.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletRequestAttributes.java index 9c21f505fd..6a7e1c83db 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletRequestAttributes.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletRequestAttributes.java @@ -100,7 +100,6 @@ public class PortletRequestAttributes extends AbstractRequestAttributes { } - @Override public Object getAttribute(String name, int scope) { if (scope == SCOPE_REQUEST) { if (!isRequestActive()) { @@ -137,7 +136,6 @@ public class PortletRequestAttributes extends AbstractRequestAttributes { } } - @Override public void setAttribute(String name, Object value, int scope) { if (scope == SCOPE_REQUEST) { if (!isRequestActive()) { @@ -163,7 +161,6 @@ public class PortletRequestAttributes extends AbstractRequestAttributes { } } - @Override public void removeAttribute(String name, int scope) { if (scope == SCOPE_REQUEST) { if (isRequestActive()) { @@ -190,7 +187,6 @@ public class PortletRequestAttributes extends AbstractRequestAttributes { } } - @Override public String[] getAttributeNames(int scope) { if (scope == SCOPE_REQUEST) { if (!isRequestActive()) { @@ -215,7 +211,6 @@ public class PortletRequestAttributes extends AbstractRequestAttributes { } } - @Override public void registerDestructionCallback(String name, Runnable callback, int scope) { if (scope == SCOPE_REQUEST) { registerRequestDestructionCallback(name, callback); @@ -225,7 +220,6 @@ public class PortletRequestAttributes extends AbstractRequestAttributes { } } - @Override public Object resolveReference(String key) { if (REFERENCE_REQUEST.equals(key)) { return this.request; @@ -238,12 +232,10 @@ public class PortletRequestAttributes extends AbstractRequestAttributes { } } - @Override public String getSessionId() { return getSession(true).getId(); } - @Override public Object getSessionMutex() { return PortletUtils.getSessionMutex(getSession(true)); } diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletWebRequest.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletWebRequest.java index 76c41e96d1..fe6348dd6d 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletWebRequest.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletWebRequest.java @@ -68,91 +68,74 @@ public class PortletWebRequest extends PortletRequestAttributes implements Nativ return this.response; } - @Override public Object getNativeRequest() { return getRequest(); } - @Override public Object getNativeResponse() { return getResponse(); } - @Override @SuppressWarnings("unchecked") public T getNativeRequest(Class requiredType) { return PortletUtils.getNativeRequest(getRequest(), requiredType); } - @Override @SuppressWarnings("unchecked") public T getNativeResponse(Class requiredType) { return PortletUtils.getNativeResponse(getResponse(), requiredType); } - @Override public String getHeader(String headerName) { return getRequest().getProperty(headerName); } - @Override public String[] getHeaderValues(String headerName) { String[] headerValues = StringUtils.toStringArray(getRequest().getProperties(headerName)); return (!ObjectUtils.isEmpty(headerValues) ? headerValues : null); } - @Override public Iterator getHeaderNames() { return CollectionUtils.toIterator(getRequest().getPropertyNames()); } - @Override public String getParameter(String paramName) { return getRequest().getParameter(paramName); } - @Override public String[] getParameterValues(String paramName) { return getRequest().getParameterValues(paramName); } - @Override public Iterator getParameterNames() { return CollectionUtils.toIterator(getRequest().getParameterNames()); } - @Override public Map getParameterMap() { return getRequest().getParameterMap(); } - @Override public Locale getLocale() { return getRequest().getLocale(); } - @Override public String getContextPath() { return getRequest().getContextPath(); } - @Override public String getRemoteUser() { return getRequest().getRemoteUser(); } - @Override public Principal getUserPrincipal() { return getRequest().getUserPrincipal(); } - @Override public boolean isUserInRole(String role) { return getRequest().isUserInRole(role); } - @Override public boolean isSecure() { return getRequest().isSecure(); } @@ -161,7 +144,6 @@ public class PortletWebRequest extends PortletRequestAttributes implements Nativ * Last-modified handling not supported for portlet requests: * As a consequence, this method always returns {@code false}. */ - @Override public boolean checkNotModified(long lastModifiedTimestamp) { return false; } @@ -170,12 +152,10 @@ public class PortletWebRequest extends PortletRequestAttributes implements Nativ * Last-modified handling not supported for portlet requests: * As a consequence, this method always returns {@code false}. */ - @Override public boolean checkNotModified(String eTag) { return false; } - @Override public String getDescription(boolean includeClientInfo) { PortletRequest request = getRequest(); StringBuilder result = new StringBuilder(); diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/StaticPortletApplicationContext.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/StaticPortletApplicationContext.java index fdd23d92c5..d1c1b2ad2a 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/StaticPortletApplicationContext.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/StaticPortletApplicationContext.java @@ -101,22 +101,18 @@ public class StaticPortletApplicationContext extends StaticApplicationContext } } - @Override public ServletContext getServletContext() { return this.servletContext; } - @Override public void setPortletContext(PortletContext portletContext) { this.portletContext = portletContext; } - @Override public PortletContext getPortletContext() { return this.portletContext; } - @Override public void setPortletConfig(PortletConfig portletConfig) { this.portletConfig = portletConfig; if (portletConfig != null && this.portletContext == null) { @@ -124,12 +120,10 @@ public class StaticPortletApplicationContext extends StaticApplicationContext } } - @Override public PortletConfig getPortletConfig() { return this.portletConfig; } - @Override public void setNamespace(String namespace) { this.namespace = namespace; if (namespace != null) { @@ -137,7 +131,6 @@ public class StaticPortletApplicationContext extends StaticApplicationContext } } - @Override public String getNamespace() { return this.namespace; } @@ -146,7 +139,6 @@ public class StaticPortletApplicationContext extends StaticApplicationContext * The {@link StaticPortletApplicationContext} class does not support this method. * @throws UnsupportedOperationException always */ - @Override public void setConfigLocation(String configLocation) { if (configLocation != null) { throw new UnsupportedOperationException("StaticPortletApplicationContext does not support config locations"); @@ -157,14 +149,12 @@ public class StaticPortletApplicationContext extends StaticApplicationContext * The {@link StaticPortletApplicationContext} class does not support this method. * @throws UnsupportedOperationException always */ - @Override public void setConfigLocations(String[] configLocations) { if (configLocations != null) { throw new UnsupportedOperationException("StaticPortletApplicationContext does not support config locations"); } } - @Override public String[] getConfigLocations() { return null; } diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/AbstractHandlerExceptionResolver.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/AbstractHandlerExceptionResolver.java index 32a7299557..64365dfa48 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/AbstractHandlerExceptionResolver.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/AbstractHandlerExceptionResolver.java @@ -61,7 +61,6 @@ public abstract class AbstractHandlerExceptionResolver implements HandlerExcepti this.order = order; } - @Override public int getOrder() { return this.order; } @@ -125,7 +124,6 @@ public abstract class AbstractHandlerExceptionResolver implements HandlerExcepti * matches in case of "mappedHandlers" having been specified), then * delegates to the {@link #doResolveException} template method. */ - @Override public ModelAndView resolveException(RenderRequest request, RenderResponse response, Object handler, Exception ex) { if (shouldApplyTo(request, handler)) { return doResolveException(request, response, handler, ex); @@ -135,7 +133,6 @@ public abstract class AbstractHandlerExceptionResolver implements HandlerExcepti } } - @Override public ModelAndView resolveException(ResourceRequest request, ResourceResponse response, Object handler, Exception ex) { if (shouldApplyTo(request, handler)) { return doResolveException(request, response, handler, ex); diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/AbstractHandlerMapping.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/AbstractHandlerMapping.java index c648433cc1..8e3cb90f3f 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/AbstractHandlerMapping.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/AbstractHandlerMapping.java @@ -63,7 +63,6 @@ public abstract class AbstractHandlerMapping extends ApplicationObjectSupport im this.order = order; } - @Override public final int getOrder() { return this.order; } @@ -202,7 +201,6 @@ public abstract class AbstractHandlerMapping extends ApplicationObjectSupport im * @return the corresponding handler instance, or the default handler * @see #getHandlerInternal */ - @Override public final HandlerExecutionChain getHandler(PortletRequest request) throws Exception { Object handler = getHandlerInternal(request); if (handler == null) { diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/HandlerInterceptorAdapter.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/HandlerInterceptorAdapter.java index 7b052cca12..9c3bff5f2a 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/HandlerInterceptorAdapter.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/HandlerInterceptorAdapter.java @@ -43,7 +43,6 @@ public abstract class HandlerInterceptorAdapter implements HandlerInterceptor { /** * This implementation delegates to {@link #preHandle}. */ - @Override public boolean preHandleAction(ActionRequest request, ActionResponse response, Object handler) throws Exception { @@ -53,7 +52,6 @@ public abstract class HandlerInterceptorAdapter implements HandlerInterceptor { /** * This implementation delegates to {@link #afterCompletion}. */ - @Override public void afterActionCompletion( ActionRequest request, ActionResponse response, Object handler, Exception ex) throws Exception { @@ -65,7 +63,6 @@ public abstract class HandlerInterceptorAdapter implements HandlerInterceptor { /** * This implementation delegates to {@link #preHandle}. */ - @Override public boolean preHandleRender(RenderRequest request, RenderResponse response, Object handler) throws Exception { @@ -75,7 +72,6 @@ public abstract class HandlerInterceptorAdapter implements HandlerInterceptor { /** * This implementation is empty. */ - @Override public void postHandleRender( RenderRequest request, RenderResponse response, Object handler, ModelAndView modelAndView) throws Exception { @@ -84,7 +80,6 @@ public abstract class HandlerInterceptorAdapter implements HandlerInterceptor { /** * This implementation delegates to {@link #afterCompletion}. */ - @Override public void afterRenderCompletion( RenderRequest request, RenderResponse response, Object handler, Exception ex) throws Exception { @@ -96,7 +91,6 @@ public abstract class HandlerInterceptorAdapter implements HandlerInterceptor { /** * This implementation delegates to {@link #preHandle}. */ - @Override public boolean preHandleResource(ResourceRequest request, ResourceResponse response, Object handler) throws Exception { @@ -106,7 +100,6 @@ public abstract class HandlerInterceptorAdapter implements HandlerInterceptor { /** * This implementation is empty. */ - @Override public void postHandleResource( ResourceRequest request, ResourceResponse response, Object handler, ModelAndView modelAndView) throws Exception { @@ -115,7 +108,6 @@ public abstract class HandlerInterceptorAdapter implements HandlerInterceptor { /** * This implementation delegates to {@link #afterCompletion}. */ - @Override public void afterResourceCompletion( ResourceRequest request, ResourceResponse response, Object handler, Exception ex) throws Exception { @@ -127,7 +119,6 @@ public abstract class HandlerInterceptorAdapter implements HandlerInterceptor { /** * This implementation delegates to {@link #preHandle}. */ - @Override public boolean preHandleEvent(EventRequest request, EventResponse response, Object handler) throws Exception { @@ -137,7 +128,6 @@ public abstract class HandlerInterceptorAdapter implements HandlerInterceptor { /** * This implementation delegates to {@link #afterCompletion}. */ - @Override public void afterEventCompletion( EventRequest request, EventResponse response, Object handler, Exception ex) throws Exception { diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/SimplePortletHandlerAdapter.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/SimplePortletHandlerAdapter.java index f7a884dad9..5ef81bb0ae 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/SimplePortletHandlerAdapter.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/SimplePortletHandlerAdapter.java @@ -63,25 +63,21 @@ public class SimplePortletHandlerAdapter implements HandlerAdapter, PortletConte private PortletContext portletContext; - @Override public void setPortletContext(PortletContext portletContext) { this.portletContext = portletContext; } - @Override public boolean supports(Object handler) { return (handler instanceof Portlet); } - @Override public void handleAction(ActionRequest request, ActionResponse response, Object handler) throws Exception { ((Portlet) handler).processAction(request, response); } - @Override public ModelAndView handleRender(RenderRequest request, RenderResponse response, Object handler) throws Exception { @@ -89,7 +85,6 @@ public class SimplePortletHandlerAdapter implements HandlerAdapter, PortletConte return null; } - @Override public ModelAndView handleResource(ResourceRequest request, ResourceResponse response, Object handler) throws Exception { @@ -103,7 +98,6 @@ public class SimplePortletHandlerAdapter implements HandlerAdapter, PortletConte return null; } - @Override public void handleEvent(EventRequest request, EventResponse response, Object handler) throws Exception { if (handler instanceof EventPortlet) { ((EventPortlet) handler).processEvent(request, response); diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/SimplePortletPostProcessor.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/SimplePortletPostProcessor.java index 62a79e4b71..c9cde4b1b0 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/SimplePortletPostProcessor.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/SimplePortletPostProcessor.java @@ -92,23 +92,19 @@ public class SimplePortletPostProcessor this.useSharedPortletConfig = useSharedPortletConfig; } - @Override public void setPortletContext(PortletContext portletContext) { this.portletContext = portletContext; } - @Override public void setPortletConfig(PortletConfig portletConfig) { this.portletConfig = portletConfig; } - @Override public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { return bean; } - @Override public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { if (bean instanceof Portlet) { PortletConfig config = this.portletConfig; @@ -125,7 +121,6 @@ public class SimplePortletPostProcessor return bean; } - @Override public void postProcessBeforeDestruction(Object bean, String beanName) throws BeansException { if (bean instanceof Portlet) { ((Portlet) bean).destroy(); @@ -151,57 +146,46 @@ public class SimplePortletPostProcessor this.portletConfig = portletConfig; } - @Override public String getPortletName() { return this.portletName; } - @Override public PortletContext getPortletContext() { return this.portletContext; } - @Override public String getInitParameter(String paramName) { return null; } - @Override public Enumeration getInitParameterNames() { return Collections.enumeration(new HashSet()); } - @Override public ResourceBundle getResourceBundle(Locale locale) { return (this.portletConfig != null ? this.portletConfig.getResourceBundle(locale) : null); } - @Override public Enumeration getPublicRenderParameterNames() { return Collections.enumeration(new HashSet()); } - @Override public String getDefaultNamespace() { return XMLConstants.NULL_NS_URI; } - @Override public Enumeration getPublishingEventQNames() { return Collections.enumeration(new HashSet()); } - @Override public Enumeration getProcessingEventQNames() { return Collections.enumeration(new HashSet()); } - @Override public Enumeration getSupportedLocales() { return Collections.enumeration(new HashSet()); } - @Override public Map getContainerRuntimeOptions() { return (this.portletConfig != null ? this.portletConfig.getContainerRuntimeOptions() : null); } diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/WebRequestHandlerInterceptorAdapter.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/WebRequestHandlerInterceptorAdapter.java index b871ed7059..6026dd17b4 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/WebRequestHandlerInterceptorAdapter.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/WebRequestHandlerInterceptorAdapter.java @@ -76,7 +76,6 @@ public class WebRequestHandlerInterceptorAdapter implements HandlerInterceptor { } - @Override public boolean preHandleAction(ActionRequest request, ActionResponse response, Object handler) throws Exception { if (!this.renderPhaseOnly) { this.requestInterceptor.preHandle(new PortletWebRequest(request)); @@ -84,7 +83,6 @@ public class WebRequestHandlerInterceptorAdapter implements HandlerInterceptor { return true; } - @Override public void afterActionCompletion( ActionRequest request, ActionResponse response, Object handler, Exception ex) throws Exception { @@ -93,13 +91,11 @@ public class WebRequestHandlerInterceptorAdapter implements HandlerInterceptor { } } - @Override public boolean preHandleRender(RenderRequest request, RenderResponse response, Object handler) throws Exception { this.requestInterceptor.preHandle(new PortletWebRequest(request)); return true; } - @Override public void postHandleRender( RenderRequest request, RenderResponse response, Object handler, ModelAndView modelAndView) throws Exception { @@ -107,14 +103,12 @@ public class WebRequestHandlerInterceptorAdapter implements HandlerInterceptor { (modelAndView != null && !modelAndView.wasCleared() ? modelAndView.getModelMap() : null)); } - @Override public void afterRenderCompletion( RenderRequest request, RenderResponse response, Object handler, Exception ex) throws Exception { this.requestInterceptor.afterCompletion(new PortletWebRequest(request), ex); } - @Override public boolean preHandleResource(ResourceRequest request, ResourceResponse response, Object handler) throws Exception { @@ -122,7 +116,6 @@ public class WebRequestHandlerInterceptorAdapter implements HandlerInterceptor { return true; } - @Override public void postHandleResource(ResourceRequest request, ResourceResponse response, Object handler, ModelAndView modelAndView) throws Exception { @@ -130,20 +123,17 @@ public class WebRequestHandlerInterceptorAdapter implements HandlerInterceptor { (modelAndView != null ? modelAndView.getModelMap() : null)); } - @Override public void afterResourceCompletion(ResourceRequest request, ResourceResponse response, Object handler, Exception ex) throws Exception { this.requestInterceptor.afterCompletion(new PortletWebRequest(request), ex); } - @Override public boolean preHandleEvent(EventRequest request, EventResponse response, Object handler) throws Exception { this.requestInterceptor.preHandle(new PortletWebRequest(request)); return true; } - @Override public void afterEventCompletion(EventRequest request, EventResponse response, Object handler, Exception ex) throws Exception { diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/multipart/CommonsPortletMultipartResolver.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/multipart/CommonsPortletMultipartResolver.java index 4e4cf8499e..0489721509 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/multipart/CommonsPortletMultipartResolver.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/multipart/CommonsPortletMultipartResolver.java @@ -106,7 +106,6 @@ public class CommonsPortletMultipartResolver extends CommonsFileUploadSupport return new PortletFileUpload(fileItemFactory); } - @Override public void setPortletContext(PortletContext portletContext) { if (!isUploadTempDirSpecified()) { getFileItemFactory().setRepository(PortletUtils.getTempDir(portletContext)); @@ -114,12 +113,10 @@ public class CommonsPortletMultipartResolver extends CommonsFileUploadSupport } - @Override public boolean isMultipart(ActionRequest request) { return (request != null && PortletFileUpload.isMultipartContent(request)); } - @Override public MultipartActionRequest resolveMultipart(final ActionRequest request) throws MultipartException { Assert.notNull(request, "Request must not be null"); if (this.resolveLazily) { @@ -180,7 +177,6 @@ public class CommonsPortletMultipartResolver extends CommonsFileUploadSupport return encoding; } - @Override public void cleanupMultipart(MultipartActionRequest request) { if (request != null) { try { diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/multipart/DefaultMultipartActionRequest.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/multipart/DefaultMultipartActionRequest.java index 8ee6e40785..a46f14b9b1 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/multipart/DefaultMultipartActionRequest.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/multipart/DefaultMultipartActionRequest.java @@ -74,17 +74,14 @@ public class DefaultMultipartActionRequest extends ActionRequestWrapper implemen } - @Override public Iterator getFileNames() { return getMultipartFiles().keySet().iterator(); } - @Override public MultipartFile getFile(String name) { return getMultipartFiles().getFirst(name); } - @Override public List getFiles(String name) { List multipartFiles = getMultipartFiles().get(name); if (multipartFiles != null) { @@ -96,12 +93,10 @@ public class DefaultMultipartActionRequest extends ActionRequestWrapper implemen } - @Override public Map getFileMap() { return getMultipartFiles().toSingleValueMap(); } - @Override public MultiValueMap getMultiFileMap() { return getMultipartFiles(); } @@ -143,7 +138,6 @@ public class DefaultMultipartActionRequest extends ActionRequestWrapper implemen return paramMap; } - @Override public String getMultipartContentType(String paramOrFileName) { MultipartFile file = getFile(paramOrFileName); if (file != null) { diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/AbstractController.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/AbstractController.java index de00d6f077..271906d4a2 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/AbstractController.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/AbstractController.java @@ -180,7 +180,6 @@ public abstract class AbstractController extends PortletContentGenerator impleme } - @Override public void handleActionRequest(ActionRequest request, ActionResponse response) throws Exception { // Delegate to PortletContentGenerator for checking and preparing. check(request, response); @@ -200,7 +199,6 @@ public abstract class AbstractController extends PortletContentGenerator impleme handleActionRequestInternal(request, response); } - @Override public ModelAndView handleRenderRequest(RenderRequest request, RenderResponse response) throws Exception { // If the portlet is minimized and we don't want to render then return null. if (WindowState.MINIMIZED.equals(request.getWindowState()) && !this.renderWhenMinimized) { diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/PortletModeNameViewController.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/PortletModeNameViewController.java index 59e90c27af..8e7bcf0591 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/PortletModeNameViewController.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/PortletModeNameViewController.java @@ -40,12 +40,10 @@ import org.springframework.web.portlet.ModelAndView; */ public class PortletModeNameViewController implements Controller { - @Override public void handleActionRequest(ActionRequest request, ActionResponse response) throws Exception { throw new PortletException("PortletModeNameViewController does not handle action requests"); } - @Override public ModelAndView handleRenderRequest(RenderRequest request, RenderResponse response) { return new ModelAndView(request.getPortletMode().toString()); } diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/PortletWrappingController.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/PortletWrappingController.java index 9e41ffc438..f8a1df3d20 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/PortletWrappingController.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/PortletWrappingController.java @@ -117,7 +117,6 @@ public class PortletWrappingController extends AbstractController this.portletContext = portletContext; } - @Override public void setPortletConfig(PortletConfig portletConfig) { this.portletConfig = portletConfig; } @@ -147,13 +146,11 @@ public class PortletWrappingController extends AbstractController this.initParameters = initParameters; } - @Override public void setBeanName(String name) { this.beanName = name; } - @Override public void afterPropertiesSet() throws Exception { if (this.portletClass == null) { throw new IllegalArgumentException("portletClass is required"); @@ -189,7 +186,6 @@ public class PortletWrappingController extends AbstractController return null; } - @Override public ModelAndView handleResourceRequest( ResourceRequest request, ResourceResponse response) throws Exception { @@ -218,7 +214,6 @@ public class PortletWrappingController extends AbstractController return null; } - @Override public void handleEventRequest( EventRequest request, EventResponse response) throws Exception { @@ -247,7 +242,6 @@ public class PortletWrappingController extends AbstractController } - @Override public void destroy() { this.portletInstance.destroy(); } @@ -261,57 +255,46 @@ public class PortletWrappingController extends AbstractController */ private class DelegatingPortletConfig implements PortletConfig { - @Override public String getPortletName() { return portletName; } - @Override public PortletContext getPortletContext() { return portletContext; } - @Override public String getInitParameter(String paramName) { return initParameters.get(paramName); } - @Override public Enumeration getInitParameterNames() { return Collections.enumeration(initParameters.keySet()); } - @Override public ResourceBundle getResourceBundle(Locale locale) { return (portletConfig != null ? portletConfig.getResourceBundle(locale) : null); } - @Override public Enumeration getPublicRenderParameterNames() { return Collections.enumeration(new HashSet()); } - @Override public String getDefaultNamespace() { return XMLConstants.NULL_NS_URI; } - @Override public Enumeration getPublishingEventQNames() { return Collections.enumeration(new HashSet()); } - @Override public Enumeration getProcessingEventQNames() { return Collections.enumeration(new HashSet()); } - @Override public Enumeration getSupportedLocales() { return Collections.enumeration(new HashSet()); } - @Override public Map getContainerRuntimeOptions() { return (portletConfig != null ? portletConfig.getContainerRuntimeOptions() : null); } diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/SimpleControllerHandlerAdapter.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/SimpleControllerHandlerAdapter.java index bae04e4d30..8f45af6598 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/SimpleControllerHandlerAdapter.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/SimpleControllerHandlerAdapter.java @@ -49,32 +49,27 @@ public class SimpleControllerHandlerAdapter implements HandlerAdapter, PortletCo private PortletContext portletContext; - @Override public void setPortletContext(PortletContext portletContext) { this.portletContext = portletContext; } - @Override public boolean supports(Object handler) { return (handler instanceof Controller); } - @Override public void handleAction(ActionRequest request, ActionResponse response, Object handler) throws Exception { ((Controller) handler).handleActionRequest(request, response); } - @Override public ModelAndView handleRender(RenderRequest request, RenderResponse response, Object handler) throws Exception { return ((Controller) handler).handleRenderRequest(request, response); } - @Override public ModelAndView handleResource(ResourceRequest request, ResourceResponse response, Object handler) throws Exception { @@ -88,7 +83,6 @@ public class SimpleControllerHandlerAdapter implements HandlerAdapter, PortletCo } } - @Override public void handleEvent(EventRequest request, EventResponse response, Object handler) throws Exception { if (handler instanceof EventAwareController) { ((EventAwareController) handler).handleEventRequest(request, response); diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/annotation/AnnotationMethodHandlerAdapter.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/annotation/AnnotationMethodHandlerAdapter.java index 34cf77e22b..3fa889d8b4 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/annotation/AnnotationMethodHandlerAdapter.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/annotation/AnnotationMethodHandlerAdapter.java @@ -263,12 +263,10 @@ public class AnnotationMethodHandlerAdapter extends PortletContentGenerator this.order = order; } - @Override public int getOrder() { return this.order; } - @Override public void setBeanFactory(BeanFactory beanFactory) { if (beanFactory instanceof ConfigurableBeanFactory) { this.beanFactory = (ConfigurableBeanFactory) beanFactory; @@ -277,12 +275,10 @@ public class AnnotationMethodHandlerAdapter extends PortletContentGenerator } - @Override public boolean supports(Object handler) { return getMethodResolver(handler).hasHandlerMethods(); } - @Override public void handleAction(ActionRequest request, ActionResponse response, Object handler) throws Exception { Object returnValue = doHandle(request, response, handler); if (returnValue != null) { @@ -290,19 +286,16 @@ public class AnnotationMethodHandlerAdapter extends PortletContentGenerator } } - @Override public ModelAndView handleRender(RenderRequest request, RenderResponse response, Object handler) throws Exception { checkAndPrepare(request, response); return doHandle(request, response, handler); } - @Override public ModelAndView handleResource(ResourceRequest request, ResourceResponse response, Object handler) throws Exception { checkAndPrepare(request, response); return doHandle(request, response, handler); } - @Override public void handleEvent(EventRequest request, EventResponse response, Object handler) throws Exception { Object returnValue = doHandle(request, response, handler); if (returnValue != null) { diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/annotation/AnnotationMethodHandlerExceptionResolver.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/annotation/AnnotationMethodHandlerExceptionResolver.java index 579ef82388..37125cde89 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/annotation/AnnotationMethodHandlerExceptionResolver.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/annotation/AnnotationMethodHandlerExceptionResolver.java @@ -153,7 +153,6 @@ public class AnnotationMethodHandlerExceptionResolver extends AbstractHandlerExc final Map, Method> matchedHandlers = new HashMap, Method>(); ReflectionUtils.doWithMethods(handlerType, new ReflectionUtils.MethodCallback() { - @Override public void doWith(Method method) { method = ClassUtils.getMostSpecificMethod(method, handlerType); List> handledExceptions = getHandledExceptions(method); diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/annotation/DefaultAnnotationHandlerMapping.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/annotation/DefaultAnnotationHandlerMapping.java index 9b77f6d0bf..7558a92bec 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/annotation/DefaultAnnotationHandlerMapping.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/annotation/DefaultAnnotationHandlerMapping.java @@ -148,7 +148,6 @@ public class DefaultAnnotationHandlerMapping extends AbstractMapBasedHandlerMapp handlerTypes.addAll(Arrays.asList(handlerType.getInterfaces())); for (Class currentHandlerType : handlerTypes) { ReflectionUtils.doWithMethods(currentHandlerType, new ReflectionUtils.MethodCallback() { - @Override public void doWith(Method method) { PortletRequestMappingPredicate predicate = null; String[] modeKeys = new String[0]; @@ -230,7 +229,6 @@ public class DefaultAnnotationHandlerMapping extends AbstractMapBasedHandlerMapp this.params = params; } - @Override public boolean match(PortletRequest request) { return PortletAnnotationMappingUtils.checkParameters(this.params, request); } @@ -264,7 +262,6 @@ public class DefaultAnnotationHandlerMapping extends AbstractMapBasedHandlerMapp } } - @Override public void validate(PortletRequest request) throws PortletException { if (!PortletAnnotationMappingUtils.checkHeaders(this.headers, request)) { throw new PortletRequestBindingException("Header conditions \"" + @@ -282,7 +279,6 @@ public class DefaultAnnotationHandlerMapping extends AbstractMapBasedHandlerMapp } } - @Override public int compareTo(Object other) { return (other instanceof SpecialRequestTypePredicate ? -1 : compareParams(other)); } @@ -295,11 +291,9 @@ public class DefaultAnnotationHandlerMapping extends AbstractMapBasedHandlerMapp super(params); } - @Override public void validate(PortletRequest request) throws PortletException { } - @Override public int compareTo(Object other) { return (other instanceof SpecialRequestTypePredicate ? 1 : compareParams(other)); } @@ -322,11 +316,9 @@ public class DefaultAnnotationHandlerMapping extends AbstractMapBasedHandlerMapp super.match(request)); } - @Override public void validate(PortletRequest request) { } - @Override public int compareTo(Object other) { if (other instanceof TypeLevelMappingPredicate) { return 1; @@ -366,11 +358,9 @@ public class DefaultAnnotationHandlerMapping extends AbstractMapBasedHandlerMapp super.match(request)); } - @Override public void validate(PortletRequest request) { } - @Override public int compareTo(Object other) { if (other instanceof TypeLevelMappingPredicate) { return 1; @@ -402,17 +392,14 @@ public class DefaultAnnotationHandlerMapping extends AbstractMapBasedHandlerMapp this.resourceId = resourceId; } - @Override public boolean match(PortletRequest request) { return (PortletRequest.RESOURCE_PHASE.equals(request.getAttribute(PortletRequest.LIFECYCLE_PHASE)) && ("".equals(this.resourceId) || this.resourceId.equals(((ResourceRequest) request).getResourceID()))); } - @Override public void validate(PortletRequest request) { } - @Override public int compareTo(Object other) { if (other instanceof ResourceMappingPredicate) { boolean hasResourceId = !"".equals(this.resourceId); @@ -437,7 +424,6 @@ public class DefaultAnnotationHandlerMapping extends AbstractMapBasedHandlerMapp this.eventName = eventName; } - @Override public boolean match(PortletRequest request) { if (!PortletRequest.EVENT_PHASE.equals(request.getAttribute(PortletRequest.LIFECYCLE_PHASE))) { return false; @@ -449,11 +435,9 @@ public class DefaultAnnotationHandlerMapping extends AbstractMapBasedHandlerMapp return (this.eventName.equals(event.getName()) || this.eventName.equals(event.getQName().toString())); } - @Override public void validate(PortletRequest request) { } - @Override public int compareTo(Object other) { if (other instanceof EventMappingPredicate) { boolean hasEventName = !"".equals(this.eventName); diff --git a/spring-webmvc-tiles3/src/main/java/org/springframework/web/servlet/view/tiles3/AbstractSpringPreparerFactory.java b/spring-webmvc-tiles3/src/main/java/org/springframework/web/servlet/view/tiles3/AbstractSpringPreparerFactory.java index e86e9cf5ac..eaa6d58bc2 100644 --- a/spring-webmvc-tiles3/src/main/java/org/springframework/web/servlet/view/tiles3/AbstractSpringPreparerFactory.java +++ b/spring-webmvc-tiles3/src/main/java/org/springframework/web/servlet/view/tiles3/AbstractSpringPreparerFactory.java @@ -37,7 +37,6 @@ import org.springframework.web.servlet.view.tiles2.SpringBeanPreparerFactory; */ public abstract class AbstractSpringPreparerFactory implements PreparerFactory { - @Override public ViewPreparer getPreparer(String name, Request context) { WebApplicationContext webApplicationContext = (WebApplicationContext) context.getContext("request").get( DispatcherServlet.WEB_APPLICATION_CONTEXT_ATTRIBUTE); diff --git a/spring-webmvc-tiles3/src/main/java/org/springframework/web/servlet/view/tiles3/TilesConfigurer.java b/spring-webmvc-tiles3/src/main/java/org/springframework/web/servlet/view/tiles3/TilesConfigurer.java index b18c89f932..f01f25dd1a 100644 --- a/spring-webmvc-tiles3/src/main/java/org/springframework/web/servlet/view/tiles3/TilesConfigurer.java +++ b/spring-webmvc-tiles3/src/main/java/org/springframework/web/servlet/view/tiles3/TilesConfigurer.java @@ -236,7 +236,6 @@ public class TilesConfigurer implements ServletContextAware, InitializingBean, D this.useMutableTilesContainer = useMutableTilesContainer; } - @Override public void setServletContext(ServletContext servletContext) { this.servletContext = servletContext; } @@ -246,7 +245,6 @@ public class TilesConfigurer implements ServletContextAware, InitializingBean, D * delegating to the TilesInitializer. * @throws TilesException in case of setup failure */ - @Override public void afterPropertiesSet() throws TilesException { SpringWildcardServletTilesApplicationContext preliminaryContext = @@ -274,7 +272,6 @@ public class TilesConfigurer implements ServletContextAware, InitializingBean, D * Removes the TilesContainer from this web application. * @throws TilesException in case of cleanup failure */ - @Override public void destroy() throws TilesException { this.tilesInitializer.destroy(); } diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/DispatcherServlet.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/DispatcherServlet.java index 43994b9d49..6483616edb 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/DispatcherServlet.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/DispatcherServlet.java @@ -1021,7 +1021,6 @@ public class DispatcherServlet extends FrameworkServlet { @Override protected LocaleContext buildLocaleContext(final HttpServletRequest request) { return new LocaleContext() { - @Override public Locale getLocale() { return localeResolver.resolveLocale(request); } diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/FlashMap.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/FlashMap.java index 1e5d4ec88b..983930714c 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/FlashMap.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/FlashMap.java @@ -135,7 +135,6 @@ public final class FlashMap extends HashMap implements Comparabl * path or has more target URL parameters. Before comparing FlashMap * instances ensure that they match a given request. */ - @Override public int compareTo(FlashMap other) { int thisUrlPath = (this.targetRequestPath != null) ? 1 : 0; int otherUrlPath = (other.targetRequestPath != null) ? 1 : 0; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/FrameworkServlet.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/FrameworkServlet.java index cb08d3e627..ca2a919043 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/FrameworkServlet.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/FrameworkServlet.java @@ -1054,7 +1054,6 @@ public abstract class FrameworkServlet extends HttpServletBean { */ private class ContextRefreshListener implements ApplicationListener { - @Override public void onApplicationEvent(ContextRefreshedEvent event) { FrameworkServlet.this.onApplicationEvent(event); } diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/HttpServletBean.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/HttpServletBean.java index 998a2ff6bd..044b56d2ae 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/HttpServletBean.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/HttpServletBean.java @@ -189,7 +189,6 @@ public abstract class HttpServletBean extends HttpServlet * @throws IllegalArgumentException if environment is not assignable to * {@code ConfigurableWebEnvironment}. */ - @Override public void setEnvironment(Environment environment) { Assert.isInstanceOf(ConfigurableWebEnvironment.class, environment); this.environment = (ConfigurableWebEnvironment)environment; @@ -200,7 +199,6 @@ public abstract class HttpServletBean extends HttpServlet *

If {@code null}, a new environment will be initialized via * {@link #createEnvironment()}. */ - @Override public ConfigurableWebEnvironment getEnvironment() { if (this.environment == null) { this.environment = this.createEnvironment(); diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/AnnotationDrivenBeanDefinitionParser.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/AnnotationDrivenBeanDefinitionParser.java index c072fa1673..9d409a3fec 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/AnnotationDrivenBeanDefinitionParser.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/AnnotationDrivenBeanDefinitionParser.java @@ -142,7 +142,6 @@ class AnnotationDrivenBeanDefinitionParser implements BeanDefinitionParser { private static boolean romePresent = ClassUtils.isPresent("com.sun.syndication.feed.WireFeed", AnnotationDrivenBeanDefinitionParser.class.getClassLoader()); - @Override public BeanDefinition parse(Element element, ParserContext parserContext) { Object source = parserContext.extractSource(element); diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/DefaultServletHandlerBeanDefinitionParser.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/DefaultServletHandlerBeanDefinitionParser.java index 42f1dca52d..d842b4d689 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/DefaultServletHandlerBeanDefinitionParser.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/DefaultServletHandlerBeanDefinitionParser.java @@ -43,7 +43,6 @@ import org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler */ class DefaultServletHandlerBeanDefinitionParser implements BeanDefinitionParser { - @Override public BeanDefinition parse(Element element, ParserContext parserContext) { Object source = parserContext.extractSource(element); diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/InterceptorsBeanDefinitionParser.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/InterceptorsBeanDefinitionParser.java index 05e4c8bf32..167963844d 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/InterceptorsBeanDefinitionParser.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/InterceptorsBeanDefinitionParser.java @@ -38,7 +38,6 @@ import org.w3c.dom.Element; */ class InterceptorsBeanDefinitionParser implements BeanDefinitionParser { - @Override public BeanDefinition parse(Element element, ParserContext parserContext) { CompositeComponentDefinition compDefinition = new CompositeComponentDefinition(element.getTagName(), parserContext.extractSource(element)); parserContext.pushContainingComponent(compDefinition); diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/MvcNamespaceHandler.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/MvcNamespaceHandler.java index 9c099ede53..d1d887700b 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/MvcNamespaceHandler.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/MvcNamespaceHandler.java @@ -28,7 +28,6 @@ import org.springframework.beans.factory.xml.NamespaceHandlerSupport; */ public class MvcNamespaceHandler extends NamespaceHandlerSupport { - @Override public void init() { registerBeanDefinitionParser("annotation-driven", new AnnotationDrivenBeanDefinitionParser()); registerBeanDefinitionParser("default-servlet-handler", new DefaultServletHandlerBeanDefinitionParser()); diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/ResourcesBeanDefinitionParser.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/ResourcesBeanDefinitionParser.java index 39558faa60..97df07e544 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/ResourcesBeanDefinitionParser.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/ResourcesBeanDefinitionParser.java @@ -45,7 +45,6 @@ import org.springframework.web.servlet.resource.ResourceHttpRequestHandler; */ class ResourcesBeanDefinitionParser implements BeanDefinitionParser { - @Override public BeanDefinition parse(Element element, ParserContext parserContext) { Object source = parserContext.extractSource(element); diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/ViewControllerBeanDefinitionParser.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/ViewControllerBeanDefinitionParser.java index 82e455c7a4..e580aea38b 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/ViewControllerBeanDefinitionParser.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/ViewControllerBeanDefinitionParser.java @@ -43,7 +43,6 @@ class ViewControllerBeanDefinitionParser implements BeanDefinitionParser { "org.springframework.web.servlet.config.viewControllerHandlerMapping"; - @Override public BeanDefinition parse(Element element, ParserContext parserContext) { Object source = parserContext.extractSource(element); diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurationSupport.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurationSupport.java index 076147c0e5..e85f189126 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurationSupport.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurationSupport.java @@ -173,7 +173,6 @@ public class WebMvcConfigurationSupport implements ApplicationContextAware, Serv * Set the {@link javax.servlet.ServletContext}, e.g. for resource handling, * looking up file extensions, etc. */ - @Override public void setServletContext(ServletContext servletContext) { this.servletContext = servletContext; } @@ -181,7 +180,6 @@ public class WebMvcConfigurationSupport implements ApplicationContextAware, Serv /** * Set the Spring {@link ApplicationContext}, e.g. for resource loading. */ - @Override public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { this.applicationContext = applicationContext; } @@ -434,11 +432,9 @@ public class WebMvcConfigurationSupport implements ApplicationContextAware, Serv } else { validator = new Validator() { - @Override public boolean supports(Class clazz) { return false; } - @Override public void validate(Object target, Errors errors) { } }; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurerAdapter.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurerAdapter.java index abf8217f13..ac63b1cbca 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurerAdapter.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurerAdapter.java @@ -39,7 +39,6 @@ public abstract class WebMvcConfigurerAdapter implements WebMvcConfigurer { * {@inheritDoc} *

This implementation is empty. */ - @Override public void addFormatters(FormatterRegistry registry) { } @@ -47,7 +46,6 @@ public abstract class WebMvcConfigurerAdapter implements WebMvcConfigurer { * {@inheritDoc} *

This implementation is empty. */ - @Override public void configureMessageConverters(List> converters) { } @@ -55,7 +53,6 @@ public abstract class WebMvcConfigurerAdapter implements WebMvcConfigurer { * {@inheritDoc} *

This implementation returns {@code null} */ - @Override public Validator getValidator() { return null; } @@ -64,7 +61,6 @@ public abstract class WebMvcConfigurerAdapter implements WebMvcConfigurer { * {@inheritDoc} *

This implementation is empty. */ - @Override public void configureContentNegotiation(ContentNegotiationConfigurer configurer) { } @@ -72,7 +68,6 @@ public abstract class WebMvcConfigurerAdapter implements WebMvcConfigurer { * {@inheritDoc} *

This implementation is empty. */ - @Override public void configureAsyncSupport(AsyncSupportConfigurer configurer) { } @@ -80,7 +75,6 @@ public abstract class WebMvcConfigurerAdapter implements WebMvcConfigurer { * {@inheritDoc} *

This implementation is empty. */ - @Override public void addArgumentResolvers(List argumentResolvers) { } @@ -88,7 +82,6 @@ public abstract class WebMvcConfigurerAdapter implements WebMvcConfigurer { * {@inheritDoc} *

This implementation is empty. */ - @Override public void addReturnValueHandlers(List returnValueHandlers) { } @@ -96,7 +89,6 @@ public abstract class WebMvcConfigurerAdapter implements WebMvcConfigurer { * {@inheritDoc} *

This implementation is empty. */ - @Override public void configureHandlerExceptionResolvers(List exceptionResolvers) { } @@ -104,7 +96,6 @@ public abstract class WebMvcConfigurerAdapter implements WebMvcConfigurer { * {@inheritDoc} *

This implementation is empty. */ - @Override public MessageCodesResolver getMessageCodesResolver() { return null; } @@ -113,7 +104,6 @@ public abstract class WebMvcConfigurerAdapter implements WebMvcConfigurer { * {@inheritDoc} *

This implementation is empty. */ - @Override public void addInterceptors(InterceptorRegistry registry) { } @@ -121,7 +111,6 @@ public abstract class WebMvcConfigurerAdapter implements WebMvcConfigurer { * {@inheritDoc} *

This implementation is empty. */ - @Override public void addViewControllers(ViewControllerRegistry registry) { } @@ -129,7 +118,6 @@ public abstract class WebMvcConfigurerAdapter implements WebMvcConfigurer { * {@inheritDoc} *

This implementation is empty. */ - @Override public void addResourceHandlers(ResourceHandlerRegistry registry) { } @@ -137,7 +125,6 @@ public abstract class WebMvcConfigurerAdapter implements WebMvcConfigurer { * {@inheritDoc} *

This implementation is empty. */ - @Override public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) { } diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurerComposite.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurerComposite.java index 05461d5013..e222c3b126 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurerComposite.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurerComposite.java @@ -43,84 +43,72 @@ class WebMvcConfigurerComposite implements WebMvcConfigurer { } } - @Override public void addFormatters(FormatterRegistry registry) { for (WebMvcConfigurer delegate : this.delegates) { delegate.addFormatters(registry); } } - @Override public void configureContentNegotiation(ContentNegotiationConfigurer configurer) { for (WebMvcConfigurer delegate : this.delegates) { delegate.configureContentNegotiation(configurer); } } - @Override public void configureAsyncSupport(AsyncSupportConfigurer configurer) { for (WebMvcConfigurer delegate : this.delegates) { delegate.configureAsyncSupport(configurer); } } - @Override public void configureMessageConverters(List> converters) { for (WebMvcConfigurer delegate : this.delegates) { delegate.configureMessageConverters(converters); } } - @Override public void addArgumentResolvers(List argumentResolvers) { for (WebMvcConfigurer delegate : this.delegates) { delegate.addArgumentResolvers(argumentResolvers); } } - @Override public void addReturnValueHandlers(List returnValueHandlers) { for (WebMvcConfigurer delegate : this.delegates) { delegate.addReturnValueHandlers(returnValueHandlers); } } - @Override public void configureHandlerExceptionResolvers(List exceptionResolvers) { for (WebMvcConfigurer delegate : this.delegates) { delegate.configureHandlerExceptionResolvers(exceptionResolvers); } } - @Override public void addInterceptors(InterceptorRegistry registry) { for (WebMvcConfigurer delegate : this.delegates) { delegate.addInterceptors(registry); } } - @Override public void addViewControllers(ViewControllerRegistry registry) { for (WebMvcConfigurer delegate : this.delegates) { delegate.addViewControllers(registry); } } - @Override public void addResourceHandlers(ResourceHandlerRegistry registry) { for (WebMvcConfigurer delegate : this.delegates) { delegate.addResourceHandlers(registry); } } - @Override public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) { for (WebMvcConfigurer delegate : this.delegates) { delegate.configureDefaultServletHandling(configurer); } } - @Override public Validator getValidator() { List candidates = new ArrayList(); for (WebMvcConfigurer configurer : this.delegates) { @@ -145,7 +133,6 @@ class WebMvcConfigurerComposite implements WebMvcConfigurer { } } - @Override public MessageCodesResolver getMessageCodesResolver() { List candidates = new ArrayList(); for (WebMvcConfigurer configurer : this.delegates) { diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerExceptionResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerExceptionResolver.java index 7020b27118..fdef487e48 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerExceptionResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerExceptionResolver.java @@ -64,7 +64,6 @@ public abstract class AbstractHandlerExceptionResolver implements HandlerExcepti this.order = order; } - @Override public int getOrder() { return this.order; } @@ -124,7 +123,6 @@ public abstract class AbstractHandlerExceptionResolver implements HandlerExcepti * in case of "mappedHandlers" having been specified), then delegates to the * {@link #doResolveException} template method. */ - @Override public ModelAndView resolveException(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) { diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerMapping.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerMapping.java index 2fcd479401..ea079c4938 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerMapping.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerMapping.java @@ -82,7 +82,6 @@ public abstract class AbstractHandlerMapping extends WebApplicationObjectSupport this.order = order; } - @Override public final int getOrder() { return this.order; } @@ -294,7 +293,6 @@ public abstract class AbstractHandlerMapping extends WebApplicationObjectSupport * @return the corresponding handler instance, or the default handler * @see #getHandlerInternal */ - @Override public final HandlerExecutionChain getHandler(HttpServletRequest request) throws Exception { Object handler = getHandlerInternal(request); if (handler == null) { diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerMethodMapping.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerMethodMapping.java index 97d7370ee2..28fbe1efbc 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerMethodMapping.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerMethodMapping.java @@ -83,7 +83,6 @@ public abstract class AbstractHandlerMethodMapping extends AbstractHandlerMap /** * Detects handler methods at initialization. */ - @Override public void afterPropertiesSet() { initHandlerMethods(); } @@ -136,7 +135,6 @@ public abstract class AbstractHandlerMethodMapping extends AbstractHandlerMap final Class userType = ClassUtils.getUserClass(handlerType); Set methods = HandlerMethodSelector.selectMethods(userType, new MethodFilter() { - @Override public boolean matches(Method method) { return getMappingForMethod(method, userType) != null; } @@ -354,7 +352,6 @@ public abstract class AbstractHandlerMethodMapping extends AbstractHandlerMap this.comparator = comparator; } - @Override public int compare(Match match1, Match match2) { return this.comparator.compare(match1.mapping, match2.mapping); } diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/HandlerExceptionResolverComposite.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/HandlerExceptionResolverComposite.java index bcf6090121..8716f20cef 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/HandlerExceptionResolverComposite.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/HandlerExceptionResolverComposite.java @@ -42,7 +42,6 @@ public class HandlerExceptionResolverComposite implements HandlerExceptionResolv this.order = order; } - @Override public int getOrder() { return this.order; } @@ -65,7 +64,6 @@ public class HandlerExceptionResolverComposite implements HandlerExceptionResolv * Resolve the exception by iterating over the list of configured exception resolvers. * The first one to return a ModelAndView instance wins. Otherwise {@code null} is returned. */ - @Override public ModelAndView resolveException(HttpServletRequest request, HttpServletResponse response, Object handler, diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/HandlerInterceptorAdapter.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/HandlerInterceptorAdapter.java index 602886ba29..c721327101 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/HandlerInterceptorAdapter.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/HandlerInterceptorAdapter.java @@ -34,7 +34,6 @@ public abstract class HandlerInterceptorAdapter implements AsyncHandlerIntercept /** * This implementation always returns {@code true}. */ - @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { return true; @@ -43,7 +42,6 @@ public abstract class HandlerInterceptorAdapter implements AsyncHandlerIntercept /** * This implementation is empty. */ - @Override public void postHandle( HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception { @@ -52,7 +50,6 @@ public abstract class HandlerInterceptorAdapter implements AsyncHandlerIntercept /** * This implementation is empty. */ - @Override public void afterCompletion( HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception { @@ -61,7 +58,6 @@ public abstract class HandlerInterceptorAdapter implements AsyncHandlerIntercept /** * This implementation is empty. */ - @Override public void afterConcurrentHandlingStarted( HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/SimpleServletHandlerAdapter.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/SimpleServletHandlerAdapter.java index e19ebe57f0..e72e011c7a 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/SimpleServletHandlerAdapter.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/SimpleServletHandlerAdapter.java @@ -53,12 +53,10 @@ import org.springframework.web.servlet.ModelAndView; */ public class SimpleServletHandlerAdapter implements HandlerAdapter { - @Override public boolean supports(Object handler) { return (handler instanceof Servlet); } - @Override public ModelAndView handle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { @@ -66,7 +64,6 @@ public class SimpleServletHandlerAdapter implements HandlerAdapter { return null; } - @Override public long getLastModified(HttpServletRequest request, Object handler) { return -1; } diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/SimpleServletPostProcessor.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/SimpleServletPostProcessor.java index 49e2e3c813..663786ff29 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/SimpleServletPostProcessor.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/SimpleServletPostProcessor.java @@ -86,23 +86,19 @@ public class SimpleServletPostProcessor implements this.useSharedServletConfig = useSharedServletConfig; } - @Override public void setServletContext(ServletContext servletContext) { this.servletContext = servletContext; } - @Override public void setServletConfig(ServletConfig servletConfig) { this.servletConfig = servletConfig; } - @Override public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { return bean; } - @Override public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { if (bean instanceof Servlet) { ServletConfig config = this.servletConfig; @@ -119,7 +115,6 @@ public class SimpleServletPostProcessor implements return bean; } - @Override public void postProcessBeforeDestruction(Object bean, String beanName) throws BeansException { if (bean instanceof Servlet) { ((Servlet) bean).destroy(); @@ -142,22 +137,18 @@ public class SimpleServletPostProcessor implements this.servletContext = servletContext; } - @Override public String getServletName() { return this.servletName; } - @Override public ServletContext getServletContext() { return this.servletContext; } - @Override public String getInitParameter(String paramName) { return null; } - @Override public Enumeration getInitParameterNames() { return Collections.enumeration(new HashSet()); } diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/WebRequestHandlerInterceptorAdapter.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/WebRequestHandlerInterceptorAdapter.java index 2c204ba673..42b1203d7b 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/WebRequestHandlerInterceptorAdapter.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/WebRequestHandlerInterceptorAdapter.java @@ -49,7 +49,6 @@ public class WebRequestHandlerInterceptorAdapter implements AsyncHandlerIntercep } - @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { @@ -57,7 +56,6 @@ public class WebRequestHandlerInterceptorAdapter implements AsyncHandlerIntercep return true; } - @Override public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception { @@ -65,14 +63,12 @@ public class WebRequestHandlerInterceptorAdapter implements AsyncHandlerIntercep (modelAndView != null && !modelAndView.wasCleared() ? modelAndView.getModelMap() : null)); } - @Override public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception { this.requestInterceptor.afterCompletion(new DispatcherServletWebRequest(request, response), ex); } - @Override public void afterConcurrentHandlingStarted(HttpServletRequest request, HttpServletResponse response, Object handler) { if (this.requestInterceptor instanceof AsyncWebRequestInterceptor) { AsyncWebRequestInterceptor asyncInterceptor = (AsyncWebRequestInterceptor) this.requestInterceptor; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/AcceptHeaderLocaleResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/AcceptHeaderLocaleResolver.java index b736a94575..661bb62ac7 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/AcceptHeaderLocaleResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/AcceptHeaderLocaleResolver.java @@ -37,12 +37,10 @@ import org.springframework.web.servlet.LocaleResolver; */ public class AcceptHeaderLocaleResolver implements LocaleResolver { - @Override public Locale resolveLocale(HttpServletRequest request) { return request.getLocale(); } - @Override public void setLocale(HttpServletRequest request, HttpServletResponse response, Locale locale) { throw new UnsupportedOperationException( "Cannot change HTTP accept header - use a different locale resolution strategy"); diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/CookieLocaleResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/CookieLocaleResolver.java index 007090ad17..94c7d03723 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/CookieLocaleResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/CookieLocaleResolver.java @@ -89,7 +89,6 @@ public class CookieLocaleResolver extends CookieGenerator implements LocaleResol } - @Override public Locale resolveLocale(HttpServletRequest request) { // Check request for pre-parsed or preset locale. Locale locale = (Locale) request.getAttribute(LOCALE_REQUEST_ATTRIBUTE_NAME); @@ -113,7 +112,6 @@ public class CookieLocaleResolver extends CookieGenerator implements LocaleResol return determineDefaultLocale(request); } - @Override public void setLocale(HttpServletRequest request, HttpServletResponse response, Locale locale) { if (locale != null) { // Set request attribute and add cookie. diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/FixedLocaleResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/FixedLocaleResolver.java index e7397c0a1d..f56590f469 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/FixedLocaleResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/FixedLocaleResolver.java @@ -52,7 +52,6 @@ public class FixedLocaleResolver extends AbstractLocaleResolver { } - @Override public Locale resolveLocale(HttpServletRequest request) { Locale locale = getDefaultLocale(); if (locale == null) { @@ -61,7 +60,6 @@ public class FixedLocaleResolver extends AbstractLocaleResolver { return locale; } - @Override public void setLocale(HttpServletRequest request, HttpServletResponse response, Locale locale) { throw new UnsupportedOperationException( "Cannot change fixed locale - use a different locale resolution strategy"); diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/SessionLocaleResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/SessionLocaleResolver.java index 07ba5fc970..de1bdd57c7 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/SessionLocaleResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/SessionLocaleResolver.java @@ -52,7 +52,6 @@ public class SessionLocaleResolver extends AbstractLocaleResolver { public static final String LOCALE_SESSION_ATTRIBUTE_NAME = SessionLocaleResolver.class.getName() + ".LOCALE"; - @Override public Locale resolveLocale(HttpServletRequest request) { Locale locale = (Locale) WebUtils.getSessionAttribute(request, LOCALE_SESSION_ATTRIBUTE_NAME); if (locale == null) { @@ -79,7 +78,6 @@ public class SessionLocaleResolver extends AbstractLocaleResolver { return defaultLocale; } - @Override public void setLocale(HttpServletRequest request, HttpServletResponse response, Locale locale) { WebUtils.setSessionAttribute(request, LOCALE_SESSION_ATTRIBUTE_NAME, locale); } diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/AbstractController.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/AbstractController.java index ec2c81639b..a0ef16cc32 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/AbstractController.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/AbstractController.java @@ -133,7 +133,6 @@ public abstract class AbstractController extends WebContentGenerator implements } - @Override public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception { diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/HttpRequestHandlerAdapter.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/HttpRequestHandlerAdapter.java index 7c6f8349cb..f329098d65 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/HttpRequestHandlerAdapter.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/HttpRequestHandlerAdapter.java @@ -39,12 +39,10 @@ import org.springframework.web.servlet.ModelAndView; */ public class HttpRequestHandlerAdapter implements HandlerAdapter { - @Override public boolean supports(Object handler) { return (handler instanceof HttpRequestHandler); } - @Override public ModelAndView handle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { @@ -52,7 +50,6 @@ public class HttpRequestHandlerAdapter implements HandlerAdapter { return null; } - @Override public long getLastModified(HttpServletRequest request, Object handler) { if (handler instanceof LastModified) { return ((LastModified) handler).getLastModified(request); diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/ServletForwardingController.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/ServletForwardingController.java index 73fc89bd51..73607f6d7f 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/ServletForwardingController.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/ServletForwardingController.java @@ -101,7 +101,6 @@ public class ServletForwardingController extends AbstractController implements B this.servletName = servletName; } - @Override public void setBeanName(String name) { this.beanName = name; if (this.servletName == null) { diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/ServletWrappingController.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/ServletWrappingController.java index 27700fee32..10dffda157 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/ServletWrappingController.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/ServletWrappingController.java @@ -123,7 +123,6 @@ public class ServletWrappingController extends AbstractController this.initParameters = initParameters; } - @Override public void setBeanName(String name) { this.beanName = name; } @@ -133,7 +132,6 @@ public class ServletWrappingController extends AbstractController * Initialize the wrapped Servlet instance. * @see javax.servlet.Servlet#init(javax.servlet.ServletConfig) */ - @Override public void afterPropertiesSet() throws Exception { if (this.servletClass == null) { throw new IllegalArgumentException("servletClass is required"); @@ -167,7 +165,6 @@ public class ServletWrappingController extends AbstractController * Destroy the wrapped Servlet instance. * @see javax.servlet.Servlet#destroy() */ - @Override public void destroy() { this.servletInstance.destroy(); } @@ -180,22 +177,18 @@ public class ServletWrappingController extends AbstractController */ private class DelegatingServletConfig implements ServletConfig { - @Override public String getServletName() { return servletName; } - @Override public ServletContext getServletContext() { return ServletWrappingController.this.getServletContext(); } - @Override public String getInitParameter(String paramName) { return initParameters.getProperty(paramName); } - @Override public Enumeration getInitParameterNames() { return initParameters.keys(); } diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/SimpleControllerHandlerAdapter.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/SimpleControllerHandlerAdapter.java index bcd28c0e54..db409ca719 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/SimpleControllerHandlerAdapter.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/SimpleControllerHandlerAdapter.java @@ -38,19 +38,16 @@ import org.springframework.web.servlet.ModelAndView; */ public class SimpleControllerHandlerAdapter implements HandlerAdapter { - @Override public boolean supports(Object handler) { return (handler instanceof Controller); } - @Override public ModelAndView handle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { return ((Controller) handler).handleRequest(request, response); } - @Override public long getLastModified(HttpServletRequest request, Object handler) { if (handler instanceof LastModified) { return ((LastModified) handler).getLastModified(request); diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/WebContentInterceptor.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/WebContentInterceptor.java index 5eae702cd5..50a20e51b9 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/WebContentInterceptor.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/WebContentInterceptor.java @@ -137,7 +137,6 @@ public class WebContentInterceptor extends WebContentGenerator implements Handle } - @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws ServletException { @@ -190,7 +189,6 @@ public class WebContentInterceptor extends WebContentGenerator implements Handle /** * This implementation is empty. */ - @Override public void postHandle( HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception { @@ -199,7 +197,6 @@ public class WebContentInterceptor extends WebContentGenerator implements Handle /** * This implementation is empty. */ - @Override public void afterCompletion( HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception { diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/annotation/AnnotationMethodHandlerAdapter.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/annotation/AnnotationMethodHandlerAdapter.java index 9e4baa213c..f62226435d 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/annotation/AnnotationMethodHandlerAdapter.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/annotation/AnnotationMethodHandlerAdapter.java @@ -378,12 +378,10 @@ public class AnnotationMethodHandlerAdapter extends WebContentGenerator this.order = order; } - @Override public int getOrder() { return this.order; } - @Override public void setBeanFactory(BeanFactory beanFactory) { if (beanFactory instanceof ConfigurableBeanFactory) { this.beanFactory = (ConfigurableBeanFactory) beanFactory; @@ -392,12 +390,10 @@ public class AnnotationMethodHandlerAdapter extends WebContentGenerator } - @Override public boolean supports(Object handler) { return getMethodResolver(handler).hasHandlerMethods(); } - @Override public ModelAndView handle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { @@ -456,7 +452,6 @@ public class AnnotationMethodHandlerAdapter extends WebContentGenerator * to check it, and return {@code null} if that returns {@code true}. * @see org.springframework.web.context.request.WebRequest#checkNotModified(long) */ - @Override public long getLastModified(HttpServletRequest request, Object handler) { return -1; } @@ -1215,7 +1210,6 @@ public class AnnotationMethodHandlerAdapter extends WebContentGenerator this.request = new ServletServerHttpRequest(request); } - @Override public int compare(RequestSpecificMappingInfo info1, RequestSpecificMappingInfo info2) { int pathComparison = pathComparator.compare(info1.bestMatchedPattern(), info2.bestMatchedPattern()); if (pathComparison != 0) { diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/annotation/AnnotationMethodHandlerExceptionResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/annotation/AnnotationMethodHandlerExceptionResolver.java index 1450d8a968..d204e33e89 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/annotation/AnnotationMethodHandlerExceptionResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/annotation/AnnotationMethodHandlerExceptionResolver.java @@ -177,7 +177,6 @@ public class AnnotationMethodHandlerExceptionResolver extends AbstractHandlerExc final Map, Method> matchedHandlers = new HashMap, Method>(); ReflectionUtils.doWithMethods(handlerType, new ReflectionUtils.MethodCallback() { - @Override public void doWith(Method method) { method = ClassUtils.getMostSpecificMethod(method, handlerType); List> handledExceptions = getHandledExceptions(method); diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/annotation/DefaultAnnotationHandlerMapping.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/annotation/DefaultAnnotationHandlerMapping.java index 557992e211..f7f1c163d8 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/annotation/DefaultAnnotationHandlerMapping.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/annotation/DefaultAnnotationHandlerMapping.java @@ -177,7 +177,6 @@ public class DefaultAnnotationHandlerMapping extends AbstractDetectingUrlHandler handlerTypes.addAll(Arrays.asList(handlerType.getInterfaces())); for (Class currentHandlerType : handlerTypes) { ReflectionUtils.doWithMethods(currentHandlerType, new ReflectionUtils.MethodCallback() { - @Override public void doWith(Method method) { RequestMapping mapping = AnnotationUtils.findAnnotation(method, RequestMapping.class); if (mapping != null) { diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/condition/AbstractMediaTypeExpression.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/condition/AbstractMediaTypeExpression.java index 7e99bbda92..15aee22ec2 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/condition/AbstractMediaTypeExpression.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/condition/AbstractMediaTypeExpression.java @@ -56,12 +56,10 @@ abstract class AbstractMediaTypeExpression implements Comparable implements NameValueExpression } } - @Override public String getName() { return this.name; } - @Override public T getValue() { return this.value; } - @Override public boolean isNegated() { return this.isNegated; } diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/condition/CompositeRequestCondition.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/condition/CompositeRequestCondition.java index 1f6befcbac..b7c8e0442a 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/condition/CompositeRequestCondition.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/condition/CompositeRequestCondition.java @@ -106,7 +106,6 @@ public class CompositeRequestCondition extends AbstractRequestConditionAn empty {@code CompositeRequestCondition} matches to all requests. */ - @Override public CompositeRequestCondition getMatchingCondition(HttpServletRequest request) { if (isEmpty()) { return this; @@ -157,7 +155,6 @@ public class CompositeRequestCondition extends AbstractRequestCondition set = new LinkedHashSet(this.expressions); set.addAll(other.expressions); @@ -102,7 +101,6 @@ public final class HeadersRequestCondition extends AbstractRequestCondition set = new LinkedHashSet(this.expressions); set.addAll(other.expressions); @@ -93,7 +92,6 @@ public final class ParamsRequestCondition extends AbstractRequestConditionIf neither instance has patterns, use an empty String (i.e. ""). * */ - @Override public PatternsRequestCondition combine(PatternsRequestCondition other) { Set result = new LinkedHashSet(); if (!this.patterns.isEmpty() && !other.patterns.isEmpty()) { @@ -203,7 +202,6 @@ public final class PatternsRequestCondition extends AbstractRequestCondition patternComparator = this.pathMatcher.getPatternComparator(lookupPath); diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/condition/ProducesRequestCondition.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/condition/ProducesRequestCondition.java index f34694aae9..13292f1a76 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/condition/ProducesRequestCondition.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/condition/ProducesRequestCondition.java @@ -159,7 +159,6 @@ public final class ProducesRequestCondition extends AbstractRequestCondition acceptedMediaTypes = getAcceptedMediaTypes(request); diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/condition/RequestConditionHolder.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/condition/RequestConditionHolder.java index fffbf7c923..8779839fbb 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/condition/RequestConditionHolder.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/condition/RequestConditionHolder.java @@ -71,7 +71,6 @@ public final class RequestConditionHolder extends AbstractRequestCondition set = new LinkedHashSet(this.methods); set.addAll(other.methods); @@ -95,7 +94,6 @@ public final class RequestMethodsRequestCondition extends AbstractRequestConditi * @return the same instance if the condition is empty, a new condition with * the matched request method, or {@code null} if no request methods match */ - @Override public RequestMethodsRequestCondition getMatchingCondition(HttpServletRequest request) { if (this.methods.isEmpty()) { return this; @@ -132,7 +130,6 @@ public final class RequestMethodsRequestCondition extends AbstractRequestConditi * {@link #getMatchingCondition(HttpServletRequest)} and therefore each instance * contains the matching HTTP request method only or is otherwise empty. */ - @Override public int compareTo(RequestMethodsRequestCondition other, HttpServletRequest request) { return other.methods.size() - this.methods.size(); } diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/AbstractHandlerMethodAdapter.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/AbstractHandlerMethodAdapter.java index 8eb83966bb..9824b80e0e 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/AbstractHandlerMethodAdapter.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/AbstractHandlerMethodAdapter.java @@ -50,7 +50,6 @@ public abstract class AbstractHandlerMethodAdapter extends WebContentGenerator i this.order = order; } - @Override public int getOrder() { return this.order; } @@ -61,7 +60,6 @@ public abstract class AbstractHandlerMethodAdapter extends WebContentGenerator i * @param handler the handler instance to check * @return whether or not this adapter can adapt the given handler */ - @Override public final boolean supports(Object handler) { return handler instanceof HandlerMethod && supportsInternal((HandlerMethod) handler); } @@ -77,7 +75,6 @@ public abstract class AbstractHandlerMethodAdapter extends WebContentGenerator i /** * {@inheritDoc}

This implementation expects the handler to be an {@link HandlerMethod}. */ - @Override public final ModelAndView handle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { return handleInternal(request, response, (HandlerMethod) handler); @@ -101,7 +98,6 @@ public abstract class AbstractHandlerMethodAdapter extends WebContentGenerator i /** * {@inheritDoc}

This implementation expects the handler to be an {@link HandlerMethod}. */ - @Override public final long getLastModified(HttpServletRequest request, Object handler) { return getLastModifiedInternal(request, (HandlerMethod) handler); } diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/RequestMappingInfo.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/RequestMappingInfo.java index 573133ea05..6d0e3941e6 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/RequestMappingInfo.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/RequestMappingInfo.java @@ -148,7 +148,6 @@ public final class RequestMappingInfo implements RequestConditionExample: combine type- and method-level request mappings. * @return a new request mapping info instance; never {@code null} */ - @Override public RequestMappingInfo combine(RequestMappingInfo other) { PatternsRequestCondition patterns = this.patternsCondition.combine(other.patternsCondition); RequestMethodsRequestCondition methods = this.methodsCondition.combine(other.methodsCondition); @@ -168,7 +167,6 @@ public final class RequestMappingInfo implements RequestCondition getMappingComparator(final HttpServletRequest request) { return new Comparator() { - @Override public int compare(RequestMappingInfo info1, RequestMappingInfo info2) { return info1.compareTo(info2, request); } diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/AsyncTaskMethodReturnValueHandler.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/AsyncTaskMethodReturnValueHandler.java index 1c4f3e3933..98130ad84e 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/AsyncTaskMethodReturnValueHandler.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/AsyncTaskMethodReturnValueHandler.java @@ -39,13 +39,11 @@ public class AsyncTaskMethodReturnValueHandler implements HandlerMethodReturnVal this.beanFactory = beanFactory; } - @Override public boolean supportsReturnType(MethodParameter returnType) { Class paramType = returnType.getParameterType(); return WebAsyncTask.class.isAssignableFrom(paramType); } - @Override public void handleReturnValue(Object returnValue, MethodParameter returnType, ModelAndViewContainer mavContainer, NativeWebRequest webRequest) throws Exception { diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/CallableMethodReturnValueHandler.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/CallableMethodReturnValueHandler.java index 7da354795c..22471f7c3f 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/CallableMethodReturnValueHandler.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/CallableMethodReturnValueHandler.java @@ -32,13 +32,11 @@ import org.springframework.web.method.support.ModelAndViewContainer; */ public class CallableMethodReturnValueHandler implements HandlerMethodReturnValueHandler { - @Override public boolean supportsReturnType(MethodParameter returnType) { Class paramType = returnType.getParameterType(); return Callable.class.isAssignableFrom(paramType); } - @Override public void handleReturnValue(Object returnValue, MethodParameter returnType, ModelAndViewContainer mavContainer, NativeWebRequest webRequest) throws Exception { diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/DeferredResultMethodReturnValueHandler.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/DeferredResultMethodReturnValueHandler.java index 5f10dfa891..fbb7c8531a 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/DeferredResultMethodReturnValueHandler.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/DeferredResultMethodReturnValueHandler.java @@ -31,13 +31,11 @@ import org.springframework.web.method.support.ModelAndViewContainer; */ public class DeferredResultMethodReturnValueHandler implements HandlerMethodReturnValueHandler { - @Override public boolean supportsReturnType(MethodParameter returnType) { Class paramType = returnType.getParameterType(); return DeferredResult.class.isAssignableFrom(paramType); } - @Override public void handleReturnValue(Object returnValue, MethodParameter returnType, ModelAndViewContainer mavContainer, NativeWebRequest webRequest) throws Exception { diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ExceptionHandlerExceptionResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ExceptionHandlerExceptionResolver.java index 8a62923a42..757d2744dd 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ExceptionHandlerExceptionResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ExceptionHandlerExceptionResolver.java @@ -205,7 +205,6 @@ public class ExceptionHandlerExceptionResolver extends AbstractHandlerMethodExce this.contentNegotiationManager = contentNegotiationManager; } - @Override public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { this.applicationContext = applicationContext; } @@ -214,7 +213,6 @@ public class ExceptionHandlerExceptionResolver extends AbstractHandlerMethodExce return this.applicationContext; } - @Override public void afterPropertiesSet() { if (this.argumentResolvers == null) { List resolvers = getDefaultArgumentResolvers(); diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/HttpEntityMethodProcessor.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/HttpEntityMethodProcessor.java index 4108828fa4..e93029aa64 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/HttpEntityMethodProcessor.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/HttpEntityMethodProcessor.java @@ -61,19 +61,16 @@ public class HttpEntityMethodProcessor extends AbstractMessageConverterMethodPro super(messageConverters, contentNegotiationManager); } - @Override public boolean supportsParameter(MethodParameter parameter) { Class parameterType = parameter.getParameterType(); return HttpEntity.class.equals(parameterType); } - @Override public boolean supportsReturnType(MethodParameter returnType) { Class parameterType = returnType.getParameterType(); return HttpEntity.class.equals(parameterType) || ResponseEntity.class.equals(parameterType); } - @Override public Object resolveArgument( MethodParameter parameter, ModelAndViewContainer mavContainer, NativeWebRequest webRequest, WebDataBinderFactory binderFactory) @@ -97,7 +94,6 @@ public class HttpEntityMethodProcessor extends AbstractMessageConverterMethodPro + " is not parameterized or has more than one parameter"); } - @Override public void handleReturnValue( Object returnValue, MethodParameter returnType, ModelAndViewContainer mavContainer, NativeWebRequest webRequest) diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/MatrixVariableMapMethodArgumentResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/MatrixVariableMapMethodArgumentResolver.java index ffefd91786..9a5160ade9 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/MatrixVariableMapMethodArgumentResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/MatrixVariableMapMethodArgumentResolver.java @@ -44,7 +44,6 @@ import org.springframework.web.servlet.HandlerMapping; */ public class MatrixVariableMapMethodArgumentResolver implements HandlerMethodArgumentResolver { - @Override public boolean supportsParameter(MethodParameter parameter) { MatrixVariable paramAnnot = parameter.getParameterAnnotation(MatrixVariable.class); if (paramAnnot != null) { @@ -55,7 +54,6 @@ public class MatrixVariableMapMethodArgumentResolver implements HandlerMethodArg return false; } - @Override public Object resolveArgument(MethodParameter parameter, ModelAndViewContainer mavContainer, NativeWebRequest request, WebDataBinderFactory binderFactory) throws Exception { diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/MatrixVariableMethodArgumentResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/MatrixVariableMethodArgumentResolver.java index e4fd61ceac..5b511116db 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/MatrixVariableMethodArgumentResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/MatrixVariableMethodArgumentResolver.java @@ -47,7 +47,6 @@ public class MatrixVariableMethodArgumentResolver extends AbstractNamedValueMeth super(null); } - @Override public boolean supportsParameter(MethodParameter parameter) { if (!parameter.hasParameterAnnotation(MatrixVariable.class)) { return false; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ModelAndViewMethodReturnValueHandler.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ModelAndViewMethodReturnValueHandler.java index ebdcd8fcf3..92d180f31c 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ModelAndViewMethodReturnValueHandler.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ModelAndViewMethodReturnValueHandler.java @@ -42,12 +42,10 @@ import org.springframework.web.servlet.View; */ public class ModelAndViewMethodReturnValueHandler implements HandlerMethodReturnValueHandler { - @Override public boolean supportsReturnType(MethodParameter returnType) { return ModelAndView.class.isAssignableFrom(returnType.getParameterType()); } - @Override public void handleReturnValue( Object returnValue, MethodParameter returnType, ModelAndViewContainer mavContainer, NativeWebRequest webRequest) diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ModelAndViewResolverMethodReturnValueHandler.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ModelAndViewResolverMethodReturnValueHandler.java index a54518b393..a39649551a 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ModelAndViewResolverMethodReturnValueHandler.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ModelAndViewResolverMethodReturnValueHandler.java @@ -67,12 +67,10 @@ public class ModelAndViewResolverMethodReturnValueHandler implements HandlerMeth /** * Always returns {@code true}. See class-level note. */ - @Override public boolean supportsReturnType(MethodParameter returnType) { return true; } - @Override public void handleReturnValue( Object returnValue, MethodParameter returnType, ModelAndViewContainer mavContainer, NativeWebRequest request) diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/PathVariableMapMethodArgumentResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/PathVariableMapMethodArgumentResolver.java index 55e59b7dbf..52af8e427a 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/PathVariableMapMethodArgumentResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/PathVariableMapMethodArgumentResolver.java @@ -42,7 +42,6 @@ import org.springframework.web.servlet.HandlerMapping; */ public class PathVariableMapMethodArgumentResolver implements HandlerMethodArgumentResolver { - @Override public boolean supportsParameter(MethodParameter parameter) { PathVariable annot = parameter.getParameterAnnotation(PathVariable.class); return ((annot != null) && (Map.class.isAssignableFrom(parameter.getParameterType())) @@ -52,7 +51,6 @@ public class PathVariableMapMethodArgumentResolver implements HandlerMethodArgum /** * Return a Map with all URI template variables or an empty map. */ - @Override public Object resolveArgument(MethodParameter parameter, ModelAndViewContainer mavContainer, NativeWebRequest webRequest, WebDataBinderFactory binderFactory) throws Exception { diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/PathVariableMethodArgumentResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/PathVariableMethodArgumentResolver.java index cda9a37ad1..d93b7746a7 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/PathVariableMethodArgumentResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/PathVariableMethodArgumentResolver.java @@ -65,7 +65,6 @@ public class PathVariableMethodArgumentResolver extends AbstractNamedValueMethod super(null); } - @Override public boolean supportsParameter(MethodParameter parameter) { if (!parameter.hasParameterAnnotation(PathVariable.class)) { return false; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RedirectAttributesMethodArgumentResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RedirectAttributesMethodArgumentResolver.java index 9cf3a73189..89d4849c3d 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RedirectAttributesMethodArgumentResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RedirectAttributesMethodArgumentResolver.java @@ -42,12 +42,10 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributesModelMap; */ public class RedirectAttributesMethodArgumentResolver implements HandlerMethodArgumentResolver { - @Override public boolean supportsParameter(MethodParameter parameter) { return RedirectAttributes.class.isAssignableFrom(parameter.getParameterType()); } - @Override public Object resolveArgument( MethodParameter parameter, ModelAndViewContainer mavContainer, NativeWebRequest webRequest, WebDataBinderFactory binderFactory) diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerAdapter.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerAdapter.java index c2b189aeb7..d79a9ef5db 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerAdapter.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerAdapter.java @@ -465,7 +465,6 @@ public class RequestMappingHandlerAdapter extends AbstractHandlerMethodAdapter i *

A {@link ConfigurableBeanFactory} is expected for resolving * expressions in method argument default values. */ - @Override public void setBeanFactory(BeanFactory beanFactory) { if (beanFactory instanceof ConfigurableBeanFactory) { this.beanFactory = (ConfigurableBeanFactory) beanFactory; @@ -479,7 +478,6 @@ public class RequestMappingHandlerAdapter extends AbstractHandlerMethodAdapter i return this.beanFactory; } - @Override public void afterPropertiesSet() { if (this.argumentResolvers == null) { List resolvers = getDefaultArgumentResolvers(); @@ -865,7 +863,6 @@ public class RequestMappingHandlerAdapter extends AbstractHandlerMethodAdapter i */ public static final MethodFilter INIT_BINDER_METHODS = new MethodFilter() { - @Override public boolean matches(Method method) { return AnnotationUtils.findAnnotation(method, InitBinder.class) != null; } @@ -876,7 +873,6 @@ public class RequestMappingHandlerAdapter extends AbstractHandlerMethodAdapter i */ public static final MethodFilter MODEL_ATTRIBUTE_METHODS = new MethodFilter() { - @Override public boolean matches(Method method) { return ((AnnotationUtils.findAnnotation(method, RequestMapping.class) == null) && (AnnotationUtils.findAnnotation(method, ModelAttribute.class) != null)); diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestPartMethodArgumentResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestPartMethodArgumentResolver.java index f3474d102a..80b7678571 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestPartMethodArgumentResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestPartMethodArgumentResolver.java @@ -87,7 +87,6 @@ public class RequestPartMethodArgumentResolver extends AbstractMessageConverterM *

  • Of type {@code javax.servlet.http.Part} unless annotated with {@code @RequestParam}. * */ - @Override public boolean supportsParameter(MethodParameter parameter) { if (parameter.hasParameterAnnotation(RequestPart.class)) { return true; @@ -108,7 +107,6 @@ public class RequestPartMethodArgumentResolver extends AbstractMessageConverterM } } - @Override public Object resolveArgument(MethodParameter parameter, ModelAndViewContainer mavContainer, NativeWebRequest request, WebDataBinderFactory binderFactory) throws Exception { diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestResponseBodyMethodProcessor.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestResponseBodyMethodProcessor.java index 4c8d098864..9b320cedb9 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestResponseBodyMethodProcessor.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestResponseBodyMethodProcessor.java @@ -74,12 +74,10 @@ public class RequestResponseBodyMethodProcessor extends AbstractMessageConverter super(messageConverters, contentNegotiationManager); } - @Override public boolean supportsParameter(MethodParameter parameter) { return parameter.hasParameterAnnotation(RequestBody.class); } - @Override public boolean supportsReturnType(MethodParameter returnType) { return returnType.getMethodAnnotation(ResponseBody.class) != null; } @@ -91,7 +89,6 @@ public class RequestResponseBodyMethodProcessor extends AbstractMessageConverter * is {@code true} and there is no body content or if there is no suitable * converter to read the content with. */ - @Override public Object resolveArgument(MethodParameter parameter, ModelAndViewContainer mavContainer, NativeWebRequest webRequest, WebDataBinderFactory binderFactory) throws Exception { @@ -183,7 +180,6 @@ public class RequestResponseBodyMethodProcessor extends AbstractMessageConverter return super.readWithMessageConverters(inputMessage, methodParam, paramType); } - @Override public void handleReturnValue(Object returnValue, MethodParameter returnType, ModelAndViewContainer mavContainer, NativeWebRequest webRequest) throws IOException, HttpMediaTypeNotAcceptableException { diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ServletInvocableHandlerMethod.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ServletInvocableHandlerMethod.java index bc9246c046..b219196c59 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ServletInvocableHandlerMethod.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ServletInvocableHandlerMethod.java @@ -182,7 +182,6 @@ public class ServletInvocableHandlerMethod extends InvocableHandlerMethod { return new CallableHandlerMethod(new Callable() { - @Override public Object call() throws Exception { if (result instanceof Exception) { throw (Exception) result; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ServletRequestMethodArgumentResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ServletRequestMethodArgumentResolver.java index 3a6770c793..d0c3a02024 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ServletRequestMethodArgumentResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ServletRequestMethodArgumentResolver.java @@ -55,7 +55,6 @@ import org.springframework.web.servlet.support.RequestContextUtils; */ public class ServletRequestMethodArgumentResolver implements HandlerMethodArgumentResolver { - @Override public boolean supportsParameter(MethodParameter parameter) { Class paramType = parameter.getParameterType(); return WebRequest.class.isAssignableFrom(paramType) || @@ -68,7 +67,6 @@ public class ServletRequestMethodArgumentResolver implements HandlerMethodArgume Reader.class.isAssignableFrom(paramType); } - @Override public Object resolveArgument( MethodParameter parameter, ModelAndViewContainer mavContainer, NativeWebRequest webRequest, WebDataBinderFactory binderFactory) diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ServletResponseMethodArgumentResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ServletResponseMethodArgumentResolver.java index 11e97e8660..14c216258f 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ServletResponseMethodArgumentResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ServletResponseMethodArgumentResolver.java @@ -44,7 +44,6 @@ import org.springframework.web.method.support.ModelAndViewContainer; */ public class ServletResponseMethodArgumentResolver implements HandlerMethodArgumentResolver { - @Override public boolean supportsParameter(MethodParameter parameter) { Class paramType = parameter.getParameterType(); return ServletResponse.class.isAssignableFrom(paramType) @@ -58,7 +57,6 @@ public class ServletResponseMethodArgumentResolver implements HandlerMethodArgum * to the response. If subsequently the underlying method returns * {@code null}, the request is considered directly handled. */ - @Override public Object resolveArgument( MethodParameter parameter, ModelAndViewContainer mavContainer, NativeWebRequest webRequest, WebDataBinderFactory binderFactory) diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/UriComponentsBuilderMethodArgumentResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/UriComponentsBuilderMethodArgumentResolver.java index a1800c2858..f87811a950 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/UriComponentsBuilderMethodArgumentResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/UriComponentsBuilderMethodArgumentResolver.java @@ -37,12 +37,10 @@ import org.springframework.web.util.UriComponentsBuilder; */ public class UriComponentsBuilderMethodArgumentResolver implements HandlerMethodArgumentResolver { - @Override public boolean supportsParameter(MethodParameter parameter) { return UriComponentsBuilder.class.isAssignableFrom(parameter.getParameterType()); } - @Override public Object resolveArgument( MethodParameter parameter, ModelAndViewContainer mavContainer, NativeWebRequest webRequest, WebDataBinderFactory binderFactory) diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ViewMethodReturnValueHandler.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ViewMethodReturnValueHandler.java index e68d91273e..de6a387330 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ViewMethodReturnValueHandler.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ViewMethodReturnValueHandler.java @@ -40,12 +40,10 @@ import org.springframework.web.servlet.View; */ public class ViewMethodReturnValueHandler implements HandlerMethodReturnValueHandler { - @Override public boolean supportsReturnType(MethodParameter returnType) { return View.class.isAssignableFrom(returnType.getParameterType()); } - @Override public void handleReturnValue( Object returnValue, MethodParameter returnType, ModelAndViewContainer mavContainer, NativeWebRequest webRequest) diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ViewNameMethodReturnValueHandler.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ViewNameMethodReturnValueHandler.java index d4ffdb8059..153486abb5 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ViewNameMethodReturnValueHandler.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ViewNameMethodReturnValueHandler.java @@ -40,13 +40,11 @@ import org.springframework.web.servlet.RequestToViewNameTranslator; */ public class ViewNameMethodReturnValueHandler implements HandlerMethodReturnValueHandler { - @Override public boolean supportsReturnType(MethodParameter returnType) { Class paramType = returnType.getParameterType(); return (void.class.equals(paramType) || String.class.equals(paramType)); } - @Override public void handleReturnValue( Object returnValue, MethodParameter returnType, ModelAndViewContainer mavContainer, NativeWebRequest webRequest) diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/AbstractUrlMethodNameResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/AbstractUrlMethodNameResolver.java index 3ee748d461..ed781d99c7 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/AbstractUrlMethodNameResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/AbstractUrlMethodNameResolver.java @@ -85,7 +85,6 @@ public abstract class AbstractUrlMethodNameResolver implements MethodNameResolve * Converts {@code null} values to NoSuchRequestHandlingMethodExceptions. * @see #getHandlerMethodNameForUrlPath */ - @Override public final String getHandlerMethodName(HttpServletRequest request) throws NoSuchRequestHandlingMethodException { diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/MultiActionController.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/MultiActionController.java index 0c2eff8a4b..77fc742104 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/MultiActionController.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/MultiActionController.java @@ -364,7 +364,6 @@ public class MultiActionController extends AbstractController implements LastMod * Return -1 if there's no such handler, indicating that content must be updated. * @see org.springframework.web.servlet.mvc.LastModified#getLastModified(HttpServletRequest) */ - @Override public long getLastModified(HttpServletRequest request) { try { String handlerMethodName = this.methodNameResolver.getHandlerMethodName(request); diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/ParameterMethodNameResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/ParameterMethodNameResolver.java index 469d77e2f7..bd9405b65b 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/ParameterMethodNameResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/ParameterMethodNameResolver.java @@ -157,7 +157,6 @@ public class ParameterMethodNameResolver implements MethodNameResolver { } - @Override public String getHandlerMethodName(HttpServletRequest request) throws NoSuchRequestHandlingMethodException { String methodName = null; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/PropertiesMethodNameResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/PropertiesMethodNameResolver.java index 08026a8735..3cbcb08a8f 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/PropertiesMethodNameResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/PropertiesMethodNameResolver.java @@ -72,7 +72,6 @@ public class PropertiesMethodNameResolver extends AbstractUrlMethodNameResolver this.pathMatcher = pathMatcher; } - @Override public void afterPropertiesSet() { if (this.mappings == null || this.mappings.isEmpty()) { throw new IllegalArgumentException("'mappings' property is required"); diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/RedirectAttributes.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/RedirectAttributes.java index 53b1437cda..d23b050cbc 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/RedirectAttributes.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/RedirectAttributes.java @@ -59,16 +59,12 @@ import org.springframework.web.servlet.FlashMap; */ public interface RedirectAttributes extends Model { - @Override RedirectAttributes addAttribute(String attributeName, Object attributeValue); - @Override RedirectAttributes addAttribute(Object attributeValue); - @Override RedirectAttributes addAllAttributes(Collection attributeValues); - @Override RedirectAttributes mergeAttributes(Map attributes); /** diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/RedirectAttributesModelMap.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/RedirectAttributesModelMap.java index 66c811837b..6db27a10d4 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/RedirectAttributesModelMap.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/RedirectAttributesModelMap.java @@ -57,7 +57,6 @@ public class RedirectAttributesModelMap extends ModelMap implements RedirectAttr /** * Return the attributes candidate for flash storage or an empty Map. */ - @Override public Map getFlashAttributes() { return this.flashAttributes; } @@ -66,7 +65,6 @@ public class RedirectAttributesModelMap extends ModelMap implements RedirectAttr * {@inheritDoc} *

    Formats the attribute value as a String before adding it. */ - @Override public RedirectAttributesModelMap addAttribute(String attributeName, Object attributeValue) { super.addAttribute(attributeName, formatValue(attributeValue)); return this; @@ -83,7 +81,6 @@ public class RedirectAttributesModelMap extends ModelMap implements RedirectAttr * {@inheritDoc} *

    Formats the attribute value as a String before adding it. */ - @Override public RedirectAttributesModelMap addAttribute(Object attributeValue) { super.addAttribute(attributeValue); return this; @@ -93,7 +90,6 @@ public class RedirectAttributesModelMap extends ModelMap implements RedirectAttr * {@inheritDoc} *

    Each attribute value is formatted as a String before being added. */ - @Override public RedirectAttributesModelMap addAllAttributes(Collection attributeValues) { super.addAllAttributes(attributeValues); return this; @@ -103,7 +99,6 @@ public class RedirectAttributesModelMap extends ModelMap implements RedirectAttr * {@inheritDoc} *

    Each attribute value is formatted as a String before being added. */ - @Override public RedirectAttributesModelMap addAllAttributes(Map attributes) { if (attributes != null) { for (String key : attributes.keySet()) { @@ -117,7 +112,6 @@ public class RedirectAttributesModelMap extends ModelMap implements RedirectAttr * {@inheritDoc} *

    Each attribute value is formatted as a String before being merged. */ - @Override public RedirectAttributesModelMap mergeAttributes(Map attributes) { if (attributes != null) { for (String key : attributes.keySet()) { @@ -129,7 +123,6 @@ public class RedirectAttributesModelMap extends ModelMap implements RedirectAttr return this; } - @Override public Map asMap() { return this; } @@ -156,13 +149,11 @@ public class RedirectAttributesModelMap extends ModelMap implements RedirectAttr } } - @Override public RedirectAttributes addFlashAttribute(String attributeName, Object attributeValue) { this.flashAttributes.addAttribute(attributeName, attributeValue); return this; } - @Override public RedirectAttributes addFlashAttribute(Object attributeValue) { this.flashAttributes.addAttribute(attributeValue); return this; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/DefaultServletHttpRequestHandler.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/DefaultServletHttpRequestHandler.java index 180bc6e88a..eadd19b0ac 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/DefaultServletHttpRequestHandler.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/DefaultServletHttpRequestHandler.java @@ -83,7 +83,6 @@ public class DefaultServletHttpRequestHandler implements HttpRequestHandler, Ser * attempts to locate the default Servlet using the known common * container-specific names. */ - @Override public void setServletContext(ServletContext servletContext) { this.servletContext = servletContext; if (!StringUtils.hasText(this.defaultServletName)) { @@ -110,7 +109,6 @@ public class DefaultServletHttpRequestHandler implements HttpRequestHandler, Ser } - @Override public void handleRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceHttpRequestHandler.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceHttpRequestHandler.java index 965adae67b..0a928be3a4 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceHttpRequestHandler.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceHttpRequestHandler.java @@ -88,7 +88,6 @@ public class ResourceHttpRequestHandler extends WebContentGenerator implements H this.locations = locations; } - @Override public void afterPropertiesSet() throws Exception { Assert.notEmpty(locations, "Locations list must not be empty"); } @@ -105,7 +104,6 @@ public class ResourceHttpRequestHandler extends WebContentGenerator implements H * of the resource will be written to the response with caching headers * set to expire one year in the future. */ - @Override public void handleRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/support/AbstractFlashMapManager.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/support/AbstractFlashMapManager.java index d667e88a81..9fe88e8ef7 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/support/AbstractFlashMapManager.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/support/AbstractFlashMapManager.java @@ -82,7 +82,6 @@ public abstract class AbstractFlashMapManager implements FlashMapManager { return this.urlPathHelper; } - @Override public final FlashMap retrieveAndUpdate(HttpServletRequest request, HttpServletResponse response) { List maps = retrieveFlashMaps(request); @@ -179,7 +178,6 @@ public abstract class AbstractFlashMapManager implements FlashMapManager { return true; } - @Override public final void saveOutputFlashMap(FlashMap flashMap, HttpServletRequest request, HttpServletResponse response) { if (CollectionUtils.isEmpty(flashMap)) { return; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/support/SessionFlashMapManager.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/support/SessionFlashMapManager.java index d3afa478ac..527f89d633 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/support/SessionFlashMapManager.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/support/SessionFlashMapManager.java @@ -40,7 +40,6 @@ public class SessionFlashMapManager extends AbstractFlashMapManager{ * FlashMap matching the current request is found or there are expired * FlashMap to be removed. */ - @Override @SuppressWarnings("unchecked") protected List retrieveFlashMaps(HttpServletRequest request) { HttpSession session = request.getSession(false); @@ -50,7 +49,6 @@ public class SessionFlashMapManager extends AbstractFlashMapManager{ /** * Save the given FlashMap instance, if not empty, in the HTTP session. */ - @Override protected void updateFlashMaps(List flashMaps, HttpServletRequest request, HttpServletResponse response) { request.getSession().setAttribute(FLASH_MAPS_SESSION_ATTRIBUTE, flashMaps); } diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/BindTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/BindTag.java index e1b756b98e..f5b45233e1 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/BindTag.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/BindTag.java @@ -171,7 +171,6 @@ public class BindTag extends HtmlEscapingAwareTag implements EditorAwareTag { return this.status.getErrors(); } - @Override public final PropertyEditor getEditor() { return this.status.getEditor(); } diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/EscapeBodyTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/EscapeBodyTag.java index c0cbaa9e11..2c0056def4 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/EscapeBodyTag.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/EscapeBodyTag.java @@ -67,12 +67,10 @@ public class EscapeBodyTag extends HtmlEscapingAwareTag implements BodyTag { return EVAL_BODY_BUFFERED; } - @Override public void doInitBody() { // do nothing } - @Override public void setBodyContent(BodyContent bodyContent) { this.bodyContent = bodyContent; } diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/EvalTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/EvalTag.java index b180975eb9..6ec63b58c8 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/EvalTag.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/EvalTag.java @@ -165,18 +165,15 @@ public class EvalTag extends HtmlEscapingAwareTag { this.variableResolver = pageContext.getVariableResolver(); } - @Override public Class[] getSpecificTargetClasses() { return null; } - @Override public boolean canRead(EvaluationContext context, Object target, String name) throws AccessException { return (target == null && (resolveImplicitVariable(name) != null || this.pageContext.findAttribute(name) != null)); } - @Override public TypedValue read(EvaluationContext context, Object target, String name) throws AccessException { Object implicitVar = resolveImplicitVariable(name); if (implicitVar != null) { @@ -185,12 +182,10 @@ public class EvalTag extends HtmlEscapingAwareTag { return new TypedValue(this.pageContext.findAttribute(name)); } - @Override public boolean canWrite(EvaluationContext context, Object target, String name) { return false; } - @Override public void write(EvaluationContext context, Object target, String name, Object newValue) { throw new UnsupportedOperationException(); } diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/NestedPathTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/NestedPathTag.java index 65c9f565e3..1f8ddd2843 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/NestedPathTag.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/NestedPathTag.java @@ -111,12 +111,10 @@ public class NestedPathTag extends TagSupport implements TryCatchFinally { return EVAL_PAGE; } - @Override public void doCatch(Throwable throwable) throws Throwable { throw throwable; } - @Override public void doFinally() { this.previousNestedPath = null; } diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/RequestContextAwareTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/RequestContextAwareTag.java index 7105bc71c0..b02021fbb6 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/RequestContextAwareTag.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/RequestContextAwareTag.java @@ -110,12 +110,10 @@ public abstract class RequestContextAwareTag extends TagSupport implements TryCa protected abstract int doStartTagInternal() throws Exception; - @Override public void doCatch(Throwable throwable) throws Throwable { throw throwable; } - @Override public void doFinally() { this.requestContext = null; } diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/UrlTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/UrlTag.java index d0a65ad962..370bf19688 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/UrlTag.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/UrlTag.java @@ -157,7 +157,6 @@ public class UrlTag extends HtmlEscapingAwareTag implements ParamAware { ExpressionEvaluationUtils.evaluateBoolean("javaScriptEscape", javaScriptEscape, pageContext); } - @Override public void addParam(Param param) { this.params.add(param); } diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractDataBoundFormElementTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractDataBoundFormElementTag.java index abeebb548f..a0d569a509 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractDataBoundFormElementTag.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractDataBoundFormElementTag.java @@ -219,7 +219,6 @@ public abstract class AbstractDataBoundFormElementTag extends AbstractFormTag im * Exposes the {@link PropertyEditor} for {@link EditorAwareTag}. *

    Use {@link #getPropertyEditor()} for internal rendering purposes. */ - @Override public final PropertyEditor getEditor() throws JspException { return getPropertyEditor(); } diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractHtmlElementBodyTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractHtmlElementBodyTag.java index 0bbc79ba6f..a31cc1ebe6 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractHtmlElementBodyTag.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractHtmlElementBodyTag.java @@ -149,12 +149,10 @@ public abstract class AbstractHtmlElementBodyTag extends AbstractHtmlElementTag // BodyTag implementation //--------------------------------------------------------------------- - @Override public void doInitBody() throws JspException { // no op } - @Override public void setBodyContent(BodyContent bodyContent) { this.bodyContent = bodyContent; } diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractHtmlElementTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractHtmlElementTag.java index f3da981aa8..6316ac8b3c 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractHtmlElementTag.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractHtmlElementTag.java @@ -394,7 +394,6 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen /** * {@inheritDoc} */ - @Override public void setDynamicAttribute(String uri, String localName, Object value ) throws JspException { if (this.dynamicAttributes == null) { this.dynamicAttributes = new HashMap(); diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/ButtonTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/ButtonTag.java index 39a52e0fad..d3468aed0b 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/ButtonTag.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/ButtonTag.java @@ -46,7 +46,6 @@ public class ButtonTag extends AbstractHtmlElementTag { /** * Set the value of the '{@code name}' attribute. */ - @Override public String getName() { return name; } diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/SelectTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/SelectTag.java index 675292dc08..e0afe0f431 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/SelectTag.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/SelectTag.java @@ -216,7 +216,6 @@ public class SelectTag extends AbstractHtmlInputElementTag { ObjectUtils.getDisplayString(evaluate("itemLabel", getItemLabel())) : null); OptionWriter optionWriter = new OptionWriter(itemsObject, getBindStatus(), valueProperty, labelProperty, isHtmlEscape()) { - @Override protected String processOptionValue(String resolvedValue) { return processFieldValue(selectName, resolvedValue, "option"); } diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/CookieThemeResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/CookieThemeResolver.java index 5d73b8e452..2666098734 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/CookieThemeResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/CookieThemeResolver.java @@ -76,7 +76,6 @@ public class CookieThemeResolver extends CookieGenerator implements ThemeResolve } - @Override public String resolveThemeName(HttpServletRequest request) { // Check request for preparsed or preset theme. String theme = (String) request.getAttribute(THEME_REQUEST_ATTRIBUTE_NAME); @@ -94,7 +93,6 @@ public class CookieThemeResolver extends CookieGenerator implements ThemeResolve return getDefaultThemeName(); } - @Override public void setThemeName(HttpServletRequest request, HttpServletResponse response, String themeName) { if (themeName != null) { // Set request attribute and add cookie. diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/FixedThemeResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/FixedThemeResolver.java index c02bc45aa5..75aae57b61 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/FixedThemeResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/FixedThemeResolver.java @@ -33,12 +33,10 @@ import javax.servlet.http.HttpServletResponse; */ public class FixedThemeResolver extends AbstractThemeResolver { - @Override public String resolveThemeName(HttpServletRequest request) { return getDefaultThemeName(); } - @Override public void setThemeName(HttpServletRequest request, HttpServletResponse response, String themeName) { throw new UnsupportedOperationException("Cannot change theme - use a different theme resolution strategy"); } diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/SessionThemeResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/SessionThemeResolver.java index 7c9f0089f8..686f7a2708 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/SessionThemeResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/SessionThemeResolver.java @@ -46,14 +46,12 @@ public class SessionThemeResolver extends AbstractThemeResolver { */ public static final String THEME_SESSION_ATTRIBUTE_NAME = SessionThemeResolver.class.getName() + ".THEME"; - @Override public String resolveThemeName(HttpServletRequest request) { String theme = (String) WebUtils.getSessionAttribute(request, THEME_SESSION_ATTRIBUTE_NAME); // specific theme, or fallback to default? return (theme != null ? theme : getDefaultThemeName()); } - @Override public void setThemeName(HttpServletRequest request, HttpServletResponse response, String themeName) { WebUtils.setSessionAttribute(request, THEME_SESSION_ATTRIBUTE_NAME, themeName); } diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/AbstractCachingViewResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/AbstractCachingViewResolver.java index fe73b6df5c..c0a66c5216 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/AbstractCachingViewResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/AbstractCachingViewResolver.java @@ -116,7 +116,6 @@ public abstract class AbstractCachingViewResolver extends WebApplicationObjectSu } - @Override public View resolveViewName(String viewName, Locale locale) throws Exception { if (!isCache()) { return createView(viewName, locale); diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/AbstractUrlBasedView.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/AbstractUrlBasedView.java index 39f2c3b095..9e17d98f8f 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/AbstractUrlBasedView.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/AbstractUrlBasedView.java @@ -62,7 +62,6 @@ public abstract class AbstractUrlBasedView extends AbstractView implements Initi return this.url; } - @Override public void afterPropertiesSet() throws Exception { if (isUrlRequired() && getUrl() == null) { throw new IllegalArgumentException("Property 'url' is required"); diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/AbstractView.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/AbstractView.java index fdc3d22879..5ec4806647 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/AbstractView.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/AbstractView.java @@ -79,7 +79,6 @@ public abstract class AbstractView extends WebApplicationObjectSupport implement * Set the view's name. Helpful for traceability. *

    Framework code must call this when constructing views. */ - @Override public void setBeanName(String beanName) { this.beanName = beanName; } @@ -105,7 +104,6 @@ public abstract class AbstractView extends WebApplicationObjectSupport implement /** * Return the content type for this view. */ - @Override public String getContentType() { return this.contentType; } @@ -254,7 +252,6 @@ public abstract class AbstractView extends WebApplicationObjectSupport implement * Delegates to renderMergedOutputModel for the actual rendering. * @see #renderMergedOutputModel */ - @Override public void render(Map model, HttpServletRequest request, HttpServletResponse response) throws Exception { if (logger.isTraceEnabled()) { logger.trace("Rendering view with name '" + this.beanName + "' with model " + model + diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/BeanNameViewResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/BeanNameViewResolver.java index f19239c254..a8ca84e664 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/BeanNameViewResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/BeanNameViewResolver.java @@ -61,13 +61,11 @@ public class BeanNameViewResolver extends WebApplicationObjectSupport implements this.order = order; } - @Override public int getOrder() { return order; } - @Override public View resolveViewName(String viewName, Locale locale) throws BeansException { ApplicationContext context = getApplicationContext(); if (!context.containsBean(viewName)) { diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/ContentNegotiatingViewResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/ContentNegotiatingViewResolver.java index 8334c0b6d5..cc49726297 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/ContentNegotiatingViewResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/ContentNegotiatingViewResolver.java @@ -111,7 +111,6 @@ public class ContentNegotiatingViewResolver extends WebApplicationObjectSupport this.order = order; } - @Override public int getOrder() { return this.order; } @@ -273,7 +272,6 @@ public class ContentNegotiatingViewResolver extends WebApplicationObjectSupport this.cnManagerFactoryBean.setServletContext(servletContext); } - @Override public void afterPropertiesSet() throws Exception { if (this.contentNegotiationManager == null) { this.cnManagerFactoryBean.afterPropertiesSet(); @@ -281,7 +279,6 @@ public class ContentNegotiatingViewResolver extends WebApplicationObjectSupport } } - @Override public View resolveViewName(String viewName, Locale locale) throws Exception { RequestAttributes attrs = RequestContextHolder.getRequestAttributes(); Assert.isInstanceOf(ServletRequestAttributes.class, attrs); @@ -416,12 +413,10 @@ public class ContentNegotiatingViewResolver extends WebApplicationObjectSupport private static final View NOT_ACCEPTABLE_VIEW = new View() { - @Override public String getContentType() { return null; } - @Override public void render(Map model, HttpServletRequest request, HttpServletResponse response) { response.setStatus(HttpServletResponse.SC_NOT_ACCEPTABLE); } diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/DefaultRequestToViewNameTranslator.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/DefaultRequestToViewNameTranslator.java index dd8b1d3912..9ffb54e7b7 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/DefaultRequestToViewNameTranslator.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/DefaultRequestToViewNameTranslator.java @@ -171,7 +171,6 @@ public class DefaultRequestToViewNameTranslator implements RequestToViewNameTran * @see org.springframework.web.util.UrlPathHelper#getLookupPathForRequest * @see #transformPath */ - @Override public String getViewName(HttpServletRequest request) { String lookupPath = this.urlPathHelper.getLookupPathForRequest(request); return (this.prefix + transformPath(lookupPath) + this.suffix); diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/RedirectView.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/RedirectView.java index 8813f4172f..0f96d4832a 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/RedirectView.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/RedirectView.java @@ -238,7 +238,6 @@ public class RedirectView extends AbstractUrlBasedView implements SmartView { /** * Returns "true" indicating this view performs a redirect. */ - @Override public boolean isRedirectView() { return true; } diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/ResourceBundleViewResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/ResourceBundleViewResolver.java index 3ccf375e06..2726e0537c 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/ResourceBundleViewResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/ResourceBundleViewResolver.java @@ -91,7 +91,6 @@ public class ResourceBundleViewResolver extends AbstractCachingViewResolver this.order = order; } - @Override public int getOrder() { return this.order; } @@ -181,7 +180,6 @@ public class ResourceBundleViewResolver extends AbstractCachingViewResolver * Eagerly initialize Locales if necessary. * @see #setLocalesToInitialize */ - @Override public void afterPropertiesSet() throws BeansException { if (this.localesToInitialize != null) { for (Locale locale : this.localesToInitialize) { @@ -277,7 +275,6 @@ public class ResourceBundleViewResolver extends AbstractCachingViewResolver /** * Close the bundle View factories on context shutdown. */ - @Override public void destroy() throws BeansException { for (ConfigurableApplicationContext factory : this.bundleCache.values()) { factory.close(); diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/UrlBasedViewResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/UrlBasedViewResolver.java index 086d6e204e..56a3a3effb 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/UrlBasedViewResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/UrlBasedViewResolver.java @@ -334,7 +334,6 @@ public class UrlBasedViewResolver extends AbstractCachingViewResolver implements * Return the order in which this {@link org.springframework.web.servlet.ViewResolver} * is evaluated. */ - @Override public int getOrder() { return this.order; } diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/XmlViewResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/XmlViewResolver.java index 67f3ac5192..59b45a8a80 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/XmlViewResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/XmlViewResolver.java @@ -69,7 +69,6 @@ public class XmlViewResolver extends AbstractCachingViewResolver this.order = order; } - @Override public int getOrder() { return order; } @@ -87,7 +86,6 @@ public class XmlViewResolver extends AbstractCachingViewResolver * Pre-initialize the factory from the XML file. * Only effective if caching is enabled. */ - @Override public void afterPropertiesSet() throws BeansException { if (isCache()) { initFactory(); @@ -154,7 +152,6 @@ public class XmlViewResolver extends AbstractCachingViewResolver /** * Close the view bean factory on context shutdown. */ - @Override public void destroy() throws BeansException { if (this.cachedFactory != null) { this.cachedFactory.close(); diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/freemarker/FreeMarkerConfigurer.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/freemarker/FreeMarkerConfigurer.java index c572481b6a..3769cecf35 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/freemarker/FreeMarkerConfigurer.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/freemarker/FreeMarkerConfigurer.java @@ -97,7 +97,6 @@ public class FreeMarkerConfigurer extends FreeMarkerConfigurationFactory /** * Initialize the {@link TaglibFactory} for the given ServletContext. */ - @Override public void setServletContext(ServletContext servletContext) { this.taglibFactory = new TaglibFactory(servletContext); } @@ -110,7 +109,6 @@ public class FreeMarkerConfigurer extends FreeMarkerConfigurationFactory * @see #createConfiguration * @see #setConfiguration */ - @Override public void afterPropertiesSet() throws IOException, TemplateException { if (this.configuration == null) { this.configuration = createConfiguration(); @@ -131,7 +129,6 @@ public class FreeMarkerConfigurer extends FreeMarkerConfigurationFactory /** * Return the Configuration object wrapped by this bean. */ - @Override public Configuration getConfiguration() { return this.configuration; } @@ -139,7 +136,6 @@ public class FreeMarkerConfigurer extends FreeMarkerConfigurationFactory /** * Return the TaglibFactory object wrapped by this bean. */ - @Override public TaglibFactory getTaglibFactory() { return this.taglibFactory; } diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/freemarker/FreeMarkerView.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/freemarker/FreeMarkerView.java index d64e1e0ae3..643231404a 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/freemarker/FreeMarkerView.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/freemarker/FreeMarkerView.java @@ -387,22 +387,18 @@ public class FreeMarkerView extends AbstractTemplateView { */ private class DelegatingServletConfig implements ServletConfig { - @Override public String getServletName() { return FreeMarkerView.this.getBeanName(); } - @Override public ServletContext getServletContext() { return FreeMarkerView.this.getServletContext(); } - @Override public String getInitParameter(String paramName) { return null; } - @Override public Enumeration getInitParameterNames() { return Collections.enumeration(new HashSet()); } diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles2/AbstractSpringPreparerFactory.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles2/AbstractSpringPreparerFactory.java index 06b3fdabaf..ef4faaf2e0 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles2/AbstractSpringPreparerFactory.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles2/AbstractSpringPreparerFactory.java @@ -36,7 +36,6 @@ import org.springframework.web.servlet.DispatcherServlet; */ public abstract class AbstractSpringPreparerFactory implements PreparerFactory { - @Override public ViewPreparer getPreparer(String name, TilesRequestContext context) throws TilesException { WebApplicationContext webApplicationContext = (WebApplicationContext) context.getRequestScope().get( DispatcherServlet.WEB_APPLICATION_CONTEXT_ATTRIBUTE); diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles2/SpringTilesApplicationContextFactory.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles2/SpringTilesApplicationContextFactory.java index 3b399b1932..0ebda796a5 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles2/SpringTilesApplicationContextFactory.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles2/SpringTilesApplicationContextFactory.java @@ -47,12 +47,10 @@ public class SpringTilesApplicationContextFactory extends AbstractTilesApplicati private Map params; - @Override public void init(Map params) { this.params = params; } - @Override public TilesApplicationContext createApplicationContext(Object context) { return new SpringWildcardServletTilesApplicationContext((ServletContext) context, this.params); } diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles2/TilesConfigurer.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles2/TilesConfigurer.java index f3b76f3730..050aad09cf 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles2/TilesConfigurer.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles2/TilesConfigurer.java @@ -309,7 +309,6 @@ public class TilesConfigurer implements ServletContextAware, InitializingBean, D CollectionUtils.mergePropertiesIntoMap(tilesProperties, this.tilesPropertyMap); } - @Override public void setServletContext(ServletContext servletContext) { this.servletContext = servletContext; } @@ -321,7 +320,6 @@ public class TilesConfigurer implements ServletContextAware, InitializingBean, D * @throws TilesException in case of setup failure * @see #createTilesInitializer() */ - @Override public void afterPropertiesSet() throws TilesException { boolean activateEl = false; if (tilesElPresent) { @@ -378,7 +376,6 @@ public class TilesConfigurer implements ServletContextAware, InitializingBean, D * Removes the TilesContainer from this web application. * @throws TilesException in case of cleanup failure */ - @Override public void destroy() throws TilesException { try { // Tiles 2.2? diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/velocity/VelocityConfigurer.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/velocity/VelocityConfigurer.java index d5394519af..5d547a639e 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/velocity/VelocityConfigurer.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/velocity/VelocityConfigurer.java @@ -104,7 +104,6 @@ public class VelocityConfigurer extends VelocityEngineFactory this.velocityEngine = velocityEngine; } - @Override public void setServletContext(ServletContext servletContext) { this.servletContext = servletContext; } @@ -115,7 +114,6 @@ public class VelocityConfigurer extends VelocityEngineFactory * @see #createVelocityEngine * @see #setVelocityEngine */ - @Override public void afterPropertiesSet() throws IOException, VelocityException { if (this.velocityEngine == null) { this.velocityEngine = createVelocityEngine(); @@ -143,7 +141,6 @@ public class VelocityConfigurer extends VelocityEngineFactory } } - @Override public VelocityEngine getVelocityEngine() { return this.velocityEngine; }