Skip to content

Commit 22bf4df

Browse files
committed
Polish
1 parent b56fc50 commit 22bf4df

File tree

52 files changed

+281
-290
lines changed

Some content is hidden

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

52 files changed

+281
-290
lines changed

spring-core/src/test/java/org/springframework/aot/hint/BindingReflectionHintsRegistrarTests.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,12 @@
1616

1717
package org.springframework.aot.hint;
1818

19-
import java.io.IOException;
2019
import java.lang.reflect.Type;
2120
import java.time.LocalDate;
2221
import java.util.List;
2322
import java.util.Set;
2423

2524
import com.fasterxml.jackson.annotation.JsonProperty;
26-
import com.fasterxml.jackson.core.JacksonException;
2725
import com.fasterxml.jackson.core.JsonParser;
2826
import com.fasterxml.jackson.databind.DeserializationContext;
2927
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
@@ -443,7 +441,7 @@ public CustomDeserializer1() {
443441
}
444442

445443
@Override
446-
public LocalDate deserialize(JsonParser p, DeserializationContext ctxt) throws IOException, JacksonException {
444+
public LocalDate deserialize(JsonParser p, DeserializationContext ctxt) {
447445
return null;
448446
}
449447
}
@@ -456,7 +454,7 @@ public CustomDeserializer2() {
456454
}
457455

458456
@Override
459-
public LocalDate deserialize(JsonParser p, DeserializationContext ctxt) throws IOException, JacksonException {
457+
public LocalDate deserialize(JsonParser p, DeserializationContext ctxt) {
460458
return null;
461459
}
462460
}

spring-core/src/test/java/org/springframework/aot/hint/annotation/RegisterReflectionForBindingProcessorTests.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-2023 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 throwExceptionWithoutAnnotationAttributeOnClass() {
5959
}
6060

