logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1580758 - in /logging/log4j/log4j2/trunk: log4j-api/src/test/java/org/apache/logging/log4j/spi/ log4j-core/src/main/java/org/apache/logging/log4j/core/config/ log4j-core/src/main/java/org/apache/logging/log4j/core/net/ log4j-core/src/main/...
Date Mon, 24 Mar 2014 05:52:51 GMT
Author: ggregory
Date: Mon Mar 24 05:52:51 2014
New Revision: 1580758

URL: http://svn.apache.org/r1580758
Log:
Add final modifier to private fields.

Modified:
    logging/log4j/log4j2/trunk/log4j-api/src/test/java/org/apache/logging/log4j/spi/LoggerStreamTest.java
    logging/log4j/log4j2/trunk/log4j-api/src/test/java/org/apache/logging/log4j/spi/LoggerWriterTest.java
    logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/AbstractConfiguration.java
    logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/net/TLSSocketManager.java
    logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/KeyStoreConfiguration.java
    logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/SSLConfiguration.java
    logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/TrustStoreConfiguration.java
    logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/async/perftest/PerfTestDriver.java
    logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/mock/MockSyslogServer.java
    logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/mock/MockTLSSyslogServer.java
    logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/LegacyBSDTLSSyslogInputStreamReader.java
    logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/TLSSyslogInputStreamReader.java
    logging/log4j/log4j2/trunk/log4j-flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumeEmbeddedManager.java
    logging/log4j/log4j2/trunk/log4j-flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumePersistentManager.java
    logging/log4j/log4j2/trunk/log4j-jmx-gui/src/main/java/org/apache/logging/log4j/jmx/gui/ClientGUI.java

