@@ -445,27 +445,23 @@ public void messageConvertersDefaultsOff() {
445
445
}
446
446
447
447
448
- private void testChannel (String channelName , List < Class <? extends MessageHandler >> subscriberTypes ,
449
- int interceptorCount ) {
448
+ private void testChannel (
449
+ String channelName , List < Class <? extends MessageHandler >> subscriberTypes , int interceptorCount ) {
450
450
451
451
AbstractSubscribableChannel channel = this .appContext .getBean (channelName , AbstractSubscribableChannel .class );
452
-
453
452
for (Class <? extends MessageHandler > subscriberType : subscriberTypes ) {
454
453
MessageHandler subscriber = this .appContext .getBean (subscriberType );
455
454
assertNotNull ("No subscription for " + subscriberType , subscriber );
456
455
assertTrue (channel .hasSubscription (subscriber ));
457
456
}
458
-
459
457
List <ChannelInterceptor > interceptors = channel .getInterceptors ();
460
458
assertEquals (interceptorCount , interceptors .size ());
461
459
assertEquals (ImmutableMessageChannelInterceptor .class , interceptors .get (interceptors .size ()-1 ).getClass ());
462
460
}
463
461
464
462
private void testExecutor (String channelName , int corePoolSize , int maxPoolSize , int keepAliveSeconds ) {
465
-
466
463
ThreadPoolTaskExecutor taskExecutor =
467
464
this .appContext .getBean (channelName + "Executor" , ThreadPoolTaskExecutor .class );
468
-
469
465
assertEquals (corePoolSize , taskExecutor .getCorePoolSize ());
470
466
assertEquals (maxPoolSize , taskExecutor .getMaxPoolSize ());
471
467
assertEquals (keepAliveSeconds , taskExecutor .getKeepAliveSeconds ());
@@ -483,6 +479,7 @@ private WebSocketHandler unwrapWebSocketHandler(WebSocketHandler handler) {
483
479
return (handler instanceof WebSocketHandlerDecorator ) ?
484
480
((WebSocketHandlerDecorator ) handler ).getLastHandler () : handler ;
485
481
}
482
+
486
483
}
487
484
488
485
@@ -509,7 +506,6 @@ public boolean supportsReturnType(MethodParameter returnType) {
509
506
510
507
@ Override
511
508
public void handleReturnValue (Object returnValue , MethodParameter returnType , Message <?> message ) throws Exception {
512
-
513
509
}
514
510
}
515
511
@@ -540,12 +536,15 @@ public void afterConnectionEstablished(WebSocketSession session) throws Exceptio
540
536
class TestStompErrorHandler extends StompSubProtocolErrorHandler {
541
537
}
542
538
539
+
543
540
class TestValidator implements Validator {
541
+
544
542
@ Override
545
543
public boolean supports (Class <?> clazz ) {
546
544
return false ;
547
545
}
548
546
549
547
@ Override
550
- public void validate (@ Nullable Object target , Errors errors ) { }
548
+ public void validate (@ Nullable Object target , Errors errors ) {
549
+ }
551
550
}
0 commit comments