logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1431441 - in /logging/log4j/log4j2/trunk: api/src/main/java/org/apache/logging/log4j/message/ api/src/main/java/org/apache/logging/log4j/spi/ core/src/main/java/org/apache/logging/log4j/core/helpers/ core/src/main/java/org/apache/logging/l...
Date Thu, 10 Jan 2013 15:42:53 GMT
Author: ggregory
Date: Thu Jan 10 15:42:52 2013
New Revision: 1431441

URL: http://svn.apache.org/viewvc?rev=1431441&view=rev
Log:
Add final modifier to private fields.

Modified:
    logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/FormattedMessage.java
    logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/DefaultThreadContextMap.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/CyclicBuffer.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/RFC5424Layout.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/SMTPManager.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/dumbster/smtp/SimpleSmtpServer.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/dumbster/smtp/SmtpActionType.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/dumbster/smtp/SmtpMessage.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/dumbster/smtp/SmtpRequest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/dumbster/smtp/SmtpResponse.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/dumbster/smtp/SmtpState.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/test/appender/FailOnceAppender.java

Modified: logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/FormattedMessage.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/FormattedMessage.java?rev=1431441&r1=1431440&r2=1431441&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/FormattedMessage.java
(original)
+++ logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/FormattedMessage.java
Thu Jan 10 15:42:52 2013
@@ -44,7 +44,7 @@ public class FormattedMessage implements
     private transient Object[] argArray;
     private String[] stringArgs;
     private transient String formattedMessage;
-    private Throwable throwable;
+    private final Throwable throwable;
 
     private Message message;
 

