Skip to content

Commit 8eb9782

Browse files
committed
Polishing
1 parent fb642ce commit 8eb9782

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

spring-core/src/test/java/org/springframework/core/annotation/MissingMergedAnnotationTests.java

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2019 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.
66
* You may obtain a copy of the License at
77
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
8+
* https://www.apache.org/licenses/LICENSE-2.0
99
*
1010
* Unless required by applicable law or agreed to in writing, software
1111
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -38,9 +38,10 @@ public class MissingMergedAnnotationTests {
3838

3939
private final MergedAnnotation<?> missing = MissingMergedAnnotation.getInstance();
4040

41+
4142
@Test
4243
public void getTypeThrowsNoSuchElementException() {
43-
assertThatNoSuchElementException().isThrownBy(() -> this.missing.getType());
44+
assertThatNoSuchElementException().isThrownBy(this.missing::getType);
4445
}
4546

4647
@Test
@@ -288,17 +289,19 @@ public void asMapWithFactoryReturnsNewMapFromFactory() {
288289
assertThat(map).isInstanceOf(ConcurrentReferenceHashMap.class);
289290
}
290291

292+
291293
private static ThrowableTypeAssert<NoSuchElementException> assertThatNoSuchElementException() {
292294
return assertThatExceptionOfType(NoSuchElementException.class);
293295
}
294296

295-
private static enum TestEnum {
297+
298+
private enum TestEnum {
296299
ONE, TWO, THREE
297300
}
298301

299-
@Retention(RetentionPolicy.RUNTIME)
300-
private static @interface TestAnnotation {
301302

303+
@Retention(RetentionPolicy.RUNTIME)
304+
private @interface TestAnnotation {
302305
}
303306

304307
}

spring-messaging/src/test/java/org/springframework/messaging/rsocket/DefaultRSocketRequesterBuilderTests.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* you may not use this file except in compliance with the License.
66
* You may obtain a copy of the License at
77
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
8+
* https://www.apache.org/licenses/LICENSE-2.0
99
*
1010
* Unless required by applicable law or agreed to in writing, software
1111
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -47,8 +47,9 @@ public void setup() {
4747
when(this.transport.connect(anyInt())).thenReturn(Mono.just(new MockConnection()));
4848
}
4949

50-
@SuppressWarnings("unchecked")
50+
5151
@Test
52+
@SuppressWarnings("unchecked")
5253
public void shouldApplyCustomizationsAtSubscription() {
5354
Consumer<RSocketFactory.ClientRSocketFactory> factoryConfigurer = mock(Consumer.class);
5455
Consumer<RSocketStrategies.Builder> strategiesConfigurer = mock(Consumer.class);
@@ -59,8 +60,8 @@ public void shouldApplyCustomizationsAtSubscription() {
5960
verifyZeroInteractions(this.transport, factoryConfigurer, strategiesConfigurer);
6061
}
6162

62-
@SuppressWarnings("unchecked")
6363
@Test
64+
@SuppressWarnings("unchecked")
6465
public void shouldApplyCustomizations() {
6566
Consumer<RSocketFactory.ClientRSocketFactory> factoryConfigurer = mock(Consumer.class);
6667
Consumer<RSocketStrategies.Builder> strategiesConfigurer = mock(Consumer.class);
@@ -74,6 +75,7 @@ public void shouldApplyCustomizations() {
7475
verify(strategiesConfigurer).accept(any(RSocketStrategies.Builder.class));
7576
}
7677

78+
7779
static class MockConnection implements DuplexConnection {
7880

7981
@Override
@@ -97,4 +99,4 @@ public void dispose() {
9799
}
98100
}
99101

100-
}
102+
}

0 commit comments

Comments
 (0)