@@ -82,17 +82,17 @@ void asyncMethods() throws Exception {
82
82
CompletableFuture <String > completableFuture = asyncTest .returnSomethingCompletable (20 );
83
83
assertThat (completableFuture .get ()).isEqualTo ("20" );
84
84
85
- assertThatExceptionOfType (ExecutionException .class ). isThrownBy (() ->
86
- asyncTest .returnSomething (0 ).get ())
87
- .withCauseInstanceOf (IllegalArgumentException .class );
85
+ assertThatExceptionOfType (ExecutionException .class )
86
+ . isThrownBy (() -> asyncTest .returnSomething (0 ).get ())
87
+ .withCauseInstanceOf (IllegalArgumentException .class );
88
88
89
- assertThatExceptionOfType (ExecutionException .class ). isThrownBy (() ->
90
- asyncTest .returnSomething (-1 ).get ())
91
- .withCauseInstanceOf (IOException .class );
89
+ assertThatExceptionOfType (ExecutionException .class )
90
+ . isThrownBy (() -> asyncTest .returnSomething (-1 ).get ())
91
+ .withCauseInstanceOf (IOException .class );
92
92
93
- assertThatExceptionOfType (ExecutionException .class ). isThrownBy (() ->
94
- asyncTest .returnSomethingCompletable (0 ).get ())
95
- .withCauseInstanceOf (IllegalArgumentException .class );
93
+ assertThatExceptionOfType (ExecutionException .class )
94
+ . isThrownBy (() -> asyncTest .returnSomethingCompletable (0 ).get ())
95
+ .withCauseInstanceOf (IllegalArgumentException .class );
96
96
}
97
97
98
98
@ Test
@@ -165,13 +165,13 @@ void asyncClass() throws Exception {
165
165
CompletableFuture <String > completableFuture = asyncTest .returnSomethingCompletable (20 );
166
166
assertThat (completableFuture .get ()).isEqualTo ("20" );
167
167
168
- assertThatExceptionOfType (ExecutionException .class ). isThrownBy (() ->
169
- asyncTest .returnSomething (0 ).get ())
170
- .withCauseInstanceOf (IllegalArgumentException .class );
168
+ assertThatExceptionOfType (ExecutionException .class )
169
+ . isThrownBy (() -> asyncTest .returnSomething (0 ).get ())
170
+ .withCauseInstanceOf (IllegalArgumentException .class );
171
171
172
- assertThatExceptionOfType (ExecutionException .class ). isThrownBy (() ->
173
- asyncTest .returnSomethingCompletable (0 ).get ())
174
- .withCauseInstanceOf (IllegalArgumentException .class );
172
+ assertThatExceptionOfType (ExecutionException .class )
173
+ . isThrownBy (() -> asyncTest .returnSomethingCompletable (0 ).get ())
174
+ .withCauseInstanceOf (IllegalArgumentException .class );
175
175
}
176
176
177
177
@ Test
@@ -390,6 +390,7 @@ public void doSomething(int i) {
390
390
}
391
391
392
392
@ Async
393
+ @ SuppressWarnings ("deprecation" )
393
394
public Future <String > returnSomething (int i ) {
394
395
assertThat (Thread .currentThread ().getName ()).isNotEqualTo (originalThreadName );
395
396
if (i == 0 ) {
@@ -435,12 +436,14 @@ public void doSomething(int i) {
435
436
}
436
437
437
438
@ MyAsync
439
+ @ SuppressWarnings ("deprecation" )
438
440
public Future <String > returnSomething (int i ) {
439
441
assertThat (Thread .currentThread ().getName ()).isNotEqualTo (originalThreadName );
440
442
assertThat (Thread .currentThread ().getName ()).startsWith ("e2-" );
441
443
return new AsyncResult <>(Integer .toString (i ));
442
444
}
443
445
446
+ @ SuppressWarnings ("deprecation" )
444
447
public Future <String > returnSomething2 (int i ) {
445
448
assertThat (Thread .currentThread ().getName ()).isNotEqualTo (originalThreadName );
446
449
assertThat (Thread .currentThread ().getName ()).startsWith ("e0-" );
@@ -467,6 +470,7 @@ public void doSomething(int i) {
467
470
assertThat (Thread .currentThread ().getName ()).isNotEqualTo (originalThreadName );
468
471
}
469
472
473
+ @ SuppressWarnings ("deprecation" )
470
474
public Future <String > returnSomething (int i ) {
471
475
assertThat (Thread .currentThread ().getName ()).isNotEqualTo (originalThreadName );
472
476
if (i == 0 ) {
@@ -507,6 +511,7 @@ public void doSomething(int i) {
507
511
}
508
512
509
513
@ Override
514
+ @ SuppressWarnings ("deprecation" )
510
515
public Future <String > returnSomething (int i ) {
511
516
assertThat (Thread .currentThread ().getName ()).isNotEqualTo (originalThreadName );
512
517
return new AsyncResult <>(Integer .toString (i ));
@@ -531,6 +536,7 @@ public void doSomething(int i) {
531
536
}
532
537
533
538
@ Override
539
+ @ SuppressWarnings ("deprecation" )
534
540
public Future <String > returnSomething (int i ) {
535
541
assertThat (Thread .currentThread ().getName ()).isNotEqualTo (originalThreadName );
536
542
return new AsyncResult <>(Integer .toString (i ));
@@ -542,6 +548,7 @@ public static class DynamicAsyncInterfaceBean implements FactoryBean<AsyncInterf
542
548
543
549
private final AsyncInterface proxy ;
544
550
551
+ @ SuppressWarnings ("deprecation" )
545
552
public DynamicAsyncInterfaceBean () {
546
553
ProxyFactory pf = new ProxyFactory (new HashMap <>());
547
554
DefaultIntroductionAdvisor advisor = new DefaultIntroductionAdvisor ((MethodInterceptor ) invocation -> {
@@ -598,6 +605,7 @@ public void doSomething(int i) {
598
605
}
599
606
600
607
@ Override
608
+ @ SuppressWarnings ("deprecation" )
601
609
public Future <String > returnSomething (int i ) {
602
610
assertThat (Thread .currentThread ().getName ()).isNotEqualTo (originalThreadName );
603
611
return new AsyncResult <>(Integer .toString (i ));
@@ -609,6 +617,7 @@ public static class DynamicAsyncMethodsInterfaceBean implements FactoryBean<Asyn
609
617
610
618
private final AsyncMethodsInterface proxy ;
611
619
620
+ @ SuppressWarnings ("deprecation" )
612
621
public DynamicAsyncMethodsInterfaceBean () {
613
622
ProxyFactory pf = new ProxyFactory (new HashMap <>());
614
623
DefaultIntroductionAdvisor advisor = new DefaultIntroductionAdvisor ((MethodInterceptor ) invocation -> {
0 commit comments