Modified: logging/log4j/log4j2/trunk/log4j-api/src/test/java/org/apache/logging/log4j/spi/LoggerStreamTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-api/src/test/java/org/apache/logging/log4j/spi/LoggerStreamTest.java?rev=1580758&r1=1580757&r2=1580758&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-api/src/test/java/org/apache/logging/log4j/spi/LoggerStreamTest.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-api/src/test/java/org/apache/logging/log4j/spi/LoggerStreamTest.java
Mon Mar 24 05:52:51 2014
@@ -36,8 +36,8 @@ import static org.junit.Assert.*;
 public class LoggerStreamTest {
     private List<String> results;
     private LoggerStream stream;
-    private Level level;
-    private String logMessage;
+    private final Level level;
+    private final String logMessage;
 
     @Parameterized.Parameters
     public static Collection<Object[]> data() {

Modified: logging/log4j/log4j2/trunk/log4j-api/src/test/java/org/apache/logging/log4j/spi/LoggerWriterTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-api/src/test/java/org/apache/logging/log4j/spi/LoggerWriterTest.java?rev=1580758&r1=1580757&r2=1580758&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-api/src/test/java/org/apache/logging/log4j/spi/LoggerWriterTest.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-api/src/test/java/org/apache/logging/log4j/spi/LoggerWriterTest.java
Mon Mar 24 05:52:51 2014
@@ -37,8 +37,8 @@ import static org.junit.Assert.*;
 public class LoggerWriterTest {
     private List<String> results;
     private LoggerWriter writer;
-    private Level level;
-    private String logMessage;
+    private final Level level;
+    private final String logMessage;
 
     @Parameterized.Parameters
     public static Collection<Object[]> data() {

Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/AbstractConfiguration.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/AbstractConfiguration.java?rev=1580758&r1=1580757&r2=1580758&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/AbstractConfiguration.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/AbstractConfiguration.java
Mon Mar 24 05:52:51 2014
@@ -117,7 +117,7 @@ public abstract class AbstractConfigurat
 
     private ConcurrentMap<String, LoggerConfig> loggers = new ConcurrentHashMap<String,
LoggerConfig>();
 
-    private ConcurrentMap<String, String> properties = new ConcurrentHashMap<String,
String>();
+    private final ConcurrentMap<String, String> properties = new ConcurrentHashMap<String,
String>();
 
     private final StrLookup tempLookup = new Interpolator(properties);
 

Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/net/TLSSocketManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/net/TLSSocketManager.java?rev=1580758&r1=1580757&r2=1580758&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/net/TLSSocketManager.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/net/TLSSocketManager.java
Mon Mar 24 05:52:51 2014
@@ -36,7 +36,7 @@ import java.net.UnknownHostException;
 public class TLSSocketManager extends TCPSocketManager {
     public static final int DEFAULT_PORT = 6514;
     private static final TLSSocketManagerFactory FACTORY = new TLSSocketManagerFactory();
-    private SSLConfiguration sslConfig;
+    private final SSLConfiguration sslConfig;
 
     /**
      *

Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/KeyStoreConfiguration.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/KeyStoreConfiguration.java?rev=1580758&r1=1580757&r2=1580758&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/KeyStoreConfiguration.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/KeyStoreConfiguration.java
Mon Mar 24 05:52:51 2014
@@ -33,7 +33,7 @@ import java.security.cert.CertificateExc
 @Plugin(name = "keyStore", category = "Core", printObject = true)
 public class KeyStoreConfiguration extends StoreConfiguration {
     private KeyStore keyStore;
-    private String keyStoreType;
+    private final String keyStoreType;
 
 
     public KeyStoreConfiguration(String location, String password) {

Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/SSLConfiguration.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/SSLConfiguration.java?rev=1580758&r1=1580757&r2=1580758&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/SSLConfiguration.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/SSLConfiguration.java
Mon Mar 24 05:52:51 2014
@@ -30,8 +30,8 @@ import java.security.*;
 @Plugin(name = "ssl", category = "Core", printObject = true)
 public class SSLConfiguration {
     private static final StatusLogger LOGGER = StatusLogger.getLogger();
-    private KeyStoreConfiguration keyStoreConfig;
-    private TrustStoreConfiguration trustStoreConfig;
+    private final KeyStoreConfiguration keyStoreConfig;
+    private final TrustStoreConfiguration trustStoreConfig;
     private SSLContext sslContext;
 
     private SSLConfiguration(KeyStoreConfiguration keyStoreConfig, TrustStoreConfiguration
trustStoreConfig) {

Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/TrustStoreConfiguration.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/TrustStoreConfiguration.java?rev=1580758&r1=1580757&r2=1580758&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/TrustStoreConfiguration.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/TrustStoreConfiguration.java
Mon Mar 24 05:52:51 2014
@@ -31,7 +31,7 @@ import java.security.cert.CertificateExc
 @Plugin(name = "trustStore", category = "Core", printObject = true)
 public class TrustStoreConfiguration extends StoreConfiguration {
     private KeyStore trustStore;
-    private String trustStoreType;
+    private final String trustStoreType;
 
     public TrustStoreConfiguration(String location, String password) {
         super(location, password);

Modified: logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/async/perftest/PerfTestDriver.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/async/perftest/PerfTestDriver.java?rev=1580758&r1=1580757&r2=1580758&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/async/perftest/PerfTestDriver.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/async/perftest/PerfTestDriver.java
Mon Mar 24 05:52:51 2014
@@ -152,7 +152,7 @@ public class PerfTestDriver {
         long _pct99_99;
         double _latencyRowCount;
         int _throughputRowCount;
-        private long _averageOpsPerSec;
+        private final long _averageOpsPerSec;
 
         // example line: avg=828 99%=1118 99.99%=5028 Count=3125
         public Stats(final String raw) {

Modified: logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/mock/MockSyslogServer.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/mock/MockSyslogServer.java?rev=1580758&r1=1580757&r2=1580758&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/mock/MockSyslogServer.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/mock/MockSyslogServer.java
Mon Mar 24 05:52:51 2014
@@ -22,7 +22,7 @@ import java.util.List;
 public class MockSyslogServer extends Thread {
     protected List<String> messageList;
     protected int port;
-    private int numberOfMessagesToReceive;
+    private final int numberOfMessagesToReceive;
 
     public MockSyslogServer(int numberOfMessagesToReceive, int port) {
         this.numberOfMessagesToReceive = numberOfMessagesToReceive;

Modified: logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/mock/MockTLSSyslogServer.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/mock/MockTLSSyslogServer.java?rev=1580758&r1=1580757&r2=1580758&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/mock/MockTLSSyslogServer.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/mock/MockTLSSyslogServer.java
Mon Mar 24 05:52:51 2014
@@ -29,13 +29,13 @@ import java.util.ArrayList;
 import java.util.List;
 
 public class MockTLSSyslogServer extends MockSyslogServer {
-    private SSLServerSocket serverSocket;
+    private final SSLServerSocket serverSocket;
     private SSLSocket clientSocket;
-    private List<String> messageList = new ArrayList<String>();
+    private final List<String> messageList = new ArrayList<String>();
     private TLSSyslogInputStreamReaderBase syslogReader;
 
     private TLSSyslogMessageFormat messageFormat = TLSSyslogMessageFormat.SYSLOG;
-    private int loopLen;
+    private final int loopLen;
 
     public MockTLSSyslogServer(int loopLen, TLSSyslogMessageFormat format, SSLServerSocket
serverSocket) {
         super(loopLen, serverSocket.getLocalPort());

Modified: logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/LegacyBSDTLSSyslogInputStreamReader.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/LegacyBSDTLSSyslogInputStreamReader.java?rev=1580758&r1=1580757&r2=1580758&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/LegacyBSDTLSSyslogInputStreamReader.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/LegacyBSDTLSSyslogInputStreamReader.java
Mon Mar 24 05:52:51 2014
@@ -22,7 +22,7 @@ import java.io.IOException;
 import java.io.InputStream;
 
 public class LegacyBSDTLSSyslogInputStreamReader extends TLSSyslogInputStreamReaderBase {
-    private ByteArrayOutputStream buffer;
+    private final ByteArrayOutputStream buffer;
 
     public LegacyBSDTLSSyslogInputStreamReader(InputStream inputStream) {
         super(inputStream, TLSSyslogMessageFormat.LEGACY_BSD);

Modified: logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/TLSSyslogInputStreamReader.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/TLSSyslogInputStreamReader.java?rev=1580758&r1=1580757&r2=1580758&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/TLSSyslogInputStreamReader.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/TLSSyslogInputStreamReader.java
Mon Mar 24 05:52:51 2014
@@ -25,11 +25,11 @@ import java.util.Arrays;
 public class TLSSyslogInputStreamReader extends TLSSyslogInputStreamReaderBase {
     private static final char SPACE = ' ';
 
-    private ByteArrayOutputStream messageBuffer;
-    private byte[] messagePartBuffer;
-    private byte[] lengthBuffer;
-    private int messagePartBufferSize = 8192;
-    private int lengthBufferSize = 8192;
+    private final ByteArrayOutputStream messageBuffer;
+    private final byte[] messagePartBuffer;
+    private final byte[] lengthBuffer;
+    private final int messagePartBufferSize = 8192;
+    private final int lengthBufferSize = 8192;
     private int position = 0;
     private int nextMessageLength = 0;
 

Modified: logging/log4j/log4j2/trunk/log4j-flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumeEmbeddedManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumeEmbeddedManager.java?rev=1580758&r1=1580757&r2=1580758&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumeEmbeddedManager.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumeEmbeddedManager.java
Mon Mar 24 05:52:51 2014
@@ -42,7 +42,7 @@ public class FlumeEmbeddedManager extend
 
     private static FlumeManagerFactory factory = new FlumeManagerFactory();
 
-    private EmbeddedAgent agent;
+    private final EmbeddedAgent agent;
 
     private final String shortName;
 

Modified: logging/log4j/log4j2/trunk/log4j-flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumePersistentManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumePersistentManager.java?rev=1580758&r1=1580757&r2=1580758&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumePersistentManager.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumePersistentManager.java
Mon Mar 24 05:52:51 2014
@@ -95,7 +95,7 @@ public class FlumePersistentManager exte
 
     private final ExecutorService threadPool;
 
-    private AtomicLong dbCount = new AtomicLong();
+    private final AtomicLong dbCount = new AtomicLong();
 
     /**
      * Constructor

Modified: logging/log4j/log4j2/trunk/log4j-jmx-gui/src/main/java/org/apache/logging/log4j/jmx/gui/ClientGUI.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-jmx-gui/src/main/java/org/apache/logging/log4j/jmx/gui/ClientGUI.java?rev=1580758&r1=1580757&r2=1580758&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-jmx-gui/src/main/java/org/apache/logging/log4j/jmx/gui/ClientGUI.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-jmx-gui/src/main/java/org/apache/logging/log4j/jmx/gui/ClientGUI.java
Mon Mar 24 05:52:51 2014
@@ -71,8 +71,8 @@ public class ClientGUI extends JPanel im
     private static final long serialVersionUID = -253621277232291174L;
     private static final int INITIAL_STRING_WRITER_SIZE = 1024;
     private final Client client;
-    private Map<ObjectName, Component> contextObjNameToTabbedPaneMap = new HashMap<ObjectName,
Component>();
-    private Map<ObjectName, JTextArea> statusLogTextAreaMap = new HashMap<ObjectName,
JTextArea>();
+    private final Map<ObjectName, Component> contextObjNameToTabbedPaneMap = new HashMap<ObjectName,
Component>();
+    private final Map<ObjectName, JTextArea> statusLogTextAreaMap = new HashMap<ObjectName,
JTextArea>();
     private JTabbedPane tabbedPaneContexts;
 
     public ClientGUI(final Client client) throws IOException, JMException {



Mime
View raw message