Modified: logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/DefaultThreadContextMap.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/DefaultThreadContextMap.java?rev=1431441&r1=1431440&r2=1431441&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/DefaultThreadContextMap.java
(original)
+++ logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/DefaultThreadContextMap.java
Thu Jan 10 15:42:52 2013
@@ -24,9 +24,9 @@ import java.util.Map;
  */
 public class DefaultThreadContextMap implements ThreadContextMap {
 
-    private boolean useMap;
+    private final boolean useMap;
 
-    private ThreadLocal<Map<String, String>> localMap =
+    private final ThreadLocal<Map<String, String>> localMap =
         new InheritableThreadLocal<Map<String, String>>() {
             @Override
             protected Map<String, String> childValue(final Map<String, String>
parentValue) {

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/CyclicBuffer.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/CyclicBuffer.java?rev=1431441&r1=1431440&r2=1431441&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/CyclicBuffer.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/CyclicBuffer.java
Thu Jan 10 15:42:52 2013
@@ -23,7 +23,7 @@ import java.lang.reflect.Array;
  * size of the buffer the oldest element will be overwritten. Access to the buffer is thread
safe.
  */
 public class CyclicBuffer<T> {
-    private T[] ring;
+    private final T[] ring;
     private int first = 0;
     private int last = 0;
     private int numElems = 0;

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/RFC5424Layout.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/RFC5424Layout.java?rev=1431441&r1=1431440&r2=1431441&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/RFC5424Layout.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/RFC5424Layout.java
Thu Jan 10 15:42:52 2013
@@ -93,7 +93,7 @@ public final class RFC5424Layout extends
     private static final String COMPONENT_KEY = "RFC5424-Converter";
     private static final String DEFAULT_CONVERSION_PATTERN = "%xEx";
 
-    private List<PatternFormatter> formatters;
+    private final List<PatternFormatter> formatters;
 
     private RFC5424Layout(final Configuration config, final Facility facility, final String
id, final int ein,
                           final boolean includeMDC, final boolean includeNL, final String
escapeNL, final String mdcId,

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/SMTPManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/SMTPManager.java?rev=1431441&r1=1431440&r2=1431441&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/SMTPManager.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/SMTPManager.java
Thu Jan 10 15:42:52 2013
@@ -51,7 +51,7 @@ public class SMTPManager extends Abstrac
 
     private final Session session;
 
-    private CyclicBuffer<LogEvent> buffer;
+    private final CyclicBuffer<LogEvent> buffer;
 
     private volatile MimeMessage message;
 

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/dumbster/smtp/SimpleSmtpServer.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/dumbster/smtp/SimpleSmtpServer.java?rev=1431441&r1=1431440&r2=1431441&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/dumbster/smtp/SimpleSmtpServer.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/dumbster/smtp/SimpleSmtpServer.java
Thu Jan 10 15:42:52 2013
@@ -35,7 +35,7 @@ public class SimpleSmtpServer implements
     /**
      * Stores all of the email received since this instance started up.
      */
-    private List receivedMail;
+    private final List receivedMail;
 
     /**
      * Default SMTP port is 25.

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/dumbster/smtp/SmtpActionType.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/dumbster/smtp/SmtpActionType.java?rev=1431441&r1=1431440&r2=1431441&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/dumbster/smtp/SmtpActionType.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/dumbster/smtp/SmtpActionType.java
Thu Jan 10 15:42:52 2013
@@ -23,7 +23,7 @@ public class SmtpActionType {
     /**
      * Internal value for the action type.
      */
-    private byte value;
+    private final byte value;
 
     /**
      * Internal representation of the CONNECT action.

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/dumbster/smtp/SmtpMessage.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/dumbster/smtp/SmtpMessage.java?rev=1431441&r1=1431440&r2=1431441&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/dumbster/smtp/SmtpMessage.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/dumbster/smtp/SmtpMessage.java
Thu Jan 10 15:42:52 2013
@@ -30,11 +30,11 @@ public class SmtpMessage {
     /**
      * Headers: Map of List of String hashed on header name.
      */
-    private Map headers;
+    private final Map headers;
     /**
      * Message body.
      */
-    private StringBuffer body;
+    private final StringBuffer body;
 
     /**
      * Constructor. Initializes headers Map and body buffer.

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/dumbster/smtp/SmtpRequest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/dumbster/smtp/SmtpRequest.java?rev=1431441&r1=1431440&r2=1431441&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/dumbster/smtp/SmtpRequest.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/dumbster/smtp/SmtpRequest.java
Thu Jan 10 15:42:52 2013
@@ -45,15 +45,15 @@ public class SmtpRequest {
     /**
      * SMTP action received from client.
      */
-    private SmtpActionType action;
+    private final SmtpActionType action;
     /**
      * Current state of the SMTP state table.
      */
-    private SmtpState state;
+    private final SmtpState state;
     /**
      * Additional information passed from the client with the SMTP action.
      */
-    private String params;
+    private final String params;
 
     /**
      * Create a new SMTP client request.

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/dumbster/smtp/SmtpResponse.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/dumbster/smtp/SmtpResponse.java?rev=1431441&r1=1431440&r2=1431441&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/dumbster/smtp/SmtpResponse.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/dumbster/smtp/SmtpResponse.java
Thu Jan 10 15:42:52 2013
@@ -23,15 +23,15 @@ public class SmtpResponse {
     /**
      * Response code - see RFC-2821.
      */
-    private int code;
+    private final int code;
     /**
      * Response message.
      */
-    private String message;
+    private final String message;
     /**
      * New state of the SMTP server once the request has been executed.
      */
-    private SmtpState nextState;
+    private final SmtpState nextState;
 
     /**
      * Constructor.

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/dumbster/smtp/SmtpState.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/dumbster/smtp/SmtpState.java?rev=1431441&r1=1431440&r2=1431441&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/dumbster/smtp/SmtpState.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/dumbster/smtp/SmtpState.java
Thu Jan 10 15:42:52 2013
@@ -23,7 +23,7 @@ public class SmtpState {
     /**
      * Internal representation of the state.
      */
-    private byte value;
+    private final byte value;
 
     /**
      * Internal representation of the CONNECT state.

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/test/appender/FailOnceAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/test/appender/FailOnceAppender.java?rev=1431441&r1=1431440&r2=1431441&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/test/appender/FailOnceAppender.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/test/appender/FailOnceAppender.java
Thu Jan 10 15:42:52 2013
@@ -34,7 +34,7 @@ public class FailOnceAppender extends Ab
 
     boolean fail = true;
 
-    private List<LogEvent> events = new ArrayList<LogEvent>();
+    private final List<LogEvent> events = new ArrayList<LogEvent>();
 
     private FailOnceAppender(final String name) {
         super(name, null, null, false);



Mime
View raw message