Skip to content

Commit 05ebca8

Browse files
committed
Polish
1 parent f846d94 commit 05ebca8

File tree

218 files changed

+1576
-1591
lines changed

Some content is hidden

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

218 files changed

+1576
-1591
lines changed

spring-context/src/test/java/org/springframework/aop/aspectj/AfterAdviceBindingTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2023 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -64,7 +64,7 @@ void setup() throws Exception {
6464
}
6565

6666
@AfterEach
67-
void tearDown() throws Exception {
67+
void tearDown() {
6868
this.ctx.close();
6969
}
7070

spring-context/src/test/java/org/springframework/aop/aspectj/AfterThrowingAdviceBindingTests.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2023 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -62,22 +62,22 @@ void tearDown() {
6262

6363

6464
@Test
65-
void simpleAfterThrowing() throws Throwable {
65+
void simpleAfterThrowing() {
6666
assertThatExceptionOfType(Throwable.class).isThrownBy(() ->
6767
this.testBean.exceptional(new Throwable()));
6868
verify(mockCollaborator).noArgs();
6969
}
7070

7171
@Test
72-
void afterThrowingWithBinding() throws Throwable {
72+
void afterThrowingWithBinding() {
7373
Throwable t = new Throwable();
7474
assertThatExceptionOfType(Throwable.class).isThrownBy(() ->
7575
this.testBean.exceptional(t));
7676
verify(mockCollaborator).oneThrowable(t);
7777
}
7878

7979
@Test
80-
void afterThrowingWithNamedTypeRestriction() throws Throwable {
80+
void afterThrowingWithNamedTypeRestriction() {
8181
Throwable t = new Throwable();
8282
assertThatExceptionOfType(Throwable.class).isThrownBy(() ->
8383
this.testBean.exceptional(t));
@@ -87,22 +87,22 @@ void afterThrowingWithNamedTypeRestriction() throws Throwable {
8787
}
8888

8989
@Test
90-
void afterThrowingWithRuntimeExceptionBinding() throws Throwable {
90+
void afterThrowingWithRuntimeExceptionBinding() {
9191
RuntimeException ex = new RuntimeException();
9292
assertThatExceptionOfType(Throwable.class).isThrownBy(() ->
9393
this.testBean.exceptional(ex));
9494
verify(mockCollaborator).oneRuntimeException(ex);
9595
}
9696

9797
@Test
98-
void afterThrowingWithTypeSpecified() throws Throwable {
98+
void afterThrowingWithTypeSpecified() {
9999
assertThatExceptionOfType(Throwable.class).isThrownBy(() ->
100100
this.testBean.exceptional(new Throwable()));
101101
verify(mockCollaborator).noArgsOnThrowableMatch();
102102
}
103103

104104
@Test
105-
void afterThrowingWithRuntimeTypeSpecified() throws Throwable {
105+
void afterThrowingWithRuntimeTypeSpecified() {
106106
assertThatExceptionOfType(Throwable.class).isThrownBy(() ->
107107
this.testBean.exceptional(new RuntimeException()));
108108
verify(mockCollaborator).noArgsOnRuntimeExceptionMatch();
@@ -123,7 +123,7 @@ public interface AfterThrowingAdviceBindingCollaborator {
123123
void noArgsOnRuntimeExceptionMatch();
124124
}
125125

126-
protected AfterThrowingAdviceBindingCollaborator collaborator = null;
126+
AfterThrowingAdviceBindingCollaborator collaborator = null;
127127

128128
public void setCollaborator(AfterThrowingAdviceBindingCollaborator aCollaborator) {
129129
this.collaborator = aCollaborator;

spring-context/src/test/java/org/springframework/aop/aspectj/AspectAndAdvicePrecedenceTests.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2022 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -242,8 +242,7 @@ class SimpleSpringBeforeAdvice implements MethodBeforeAdvice, BeanNameAware {
242242
* @see org.springframework.aop.MethodBeforeAdvice#before(java.lang.reflect.Method, java.lang.Object[], java.lang.Object)
243243
*/
244244
@Override
245-
public void before(Method method, Object[] args, @Nullable Object target)
246-
throws Throwable {
245+
public void before(Method method, Object[] args, @Nullable Object target) {
247246
this.collaborator.beforeAdviceOne(this.name);
248247
}
249248

spring-context/src/test/java/org/springframework/aop/aspectj/BeanNamePointcutTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2023 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -139,7 +139,7 @@ public static class TestInterceptor implements MethodBeforeAdvice {
139139
private int interceptionCount;
140140

141141
@Override
142-
public void before(Method method, Object[] args, @Nullable Object target) throws Throwable {
142+
public void before(Method method, Object[] args, @Nullable Object target) {
143143
interceptionCount++;
144144
}
145145
}

spring-context/src/test/java/org/springframework/aop/aspectj/ThisAndTargetSelectionOnlyPointcutsAtAspectJTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2022 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -119,7 +119,7 @@ void atAnnotationMethodAnnotationMatch() {
119119
}
120120

121121
interface TestInterface {
122-
public void doIt();
122+
void doIt();
123123
}
124124

125125
static class TestImpl implements TestInterface {

spring-context/src/test/java/org/springframework/aop/aspectj/ThisAndTargetSelectionOnlyPointcutsTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2022 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -107,7 +107,7 @@ void thisAsInterfaceAndTargetAsClassCounterMatch() {
107107

108108

109109
interface TestInterface {
110-
public void doIt();
110+
void doIt();
111111
}
112112

113113

spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AnnotationBindingTestAspect.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -23,7 +23,7 @@
2323
*/
2424
class AnnotationBindingTestAspect {
2525

26-
public String doWithAnnotation(ProceedingJoinPoint pjp, TestAnnotation testAnnotation) throws Throwable {
26+
public String doWithAnnotation(ProceedingJoinPoint pjp, TestAnnotation testAnnotation) {
2727
return testAnnotation.value();
2828
}
2929

spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AnnotationPointcutTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2022 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -65,7 +65,7 @@ void noMatchingWithoutAnnotationPresent() {
6565
class TestMethodInterceptor implements MethodInterceptor {
6666

6767
@Override
68-
public Object invoke(MethodInvocation methodInvocation) throws Throwable {
68+
public Object invoke(MethodInvocation methodInvocation) {
6969
return "this value";
7070
}
7171
}

spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectImplementingInterfaceTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2022 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -51,7 +51,7 @@ void proxyCreation() {
5151

5252

5353
interface AnInterface {
54-
public void interfaceMethod();
54+
void interfaceMethod();
5555
}
5656

5757

spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/benchmark/BenchmarkTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2023 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -226,7 +226,7 @@ class TraceAfterReturningAdvice implements AfterReturningAdvice {
226226
public int afterTakesInt;
227227

228228
@Override
229-
public void afterReturning(Object returnValue, Method method, Object[] args, Object target) throws Throwable {
229+
public void afterReturning(Object returnValue, Method method, Object[] args, Object target) {
230230
++afterTakesInt;
231231
}
232232

@@ -270,7 +270,7 @@ class TraceBeforeAdvice implements MethodBeforeAdvice {
270270
public int beforeStringReturn;
271271

272272
@Override
273-
public void before(Method method, Object[] args, Object target) throws Throwable {
273+
public void before(Method method, Object[] args, Object target) {
274274
++beforeStringReturn;
275275
}
276276

spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/spr3064/SPR3064Tests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2023 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -59,7 +59,7 @@ void serviceIsAdvised() {
5959
class TransactionInterceptor {
6060

6161
@Around(value="execution(* *..Service.*(..)) && @annotation(transaction)")
62-
public Object around(ProceedingJoinPoint pjp, Transaction transaction) throws Throwable {
62+
public Object around(ProceedingJoinPoint pjp, Transaction transaction) {
6363
throw new RuntimeException("advice invoked");
6464
//return pjp.proceed();
6565
}

spring-context/src/test/java/org/springframework/aop/config/AopNamespaceHandlerTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2023 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -157,11 +157,11 @@ class CountingAspectJAdvice {
157157

158158
private int aroundCount;
159159

160-
public void myBeforeAdvice() throws Throwable {
160+
public void myBeforeAdvice() {
161161
this.beforeCount++;
162162
}
163163

164-
public void myAfterAdvice() throws Throwable {
164+
public void myAfterAdvice() {
165165
this.afterCount++;
166166
}
167167

0 commit comments

Comments
 (0)