logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1433036 - /logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/AppenderControl.java
Date Mon, 14 Jan 2013 18:55:29 GMT
Author: ggregory
Date: Mon Jan 14 18:55:29 2013
New Revision: 1433036

URL: http://svn.apache.org/viewvc?rev=1433036&view=rev
Log:
Generics.

Modified:
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/AppenderControl.java

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/AppenderControl.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/AppenderControl.java?rev=1433036&r1=1433035&r2=1433036&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/AppenderControl.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/AppenderControl.java
Mon Jan 14 18:55:29 2013
@@ -16,6 +16,8 @@
  */
 package org.apache.logging.log4j.core.config;
 
+import java.io.Serializable;
+
 import org.apache.logging.log4j.Level;
 import org.apache.logging.log4j.core.Appender;
 import org.apache.logging.log4j.core.Filter;
@@ -26,12 +28,13 @@ import org.apache.logging.log4j.core.fil
 
 /**
  * Wraps an {@link Appender} with details an appender implementation shouldn't need to know
about.
+ * @param <T> The appender's Serializable type.
  */
-public class AppenderControl extends AbstractFilterable {
+public class AppenderControl<T extends Serializable> extends AbstractFilterable {
 
-    private final ThreadLocal<AppenderControl> recursive = new ThreadLocal<AppenderControl>();
+    private final ThreadLocal<AppenderControl<T>> recursive = new ThreadLocal<AppenderControl<T>>();
 
-    private final Appender appender;
+    private final Appender<T> appender;
 
     private final Level level;
     private final int intLevel;
@@ -42,7 +45,7 @@ public class AppenderControl extends Abs
      * @param level the Level to filter on.
      * @param filter the Filter(s) to apply.
      */
-    public AppenderControl(final Appender appender, final Level level, final Filter filter)
{
+    public AppenderControl(final Appender<T> appender, final Level level, final Filter
filter) {
         super(filter);
         this.appender = appender;
         this.level = level;
@@ -54,7 +57,7 @@ public class AppenderControl extends Abs
      * Returns the Appender.
      * @return the Appender.
      */
-    public Appender getAppender() {
+    public Appender<T> getAppender() {
         return appender;
     }
 



Mime
View raw message