File tree Expand file tree Collapse file tree 5 files changed +9
-9
lines changed
spring-aspects/src/test/java/org/springframework/cache/aspectj
test/java/org/springframework/cache/config
testFixtures/java/org/springframework/context/testfixture/cache
spring-core/src/test/java/org/springframework/util/xml
spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client Expand file tree Collapse file tree 5 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -416,11 +416,11 @@ protected void testConditionalCacheUpdate(CacheableService<?> service) {
416
416
Integer three = 3 ;
417
417
418
418
Cache cache = this .cm .getCache ("testCache" );
419
- assertThat (( int ) Integer .valueOf (service .conditionalUpdate (one ).toString ())).isEqualTo ((int ) one );
419
+ assertThat (Integer .parseInt (service .conditionalUpdate (one ).toString ())).isEqualTo ((int ) one );
420
420
assertThat (cache .get (one )).isNull ();
421
421
422
- assertThat (( int ) Integer .valueOf (service .conditionalUpdate (three ).toString ())).isEqualTo ((int ) three );
423
- assertThat (( int ) Integer .valueOf (cache .get (three ).get ().toString ())).isEqualTo ((int ) three );
422
+ assertThat (Integer .parseInt (service .conditionalUpdate (three ).toString ())).isEqualTo ((int ) three );
423
+ assertThat (Integer .parseInt (cache .get (three ).get ().toString ())).isEqualTo ((int ) three );
424
424
}
425
425
426
426
protected void testMultiCache (CacheableService <?> service ) {
Original file line number Diff line number Diff line change @@ -195,7 +195,7 @@ static class BeanConditionConfig {
195
195
196
196
@ Bean
197
197
public Bar bar () {
198
- return new Bar (Boolean .valueOf (env .getProperty ("bar.enabled" )));
198
+ return new Bar (Boolean .parseBoolean (env .getProperty ("bar.enabled" )));
199
199
}
200
200
201
201
Original file line number Diff line number Diff line change @@ -411,11 +411,11 @@ protected void testConditionalCacheUpdate(CacheableService<?> service) {
411
411
Integer three = 3 ;
412
412
413
413
Cache cache = this .cm .getCache ("testCache" );
414
- assertThat (( int ) Integer .valueOf (service .conditionalUpdate (one ).toString ())).isEqualTo ((int ) one );
414
+ assertThat (Integer .parseInt (service .conditionalUpdate (one ).toString ())).isEqualTo ((int ) one );
415
415
assertThat (cache .get (one )).isNull ();
416
416
417
- assertThat (( int ) Integer .valueOf (service .conditionalUpdate (three ).toString ())).isEqualTo ((int ) three );
418
- assertThat (( int ) Integer .valueOf (cache .get (three ).get ().toString ())).isEqualTo ((int ) three );
417
+ assertThat (Integer .parseInt (service .conditionalUpdate (three ).toString ())).isEqualTo ((int ) three );
418
+ assertThat (Integer .parseInt (cache .get (three ).get ().toString ())).isEqualTo ((int ) three );
419
419
}
420
420
421
421
protected void testMultiCache (CacheableService <?> service ) {
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ void enableIndentingSunnyDay() throws Exception {
55
55
void enableIndentingSunnyDayWithCustomKosherIndentAmount () throws Exception {
56
56
final String indentAmountProperty = "10" ;
57
57
Transformer transformer = new StubTransformer ();
58
- TransformerUtils .enableIndenting (transformer , Integer .valueOf (indentAmountProperty ));
58
+ TransformerUtils .enableIndenting (transformer , Integer .parseInt (indentAmountProperty ));
59
59
String indent = transformer .getOutputProperty (OutputKeys .INDENT );
60
60
assertThat (indent ).isNotNull ();
61
61
assertThat (indent ).isEqualTo ("yes" );
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ public class SockJsUrlInfoTests {
34
34
@ Test
35
35
public void serverId () throws Exception {
36
36
SockJsUrlInfo info = new SockJsUrlInfo (new URI ("https://example.com" ));
37
- int serverId = Integer .valueOf (info .getServerId ());
37
+ int serverId = Integer .parseInt (info .getServerId ());
38
38
assertThat (serverId >= 0 && serverId < 1000 ).as ("Invalid serverId: " + serverId ).isTrue ();
39
39
}
40
40
You can’t perform that action at this time.
0 commit comments