Skip to content

Commit 0d6faa2

Browse files
garyrussellartembilan
authored andcommitted
Sonar - protected fields
1 parent 37e49a2 commit 0d6faa2

File tree

58 files changed

+254
-237
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+254
-237
lines changed

spring-integration-amqp/src/main/java/org/springframework/integration/amqp/dsl/AmqpBaseOutboundEndpointSpec.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
AmqpBaseOutboundEndpointSpec<S extends AmqpBaseOutboundEndpointSpec<S, E>, E extends AbstractAmqpOutboundEndpoint>
4545
extends MessageHandlerSpec<S, E> {
4646

47-
protected final DefaultAmqpHeaderMapper headerMapper = DefaultAmqpHeaderMapper.outboundMapper();
47+
protected final DefaultAmqpHeaderMapper headerMapper = DefaultAmqpHeaderMapper.outboundMapper(); // NOSONAR final
4848

4949
/**
5050
* Set a custom {@link AmqpHeaderMapper} for mapping request and reply headers.

spring-integration-amqp/src/main/java/org/springframework/integration/amqp/dsl/AmqpInboundChannelAdapterSpec.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public abstract class AmqpInboundChannelAdapterSpec
4040
extends AmqpBaseInboundChannelAdapterSpec<S>
4141
implements ComponentsRegistration {
4242

43-
protected final AbstractMessageListenerContainerSpec<?, C> listenerContainerSpec;
43+
protected final AbstractMessageListenerContainerSpec<?, C> listenerContainerSpec; // NOSONAR final
4444

4545
AmqpInboundChannelAdapterSpec(AbstractMessageListenerContainerSpec<?, C> listenerContainerSpec) {
4646
super(new AmqpInboundChannelAdapter(listenerContainerSpec.get()));

spring-integration-amqp/src/main/java/org/springframework/integration/amqp/dsl/AmqpInboundGatewaySpec.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public abstract class AmqpInboundGatewaySpec
4040
extends AmqpBaseInboundGatewaySpec<S>
4141
implements ComponentsRegistration {
4242

43-
protected final AbstractMessageListenerContainerSpec<?, C> listenerContainerSpec;
43+
protected final AbstractMessageListenerContainerSpec<?, C> listenerContainerSpec; // NOSONAR final
4444

4545
AmqpInboundGatewaySpec(AbstractMessageListenerContainerSpec<?, C> listenerContainerSpec) {
4646
super(new AmqpInboundGateway(listenerContainerSpec.get()));

spring-integration-amqp/src/main/java/org/springframework/integration/amqp/dsl/AmqpPollableMessageChannelSpec.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
public class AmqpPollableMessageChannelSpec<S extends AmqpPollableMessageChannelSpec<S>>
4343
extends MessageChannelSpec<S, AbstractAmqpChannel> {
4444

45-
protected final AmqpChannelFactoryBean amqpChannelFactoryBean;
45+
protected final AmqpChannelFactoryBean amqpChannelFactoryBean; // NOSONAR final
4646

4747
AmqpPollableMessageChannelSpec(ConnectionFactory connectionFactory) {
4848
this(new AmqpChannelFactoryBean(false), connectionFactory);

spring-integration-core/src/main/java/org/springframework/integration/channel/QueueChannel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public class QueueChannel extends AbstractPollableChannel implements QueueChanne
4747

4848
private final Queue<Message<?>> queue;
4949

50-
protected final Semaphore queueSemaphore = new Semaphore(0);
50+
protected final Semaphore queueSemaphore = new Semaphore(0); // NOSONAR final
5151

5252
/**
5353
* Create a channel with the specified queue.

spring-integration-core/src/main/java/org/springframework/integration/codec/kryo/AbstractKryoCodec.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
*/
4040
public abstract class AbstractKryoCodec implements Codec {
4141

42-
protected final KryoPool pool;
42+
protected final KryoPool pool; // NOSONAR final
4343

4444
protected AbstractKryoCodec() {
4545
KryoFactory factory = () -> {
@@ -53,7 +53,7 @@ protected AbstractKryoCodec() {
5353
}
5454

5555
@Override
56-
public void encode(final Object object, OutputStream outputStream) throws IOException {
56+
public void encode(final Object object, OutputStream outputStream) {
5757
Assert.notNull(object, "cannot encode a null object");
5858
Assert.notNull(outputStream, "'outputSteam' cannot be null");
5959
final Output output = (outputStream instanceof Output ? (Output) outputStream : new Output(outputStream));
@@ -77,7 +77,7 @@ public <T> T decode(byte[] bytes, Class<T> type) throws IOException {
7777
}
7878

7979
@Override
80-
public <T> T decode(InputStream inputStream, final Class<T> type) throws IOException {
80+
public <T> T decode(InputStream inputStream, final Class<T> type) {
8181
Assert.notNull(inputStream, "'inputStream' cannot be null");
8282
Assert.notNull(type, "'type' cannot be null");
8383
final Input input = (inputStream instanceof Input ? (Input) inputStream : new Input(inputStream));

spring-integration-core/src/main/java/org/springframework/integration/config/xml/AbstractIntegrationNamespaceHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public abstract class AbstractIntegrationNamespaceHandler implements NamespaceHa
4646

4747
private static final String VERSION = "5.2";
4848

49-
protected final Log logger = LogFactory.getLog(this.getClass());
49+
protected final Log logger = LogFactory.getLog(this.getClass()); // NOSONAR final
5050

5151
private final NamespaceHandlerDelegate delegate = new NamespaceHandlerDelegate();
5252

spring-integration-core/src/main/java/org/springframework/integration/core/ErrorMessagePublisher.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@
5050
*/
5151
public class ErrorMessagePublisher implements BeanFactoryAware {
5252

53-
protected final Log logger = LogFactory.getLog(getClass());
53+
protected final Log logger = LogFactory.getLog(getClass()); // NOSONAR final
5454

55-
protected final MessagingTemplate messagingTemplate = new MessagingTemplate();
55+
protected final MessagingTemplate messagingTemplate = new MessagingTemplate(); // NOSONAR final
5656

5757
private DestinationResolver<MessageChannel> channelResolver;
5858

spring-integration-core/src/main/java/org/springframework/integration/dispatcher/AbstractDispatcher.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
*/
4444
public abstract class AbstractDispatcher implements MessageDispatcher {
4545

46-
protected final Log logger = LogFactory.getLog(this.getClass());
46+
protected final Log logger = LogFactory.getLog(getClass()); // NOSONAR final
4747

4848
private volatile int maxSubscribers = Integer.MAX_VALUE;
4949

spring-integration-core/src/main/java/org/springframework/integration/dispatcher/RoundRobinLoadBalancingStrategy.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ private Iterator<MessageHandler> buildHandlerIterator(int size, final MessageHan
6565

6666
return new Iterator<MessageHandler>() {
6767

68-
int currentIndex = 0;
68+
private int currentIndex = 0;
6969

7070
public boolean hasNext() {
7171
return this.currentIndex < reorderedHandlers.length;

0 commit comments

Comments
 (0)