Skip to content

Commit e31d66c

Browse files
committed
Polishing (backported from 5.3.x)
1 parent eb349be commit e31d66c

File tree

6 files changed

+15
-19
lines changed

6 files changed

+15
-19
lines changed

spring-aop/src/main/java/org/aopalliance/intercept/Joinpoint.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2016 the original author or authors.
2+
* Copyright 2002-2021 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
* terminology).
2424
*
2525
* <p>A runtime joinpoint is an <i>event</i> that occurs on a static
26-
* joinpoint (i.e. a location in a the program). For instance, an
26+
* joinpoint (i.e. a location in a program). For instance, an
2727
* invocation is the runtime joinpoint on a method (static joinpoint).
2828
* The static part of a given joinpoint can be generically retrieved
2929
* using the {@link #getStaticPart()} method.

spring-beans/src/test/java/org/springframework/beans/BeanWrapperGenericsTests.java

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,8 @@ public void testGenericMapWithCollectionValue() {
162162
value2.add(Boolean.TRUE);
163163
input.put("2", value2);
164164
bw.setPropertyValue("collectionMap", input);
165-
boolean condition1 = gb.getCollectionMap().get(1) instanceof HashSet;
166-
assertThat(condition1).isTrue();
167-
boolean condition = gb.getCollectionMap().get(2) instanceof ArrayList;
168-
assertThat(condition).isTrue();
165+
assertThat(gb.getCollectionMap().get(1) instanceof HashSet).isTrue();
166+
assertThat(gb.getCollectionMap().get(2) instanceof ArrayList).isTrue();
169167
}
170168

171169
@Test
@@ -177,8 +175,7 @@ public void testGenericMapElementWithCollectionValue() {
177175
HashSet<Integer> value1 = new HashSet<>();
178176
value1.add(1);
179177
bw.setPropertyValue("collectionMap[1]", value1);
180-
boolean condition = gb.getCollectionMap().get(1) instanceof HashSet;
181-
assertThat(condition).isTrue();
178+
assertThat(gb.getCollectionMap().get(1) instanceof HashSet).isTrue();
182179
}
183180

184181
@Test
@@ -324,14 +321,13 @@ public void testGenericTypeNestingMapOfInteger() {
324321
bw.setPropertyValue("mapOfInteger", map);
325322

326323
Object obj = gb.getMapOfInteger().get("testKey");
327-
boolean condition = obj instanceof Integer;
328-
assertThat(condition).isTrue();
324+
assertThat(obj instanceof Integer).isTrue();
329325
}
330326

331327
@Test
332328
public void testGenericTypeNestingMapOfListOfInteger() {
333329
Map<String, List<String>> map = new HashMap<>();
334-
List<String> list = Arrays.asList(new String[] {"1", "2", "3"});
330+
List<String> list = Arrays.asList("1", "2", "3");
335331
map.put("testKey", list);
336332

337333
NestedGenericCollectionBean gb = new NestedGenericCollectionBean();
@@ -362,7 +358,7 @@ public void testGenericTypeNestingListOfMapOfInteger() {
362358
@Test
363359
public void testGenericTypeNestingMapOfListOfListOfInteger() {
364360
Map<String, List<List<String>>> map = new HashMap<>();
365-
List<String> list = Arrays.asList(new String[] {"1", "2", "3"});
361+
List<String> list = Arrays.asList("1", "2", "3");
366362
map.put("testKey", Collections.singletonList(list));
367363

368364
NestedGenericCollectionBean gb = new NestedGenericCollectionBean();

spring-webflux/src/main/java/org/springframework/web/reactive/function/server/RequestPredicate.java

Lines changed: 2 additions & 2 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-2021 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.
@@ -71,7 +71,7 @@ default RequestPredicate or(RequestPredicate other) {
7171

7272
/**
7373
* Transform the given request into a request used for a nested route. For instance,
74-
* a path-based predicate can return a {@code ServerRequest} with a the path remaining
74+
* a path-based predicate can return a {@code ServerRequest} with a path remaining
7575
* after a match.
7676
* <p>The default implementation returns an {@code Optional} wrapping the given request if
7777
* {@link #test(ServerRequest)} evaluates to {@code true}; or {@link Optional#empty()}

spring-webmvc/src/main/java/org/springframework/web/servlet/function/RequestPredicate.java

Lines changed: 2 additions & 2 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-2021 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.
@@ -71,7 +71,7 @@ default RequestPredicate or(RequestPredicate other) {
7171

7272
/**
7373
* Transform the given request into a request used for a nested route. For instance,
74-
* a path-based predicate can return a {@code ServerRequest} with a the path remaining
74+
* a path-based predicate can return a {@code ServerRequest} with a path remaining
7575
* after a match.
7676
* <p>The default implementation returns an {@code Optional} wrapping the given request if
7777
* {@link #test(ServerRequest)} evaluates to {@code true}; or {@link Optional#empty()}

spring-websocket/src/main/java/org/springframework/web/socket/adapter/standard/ConvertingEncoderDecoderSupport.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2020 the original author or authors.
2+
* Copyright 2002-2021 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.
@@ -183,7 +183,7 @@ public boolean willDecode(M bytes) {
183183
}
184184

185185
/**
186-
* Decode the a message into an object.
186+
* Decode the message into an object.
187187
* @see javax.websocket.Decoder.Text#decode(String)
188188
* @see javax.websocket.Decoder.Binary#decode(ByteBuffer)
189189
*/

src/docs/asciidoc/web/websocket.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1202,7 +1202,7 @@ We can trace the flow through a simple example. Consider the following example,
12021202
@Controller
12031203
public class GreetingController {
12041204
1205-
@MessageMapping("/greeting") {
1205+
@MessageMapping("/greeting")
12061206
public String handle(String greeting) {
12071207
return "[" + getTimestamp() + ": " + greeting;
12081208
}

0 commit comments

Comments
 (0)