Sonar fixes

- remaining hidden fields

* Fix copyright
This commit is contained in:
Gary Russell
2019-01-09 13:30:08 -05:00
committed by Artem Bilan
parent e30741f7eb
commit 2766707547
28 changed files with 280 additions and 272 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -47,7 +47,7 @@ public class SyslogReceivingChannelAdapterFactoryBean extends AbstractFactoryBea
udp, tcp
}
private volatile SyslogReceivingChannelAdapterSupport adapter;
private volatile SyslogReceivingChannelAdapterSupport syslogAdapter;
private final Protocol protocol;
@@ -127,22 +127,22 @@ public class SyslogReceivingChannelAdapterFactoryBean extends AbstractFactoryBea
@Override
public void start() {
if (this.adapter != null) {
this.adapter.start();
if (this.syslogAdapter != null) {
this.syslogAdapter.start();
}
}
@Override
public void stop() {
if (this.adapter != null) {
this.adapter.stop();
if (this.syslogAdapter != null) {
this.syslogAdapter.stop();
}
}
@Override
public boolean isRunning() {
if (this.adapter != null) {
return this.adapter.isRunning();
if (this.syslogAdapter != null) {
return this.syslogAdapter.isRunning();
}
return false;
}
@@ -164,8 +164,8 @@ public class SyslogReceivingChannelAdapterFactoryBean extends AbstractFactoryBea
@Override
public void stop(Runnable callback) {
if (this.adapter != null) {
this.adapter.stop(callback);
if (this.syslogAdapter != null) {
this.syslogAdapter.stop(callback);
}
else {
callback.run();
@@ -174,9 +174,9 @@ public class SyslogReceivingChannelAdapterFactoryBean extends AbstractFactoryBea
@Override
public Class<?> getObjectType() {
return this.adapter == null
return this.syslogAdapter == null
? SyslogReceivingChannelAdapterSupport.class
: this.adapter.getClass();
: this.syslogAdapter.getClass();
}
@Override
@@ -230,8 +230,8 @@ public class SyslogReceivingChannelAdapterFactoryBean extends AbstractFactoryBea
adapter.setBeanFactory(beanFactory);
}
adapter.afterPropertiesSet();
this.adapter = adapter;
return this.adapter;
this.syslogAdapter = adapter;
return this.syslogAdapter;
}
}

View File

@@ -73,7 +73,7 @@ public class SyslogReceivingChannelAdapterTests {
factory.setBeanFactory(mock(BeanFactory.class));
factory.afterPropertiesSet();
factory.start();
UnicastReceivingChannelAdapter server = TestUtils.getPropertyValue(factory, "adapter.udpAdapter",
UnicastReceivingChannelAdapter server = TestUtils.getPropertyValue(factory, "syslogAdapter.udpAdapter",
UnicastReceivingChannelAdapter.class);
TestingUtilities.waitListening(server, null);
UdpSyslogReceivingChannelAdapter adapter = (UdpSyslogReceivingChannelAdapter) factory.getObject();
@@ -106,7 +106,7 @@ public class SyslogReceivingChannelAdapterTests {
factory.setBeanFactory(mock(BeanFactory.class));
factory.afterPropertiesSet();
factory.start();
AbstractServerConnectionFactory server = TestUtils.getPropertyValue(factory, "adapter.connectionFactory",
AbstractServerConnectionFactory server = TestUtils.getPropertyValue(factory, "syslogAdapter.connectionFactory",
AbstractServerConnectionFactory.class);
TestingUtilities.waitListening(server, null);
TcpSyslogReceivingChannelAdapter adapter = (TcpSyslogReceivingChannelAdapter) factory.getObject();
@@ -144,7 +144,7 @@ public class SyslogReceivingChannelAdapterTests {
factory.setBeanFactory(mock(BeanFactory.class));
factory.afterPropertiesSet();
factory.start();
UnicastReceivingChannelAdapter server = TestUtils.getPropertyValue(factory, "adapter.udpAdapter",
UnicastReceivingChannelAdapter server = TestUtils.getPropertyValue(factory, "syslogAdapter.udpAdapter",
UnicastReceivingChannelAdapter.class);
TestingUtilities.waitListening(server, null);
UdpSyslogReceivingChannelAdapter adapter = (UdpSyslogReceivingChannelAdapter) factory.getObject();
@@ -227,7 +227,7 @@ public class SyslogReceivingChannelAdapterTests {
factory.setConverter(new RFC5424MessageConverter());
factory.afterPropertiesSet();
factory.start();
UnicastReceivingChannelAdapter server = TestUtils.getPropertyValue(factory, "adapter.udpAdapter",
UnicastReceivingChannelAdapter server = TestUtils.getPropertyValue(factory, "syslogAdapter.udpAdapter",
UnicastReceivingChannelAdapter.class);
TestingUtilities.waitListening(server, null);
UdpSyslogReceivingChannelAdapter adapter = (UdpSyslogReceivingChannelAdapter) factory.getObject();