6161
@Test
62-
void throwExceptionWithoutAnnotationAttributeOnMethod() throws NoSuchMethodException {
62+
void throwExceptionWithoutAnnotationAttributeOnMethod() {
6363
assertThatThrownBy(() -> processor.registerReflectionHints(hints.reflection(),
6464
SampleClassWithoutMethodLevelAnnotationAttribute.class.getMethod("method")))
6565
.isInstanceOf(IllegalStateException.class);

spring-core/src/test/java/org/springframework/core/BridgeMethodResolverTests.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ void withDoubleBoundParameterizedOnInstantiate() throws Exception {
152152
}
153153

154154
@Test
155-
void withGenericParameter() throws Exception {
155+
void withGenericParameter() {
156156
Method[] methods = StringGenericParameter.class.getMethods();
157157
Method bridgeMethod = null;
158158
Method bridgedMethod = null;
@@ -173,7 +173,7 @@ void withGenericParameter() throws Exception {
173173
}
174174

175175
@Test
176-
void onAllMethods() throws Exception {
176+
void onAllMethods() {
177177
Method[] methods = StringList.class.getMethods();
178178
for (Method method : methods) {
179179
assertThat(BridgeMethodResolver.findBridgedMethod(method)).isNotNull();
@@ -206,7 +206,7 @@ void spr2603() throws Exception {
206206
}
207207

208208
@Test
209-
void spr2648() throws Exception {
209+
void spr2648() {
210210
Method bridgeMethod = ReflectionUtils.findMethod(GenericSqlMapIntegerDao.class, "saveOrUpdate", Object.class);
211211
assertThat(bridgeMethod != null && bridgeMethod.isBridge()).isTrue();
212212
Method bridgedMethod = BridgeMethodResolver.findBridgedMethod(bridgeMethod);
@@ -296,7 +296,7 @@ void spr3485() throws Exception {
296296
}
297297

298298
@Test
299-
void spr3534() throws Exception {
299+
void spr3534() {
300300
Method bridgeMethod = ReflectionUtils.findMethod(TestEmailProvider.class, "findBy", Object.class);
301301
assertThat(bridgeMethod != null && bridgeMethod.isBridge()).isTrue();
302302
Method bridgedMethod = BridgeMethodResolver.findBridgedMethod(bridgeMethod);
@@ -843,7 +843,7 @@ public void receive(ModifiedMessageEvent event) {
843843

844844
public interface SimpleGenericRepository<T> {
845845

846-
public Class<T> getPersistentClass();
846+
Class<T> getPersistentClass();
847847

848848
List<T> findByQuery();
849849

@@ -884,7 +884,7 @@ public <T> SimpleGenericRepository<T> getFor(Class<T> entityType) {
884884
return null;
885885
}
886886

887-
public void afterPropertiesSet() throws Exception {
887+
public void afterPropertiesSet() {
888888
}
889889
}
890890

spring-core/src/test/java/org/springframework/core/CollectionFactoryTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ void rejectsNullMapType() {
306306

307307

308308
enum Color {
309-
RED, BLUE;
309+
RED, BLUE
310310
}
311311

312312
}

spring-core/src/test/java/org/springframework/core/ConstantsTests.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -192,28 +192,28 @@ void toCode() {
192192
}
193193

194194
@Test
195-
void getValuesWithNullPrefix() throws Exception {
195+
void getValuesWithNullPrefix() {
196196
Constants c = new Constants(A.class);
197197
Set<?> values = c.getValues(null);
198198
assertThat(values).as("Must have returned *all* public static final values").hasSize(7);
199199
}
200200

201201
@Test
202-
void getValuesWithEmptyStringPrefix() throws Exception {
202+
void getValuesWithEmptyStringPrefix() {
203203
Constants c = new Constants(A.class);
204204
Set<Object> values = c.getValues("");
205205
assertThat(values).as("Must have returned *all* public static final values").hasSize(7);
206206
}
207207

208208
@Test
209-
void getValuesWithWhitespacedStringPrefix() throws Exception {
209+
void getValuesWithWhitespacedStringPrefix() {
210210
Constants c = new Constants(A.class);
211211
Set<?> values = c.getValues(" ");
212212
assertThat(values).as("Must have returned *all* public static final values").hasSize(7);
213213
}
214214

215215
@Test
216-
void withClassThatExposesNoConstants() throws Exception {
216+
void withClassThatExposesNoConstants() {
217217
Constants c = new Constants(NoConstants.class);
218218
assertThat(c.getSize()).isEqualTo(0);
219219
final Set<?> values = c.getValues("");
@@ -222,7 +222,7 @@ void withClassThatExposesNoConstants() throws Exception {
222222
}
223223

224224
@Test
225-
void ctorWithNullClass() throws Exception {
225+
void ctorWithNullClass() {
226226
assertThatIllegalArgumentException().isThrownBy(() ->
227227
new Constants(null));
228228
}

spring-core/src/test/java/org/springframework/core/ExceptionDepthComparatorTests.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2019 the original author or authors.
2+
* Copyright 2002-2023 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.
@@ -30,55 +30,55 @@
3030
class ExceptionDepthComparatorTests {
3131

3232
@Test
33-
void targetBeforeSameDepth() throws Exception {
33+
void targetBeforeSameDepth() {
3434
Class<? extends Throwable> foundClass = findClosestMatch(TargetException.class, SameDepthException.class);
3535
assertThat(foundClass).isEqualTo(TargetException.class);
3636
}
3737

3838
@Test
39-
void sameDepthBeforeTarget() throws Exception {
39+
void sameDepthBeforeTarget() {
4040
Class<? extends Throwable> foundClass = findClosestMatch(SameDepthException.class, TargetException.class);
4141
assertThat(foundClass).isEqualTo(TargetException.class);
4242
}
4343

4444
@Test
45-
void lowestDepthBeforeTarget() throws Exception {
45+
void lowestDepthBeforeTarget() {
4646
Class<? extends Throwable> foundClass = findClosestMatch(LowestDepthException.class, TargetException.class);
4747
assertThat(foundClass).isEqualTo(TargetException.class);
4848
}
4949

5050
@Test
51-
void targetBeforeLowestDepth() throws Exception {
51+
void targetBeforeLowestDepth() {
5252
Class<? extends Throwable> foundClass = findClosestMatch(TargetException.class, LowestDepthException.class);
5353
assertThat(foundClass).isEqualTo(TargetException.class);
5454
}
5555

5656
@Test
57-
void noDepthBeforeTarget() throws Exception {
57+
void noDepthBeforeTarget() {
5858
Class<? extends Throwable> foundClass = findClosestMatch(NoDepthException.class, TargetException.class);
5959
assertThat(foundClass).isEqualTo(TargetException.class);
6060
}
6161

6262
@Test
63-
void noDepthBeforeHighestDepth() throws Exception {
63+
void noDepthBeforeHighestDepth() {
6464
Class<? extends Throwable> foundClass = findClosestMatch(NoDepthException.class, HighestDepthException.class);
6565
assertThat(foundClass).isEqualTo(HighestDepthException.class);
6666
}
6767

6868
@Test
69-
void highestDepthBeforeNoDepth() throws Exception {
69+
void highestDepthBeforeNoDepth() {
7070
Class<? extends Throwable> foundClass = findClosestMatch(HighestDepthException.class, NoDepthException.class);
7171
assertThat(foundClass).isEqualTo(HighestDepthException.class);
7272
}
7373

7474
@Test
75-
void highestDepthBeforeLowestDepth() throws Exception {
75+
void highestDepthBeforeLowestDepth() {
7676
Class<? extends Throwable> foundClass = findClosestMatch(HighestDepthException.class, LowestDepthException.class);
7777
assertThat(foundClass).isEqualTo(LowestDepthException.class);
7878
}
7979

8080
@Test
81-
void lowestDepthBeforeHighestDepth() throws Exception {
81+
void lowestDepthBeforeHighestDepth() {
8282
Class<? extends Throwable> foundClass = findClosestMatch(LowestDepthException.class, HighestDepthException.class);
8383
assertThat(foundClass).isEqualTo(LowestDepthException.class);
8484
}

0 commit comments

Comments
 (0)