Fix new sonar smells

This commit is contained in:
Artem Bilan
2020-05-28 09:56:39 -04:00
parent b8e2dfe4e1
commit 5bd6278fcb
3 changed files with 20 additions and 23 deletions

View File

@@ -162,8 +162,9 @@ public class MockIntegrationContext implements BeanFactoryAware {
substituteMessageHandlerFor(consumerEndpointId, mockMessageHandler, true);
}
public void substituteMessageHandlerFor(String consumerEndpointId, MessageHandler mockMessageHandler,
boolean autoStartup) {
public void substituteMessageHandlerFor(String consumerEndpointId, // NOSONAR - complexity
MessageHandler mockMessageHandler, boolean autoStartup) {
Object endpoint = this.beanFactory.getBean(consumerEndpointId, IntegrationConsumer.class);
if (autoStartup && endpoint instanceof Lifecycle) {
((Lifecycle) endpoint).stop();