Sonar - protected fields

This commit is contained in:
Gary Russell
2019-05-01 16:18:58 -04:00
committed by Artem Bilan
parent 37e49a23f4
commit 0d6faa2e34
58 changed files with 278 additions and 261 deletions

View File

@@ -38,7 +38,7 @@ public class RFC5424SyslogParser {
protected static final char SPACE = ' ';
protected final boolean retainOriginal;
protected final boolean retainOriginal; // NOSONAR final
/**
@@ -161,7 +161,7 @@ public class RFC5424SyslogParser {
}
if (!Character.isDigit(c)) {
throw new IllegalStateException("Year expected @" + r.idx);
throw new IllegalStateException("Year expected @" + r.getIndex());
}
StringBuilder dateBuilder = new StringBuilder();
@@ -209,6 +209,10 @@ public class RFC5424SyslogParser {
this.line = l;
}
public int getIndex() {
return this.idx;
}
public void mark() {
this.mark = this.idx;
}

View File

@@ -16,9 +16,6 @@
package org.springframework.integration.syslog.inbound;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.integration.endpoint.MessageProducerSupport;
import org.springframework.integration.syslog.DefaultMessageConverter;
import org.springframework.integration.syslog.MessageConverter;
@@ -39,11 +36,9 @@ public abstract class SyslogReceivingChannelAdapterSupport extends MessageProduc
private volatile int port = DEFAULT_PORT;
protected final Log logger = LogFactory.getLog(this.getClass());
private MessageConverter converter = new DefaultMessageConverter();
private volatile MessageConverter converter = new DefaultMessageConverter();
private volatile boolean converterSet;
private boolean converterSet;
/**
* @return The port on which this adapter listens.