Skip to content

Commit 9468548

Browse files
committed
Add @OverRide to remaining source files
Issue: SPR-10130
1 parent 30db112 commit 9468548

File tree

1,279 files changed

+5825
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,279 files changed

+5825
-2
lines changed

spring-aop/src/main/java/org/springframework/aop/TargetSource.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public interface TargetSource extends TargetClassAware {
3939
* target class.
4040
* @return the type of targets returned by this {@link TargetSource}
4141
*/
42+
@Override
4243
Class<?> getTargetClass();
4344

4445
/**

spring-aop/src/main/java/org/springframework/aop/TrueClassFilter.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ class TrueClassFilter implements ClassFilter, Serializable {
3434
private TrueClassFilter() {
3535
}
3636

37+
@Override
3738
public boolean matches(Class clazz) {
3839
return true;
3940
}

spring-aop/src/main/java/org/springframework/aop/TrueMethodMatcher.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,17 @@ class TrueMethodMatcher implements MethodMatcher, Serializable {
3535
private TrueMethodMatcher() {
3636
}
3737

38+
@Override
3839
public boolean isRuntime() {
3940
return false;
4041
}
4142

43+
@Override
4244
public boolean matches(Method method, Class targetClass) {
4345
return true;
4446
}
4547

48+
@Override
4649
public boolean matches(Method method, Class targetClass, Object[] args) {
4750
// Should never be invoked as isRuntime returns false.
4851
throw new UnsupportedOperationException();

spring-aop/src/main/java/org/springframework/aop/TruePointcut.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,12 @@ class TruePointcut implements Pointcut, Serializable {
3434
private TruePointcut() {
3535
}
3636

37+
@Override
3738
public ClassFilter getClassFilter() {
3839
return ClassFilter.TRUE;
3940
}
4041

42+
@Override
4143
public MethodMatcher getMethodMatcher() {
4244
return MethodMatcher.TRUE;
4345
}

spring-aop/src/main/java/org/springframework/aop/aspectj/AbstractAspectJAdvice.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ public final ClassLoader getAspectClassLoader() {
203203
return this.aspectInstanceFactory.getAspectClassLoader();
204204
}
205205

206+
@Override
206207
public int getOrder() {
207208
return this.aspectInstanceFactory.getOrder();
208209
}
@@ -212,6 +213,7 @@ public void setAspectName(String name) {
212213
this.aspectName = name;
213214
}
214215

216+
@Override
215217
public String getAspectName() {
216218
return this.aspectName;
217219
}
@@ -223,6 +225,7 @@ public void setDeclarationOrder(int order) {
223225
this.declarationOrder = order;
224226
}
225227

228+
@Override
226229
public int getDeclarationOrder() {
227230
return this.declarationOrder;
228231
}
@@ -678,6 +681,7 @@ public AdviceExcludingMethodMatcher(Method adviceMethod) {
678681
this.adviceMethod = adviceMethod;
679682
}
680683

684+
@Override
681685
public boolean matches(Method method, Class targetClass) {
682686
return !this.adviceMethod.equals(method);
683687
}

spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAdviceParameterNameDiscoverer.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ public void setThrowingName(String throwingName) {
222222
* @param method the target {@link Method}
223223
* @return the parameter names
224224
*/
225+
@Override
225226
public String[] getParameterNames(Method method) {
226227
this.argumentTypes = method.getParameterTypes();
227228
this.numberOfRemainingUnboundArguments = this.argumentTypes.length;
@@ -309,6 +310,7 @@ public String[] getParameterNames(Method method) {
309310
* @throws UnsupportedOperationException if
310311
* {@link #setRaiseExceptions(boolean) raiseExceptions} has been set to {@code true}
311312
*/
313+
@Override
312314
public String[] getParameterNames(Constructor ctor) {
313315
if (this.raiseExceptions) {
314316
throw new UnsupportedOperationException("An advice method can never be a constructor");

spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAfterAdvice.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public AspectJAfterAdvice(
3737
super(aspectJBeforeAdviceMethod, pointcut, aif);
3838
}
3939

40+
@Override
4041
public Object invoke(MethodInvocation mi) throws Throwable {
4142
try {
4243
return mi.proceed();
@@ -46,10 +47,12 @@ public Object invoke(MethodInvocation mi) throws Throwable {
4647
}
4748
}
4849

50+
@Override
4951
public boolean isBeforeAdvice() {
5052
return false;
5153
}
5254

55+
@Override
5356
public boolean isAfterAdvice() {
5457
return true;
5558
}

spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAfterReturningAdvice.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,12 @@ public AspectJAfterReturningAdvice(
4040
super(aspectJBeforeAdviceMethod, pointcut, aif);
4141
}
4242

43+
@Override
4344
public boolean isBeforeAdvice() {
4445
return false;
4546
}
4647

48+
@Override
4749
public boolean isAfterAdvice() {
4850
return true;
4951
}
@@ -53,6 +55,7 @@ public void setReturningName(String name) {
5355
setReturningNameNoCheck(name);
5456
}
5557

58+
@Override
5659
public void afterReturning(Object returnValue, Method method, Object[] args, Object target) throws Throwable {
5760
if (shouldInvokeOnReturnValueOf(method, returnValue)) {
5861
invokeAdviceMethod(getJoinPointMatch(), returnValue, null);

spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAfterThrowingAdvice.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,12 @@ public AspectJAfterThrowingAdvice(
3737
super(aspectJBeforeAdviceMethod, pointcut, aif);
3838
}
3939

40+
@Override
4041
public boolean isBeforeAdvice() {
4142
return false;
4243
}
4344

45+
@Override
4446
public boolean isAfterAdvice() {
4547
return true;
4648
}
@@ -50,6 +52,7 @@ public void setThrowingName(String name) {
5052
setThrowingNameNoCheck(name);
5153
}
5254

55+
@Override
5356
public Object invoke(MethodInvocation mi) throws Throwable {
5457
try {
5558
return mi.proceed();

spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAroundAdvice.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,12 @@ public AspectJAroundAdvice(
4141
super(aspectJAroundAdviceMethod, pointcut, aif);
4242
}
4343

44+
@Override
4445
public boolean isBeforeAdvice() {
4546
return false;
4647
}
4748

49+
@Override
4850
public boolean isAfterAdvice() {
4951
return false;
5052
}
@@ -55,6 +57,7 @@ protected boolean supportsProceedingJoinPoint() {
5557
}
5658

5759

60+
@Override
5861
public Object invoke(MethodInvocation mi) throws Throwable {
5962
if (!(mi instanceof ProxyMethodInvocation)) {
6063
throw new IllegalStateException("MethodInvocation is not a Spring ProxyMethodInvocation: " + mi);

0 commit comments

Comments
 (0)