logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rpo...@apache.org
Subject svn commit: r1514231 [1/4] - in /logging/log4j/log4j2/trunk: api/src/main/java/org/apache/logging/log4j/util/ core/src/main/java/org/apache/logging/log4j/core/ core/src/main/java/org/apache/logging/log4j/core/appender/ core/src/main/java/org/apache/log...
Date Thu, 15 Aug 2013 10:47:35 GMT
Author: rpopma
Date: Thu Aug 15 10:47:33 2013
New Revision: 1514231

URL: http://svn.apache.org/r1514231
Log:
LOG4J2-343 Removed unnecessary generics from Appender interface and implementing classes.

Modified:
    logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/Appender.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/Logger.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AbstractAppender.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AbstractOutputStreamAppender.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AsyncAppender.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/ConsoleAppender.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/FailoverAppender.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/FileAppender.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/FileManager.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/JMSQueueAppender.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/JMSTopicAppender.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/OutputStreamManager.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/RandomAccessFileAppender.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/RandomAccessFileManager.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/RollingFileAppender.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/RollingRandomAccessFileAppender.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/SMTPAppender.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/SocketAppender.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/SyslogAppender.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/AbstractDatabaseAppender.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rewrite/RewriteAppender.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rolling/RollingFileManager.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rolling/RollingRandomAccessFileManager.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/routing/RoutingAppender.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/AppenderControl.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/BaseConfiguration.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/Configuration.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/ConfigurationFactory.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/DefaultConfiguration.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/JSONConfiguration.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/LoggerConfig.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/Node.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/XMLConfiguration.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/plugins/AppendersPlugin.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/plugins/PluginManager.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/jmx/AppenderAdmin.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/jmx/Server.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/lookup/Interpolator.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/AbstractSocketManager.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/DatagramSocketManager.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/MulticastDNSAdvertiser.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/TCPSocketManager.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/PatternParser.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/SmtpMessage.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/ReflectionComparison.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/AppenderRefLevelTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/FileConfigTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/LogEventFactoryTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/LoggerTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/LoggerUpdateTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/ShutdownDisabledTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/StrictXMLConfigTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/AsyncAppenderNoLocationTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/AsyncAppenderTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/ConsoleAppenderTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/FailoverAppenderTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/FileAppenderTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/OutputStreamAppenderTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/SMTPAppenderTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/SocketAppenderTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/SyslogAppenderTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jdbc/AbstractJdbcAppenderTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/AbstractJpaAppenderTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/rewrite/RewriteAppenderTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/routing/JSONRoutingAppender2Test.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/routing/JSONRoutingAppenderTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/routing/RoutingAppenderTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/routing/RoutingAppenderWithJndiTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/routing/RoutingDefaultAppenderTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/config/BaseConfigurationTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/config/TestConfigurator.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/config/XMLConfigurationTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/config/XMLLoggerPropsTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/filter/BurstFilterTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/filter/MapFilterTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/layout/HTMLLayoutTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/layout/RFC5424LayoutTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/layout/SerializedLayoutTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/layout/SyslogLayoutTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/layout/XMLLayoutTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/net/AbstractSocketServerTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/net/JMSQueueAppenderTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/net/JMSQueueFailoverTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/net/JMSQueueTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/net/JMSTopicFailoverTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/net/JMSTopicTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/pattern/ExtendedThrowableTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/pattern/RegexReplacementTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/pattern/RootThrowableTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/pattern/StyleConverterTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/pattern/ThrowableTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/util/Compare.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/util/Profiler.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/test/appender/AlwaysFailAppender.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/test/appender/FailOnceAppender.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/test/appender/InMemoryAppender.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/test/appender/ListAppender.java
    logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumeAppender.java
    logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumePersistentManager.java
    logging/log4j/log4j2/trunk/flume-ng/src/test/java/org/apache/logging/log4j/flume/appender/FlumeAppenderTest.java
    logging/log4j/log4j2/trunk/jcl-bridge/src/main/java/org/apache/logging/log4j/jcl/LogFactoryImpl.java
    logging/log4j/log4j2/trunk/jcl-bridge/src/test/java/org/apache/logging/log4j/jcl/LoggerTest.java
    logging/log4j/log4j2/trunk/log4j12-api/src/main/java/org/apache/log4j/Category.java
    logging/log4j/log4j2/trunk/log4j12-api/src/main/java/org/apache/log4j/LogManager.java
    logging/log4j/log4j2/trunk/log4j12-api/src/main/java/org/apache/log4j/NDC.java
    logging/log4j/log4j2/trunk/log4j12-api/src/main/java/org/apache/log4j/helpers/NullEnumeration.java
    logging/log4j/log4j2/trunk/log4j12-api/src/main/java/org/apache/log4j/spi/LoggerRepository.java
    logging/log4j/log4j2/trunk/log4j12-api/src/main/java/org/apache/log4j/xml/DOMConfigurator.java
    logging/log4j/log4j2/trunk/log4j12-api/src/test/java/org/apache/log4j/CategoryTest.java
    logging/log4j/log4j2/trunk/log4j12-api/src/test/java/org/apache/log4j/LoggerTest.java
    logging/log4j/log4j2/trunk/log4j12-api/src/test/java/org/apache/log4j/LoggingTest.java
    logging/log4j/log4j2/trunk/samples/flume-common/src/main/java/org/apache/logging/log4j/samples/app/LogEventFactory.java
    logging/log4j/log4j2/trunk/slf4j-impl/src/main/java/org/slf4j/helpers/EventDataConverter.java
    logging/log4j/log4j2/trunk/slf4j-impl/src/main/java/org/slf4j/helpers/Log4jMDCAdapter.java
    logging/log4j/log4j2/trunk/slf4j-impl/src/test/java/org/apache/logging/slf4j/LoggerTest.java
    logging/log4j/log4j2/trunk/slf4j-impl/src/test/java/org/apache/logging/slf4j/OptionalTest.java
    logging/log4j/log4j2/trunk/src/changes/changes.xml
    logging/log4j/log4j2/trunk/taglib/src/test/java/org/apache/logging/log4j/taglib/CatchingTagTest.java
    logging/log4j/log4j2/trunk/taglib/src/test/java/org/apache/logging/log4j/taglib/EntryTagTest.java
    logging/log4j/log4j2/trunk/taglib/src/test/java/org/apache/logging/log4j/taglib/ExitTagTest.java
    logging/log4j/log4j2/trunk/taglib/src/test/java/org/apache/logging/log4j/taglib/LoggingMessageTagSupportTest.java

Modified: logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java (original)
+++ logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java Thu Aug 15 10:47:33 2013
@@ -18,7 +18,6 @@ package org.apache.logging.log4j.util;
 
 import java.io.IOException;
 import java.io.InputStream;
-import java.net.URL;
 import java.util.Properties;
 
 import org.apache.logging.log4j.Logger;

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/Appender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/Appender.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/Appender.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/Appender.java Thu Aug 15 10:47:33 2013
@@ -20,10 +20,8 @@ import java.io.Serializable;
 
 /**
  * Appends log events.
- *
- * @param <T> The {@link Layout}'s {@link Serializable} type.
  */
-public interface Appender<T extends Serializable> extends LifeCycle {
+public interface Appender extends LifeCycle {
 
     /**
      * Log in <code>Appender</code> specific way. When appropriate,
@@ -47,7 +45,7 @@ public interface Appender<T extends Seri
      *
      * @return the Layout for the Appender or null if none is configured.
      */
-    Layout<T> getLayout();
+    Layout<? extends Serializable> getLayout();
 
     /**
      * Some appenders need to propagate exceptions back to the application. When {@code ignoreExceptions} is

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/Logger.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/Logger.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/Logger.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/Logger.java Thu Aug 15 10:47:33 2013
@@ -139,7 +139,7 @@ public class Logger extends AbstractLogg
      * This method is not exposed through the public API and is used primarily for unit testing.
      * @param appender The Appender to add to the Logger.
      */
-    public void addAppender(final Appender<?> appender) {
+    public void addAppender(final Appender appender) {
         config.config.addLoggerAppender(this, appender);
     }
 
@@ -147,7 +147,7 @@ public class Logger extends AbstractLogg
      * This method is not exposed through the public API and is used primarily for unit testing.
      * @param appender The Appender to remove from the Logger.
      */
-    public void removeAppender(final Appender<?> appender) {
+    public void removeAppender(final Appender appender) {
         config.loggerConfig.removeAppender(appender.getName());
     }
 
@@ -155,7 +155,7 @@ public class Logger extends AbstractLogg
      * This method is not exposed through the public API and is used primarily for unit testing.
      * @return A Map containing the Appender's name as the key and the Appender as the value.
      */
-    public Map<String, Appender<?>> getAppenders() {
+    public Map<String, Appender> getAppenders() {
          return config.loggerConfig.getAppenders();
     }
 

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AbstractAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AbstractAppender.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AbstractAppender.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AbstractAppender.java Thu Aug 15 10:47:33 2013
@@ -31,11 +31,9 @@ import org.apache.logging.log4j.status.S
 /**
  * Abstract base class for Appenders. Although Appenders do not have to extend this class, doing so
  * will simplify their implementation.
- *
- * @param <T> The {@link Layout}'s {@link Serializable} type.
  */
-public abstract class AbstractAppender<T extends Serializable> extends AbstractFilterable
-    implements Appender<T> {
+public abstract class AbstractAppender extends AbstractFilterable
+    implements Appender {
     /**
      * Allow subclasses access to the status logger without creating another instance.
      */
@@ -45,7 +43,7 @@ public abstract class AbstractAppender<T
 
     private ErrorHandler handler = new DefaultErrorHandler(this);
 
-    private final Layout<T> layout;
+    private final Layout<? extends Serializable> layout;
 
     private final String name;
 
@@ -69,7 +67,7 @@ public abstract class AbstractAppender<T
      * @param filter The Filter to associate with the Appender.
      * @param layout The layout to use to format the event.
      */
-    protected AbstractAppender(final String name, final Filter filter, final Layout<T> layout) {
+    protected AbstractAppender(final String name, final Filter filter, final Layout<? extends Serializable> layout) {
         this(name, filter, layout, true);
     }
 
@@ -81,7 +79,7 @@ public abstract class AbstractAppender<T
      * @param ignoreExceptions If true, exceptions will be logged and suppressed. If false errors will be
      * logged and then passed to the application.
      */
-    protected AbstractAppender(final String name, final Filter filter, final Layout<T> layout,
+    protected AbstractAppender(final String name, final Filter filter, final Layout<? extends Serializable> layout,
                                final boolean ignoreExceptions) {
         super(filter);
         this.name = name;
@@ -130,7 +128,7 @@ public abstract class AbstractAppender<T
      * @return The Layout used to format the event.
      */
     @Override
-    public Layout<T> getLayout() {
+    public Layout<? extends Serializable> getLayout() {
         return layout;
     }
 

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AbstractOutputStreamAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AbstractOutputStreamAppender.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AbstractOutputStreamAppender.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AbstractOutputStreamAppender.java Thu Aug 15 10:47:33 2013
@@ -27,10 +27,8 @@ import org.apache.logging.log4j.core.Log
 
 /**
  * Appends log events as bytes to a byte output stream. The stream encoding is defined in the layout.
- *
- * @param <T> The {@link Layout}'s {@link Serializable} type.
  */
-public abstract class AbstractOutputStreamAppender<T extends Serializable> extends AbstractAppender<T> {
+public abstract class AbstractOutputStreamAppender extends AbstractAppender {
 
     /**
      * Immediate flush means that the underlying writer or output stream
@@ -57,7 +55,7 @@ public abstract class AbstractOutputStre
      * @param layout The layout to format the message.
      * @param manager The OutputStreamManager.
      */
-    protected AbstractOutputStreamAppender(final String name, final Layout<T> layout, final Filter filter,
+    protected AbstractOutputStreamAppender(final String name, final Layout<? extends Serializable> layout, final Filter filter,
                                            final boolean ignoreExceptions, final boolean immediateFlush,
                                            final OutputStreamManager manager) {
         super(name, filter, layout, ignoreExceptions);

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AsyncAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AsyncAppender.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AsyncAppender.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AsyncAppender.java Thu Aug 15 10:47:33 2013
@@ -44,11 +44,9 @@ import org.apache.logging.log4j.core.imp
  * AsyncAppender with one or more Appenders and an Appender to append to if the
  * queue is full. The AsyncAppender does not allow a filter to be specified on
  * the Appender references.
- *
- * @param <T> The {@link org.apache.logging.log4j.core.Layout}'s {@link Serializable} type.
  */
 @Plugin(name = "Async", category = "Core", elementType = "appender", printObject = true)
-public final class AsyncAppender<T extends Serializable> extends AbstractAppender<T> {
+public final class AsyncAppender extends AbstractAppender {
 
     private static final int DEFAULT_QUEUE_SIZE = 128;
     private static final String SHUTDOWN = "Shutdown";
@@ -59,7 +57,7 @@ public final class AsyncAppender<T exten
     private final AppenderRef[] appenderRefs;
     private final String errorRef;
     private final boolean includeLocation;
-    private AppenderControl<?> errorAppender;
+    private AppenderControl errorAppender;
     private AsyncThread thread;
     private static final AtomicLong threadSequence = new AtomicLong(1);
 
@@ -78,10 +76,9 @@ public final class AsyncAppender<T exten
     }
 
     @Override
-    @SuppressWarnings("unchecked")
     public void start() {
-        final Map<String, Appender<?>> map = config.getAppenders();
-        final List<AppenderControl<?>> appenders = new ArrayList<AppenderControl<?>>();
+        final Map<String, Appender> map = config.getAppenders();
+        final List<AppenderControl> appenders = new ArrayList<AppenderControl>();
         for (final AppenderRef appenderRef : appenderRefs) {
             if (map.containsKey(appenderRef.getRef())) {
                 appenders.add(new AppenderControl(map.get(appenderRef.getRef()), appenderRef.getLevel(),
@@ -164,11 +161,10 @@ public final class AsyncAppender<T exten
      * @param config The Configuration.
      * @param ignore If {@code "true"} (default) exceptions encountered when appending events are logged; otherwise
      *               they are propagated to the caller.
-     * @param <S> The actual type of the Serializable.
      * @return The AsyncAppender.
      */
     @PluginFactory
-    public static <S extends Serializable> AsyncAppender<S> createAppender(
+    public static AsyncAppender createAppender(
                 @PluginElement("AppenderRef") final AppenderRef[] appenderRefs,
                 @PluginAttr("errorRef") final String errorRef,
                 @PluginAttr("blocking") final String blocking,
@@ -191,7 +187,7 @@ public final class AsyncAppender<T exten
         final boolean isIncludeLocation = Boolean.parseBoolean(includeLocation);
         final boolean ignoreExceptions = Booleans.parseBoolean(ignore, true);
 
-        return new AsyncAppender<S>(name, filter, appenderRefs, errorRef,
+        return new AsyncAppender(name, filter, appenderRefs, errorRef,
                 queueSize, isBlocking, ignoreExceptions, config, isIncludeLocation);
     }
 
@@ -201,10 +197,10 @@ public final class AsyncAppender<T exten
     private class AsyncThread extends Thread {
 
         private volatile boolean shutdown = false;
-        private final List<AppenderControl<?>> appenders;
+        private final List<AppenderControl> appenders;
         private final BlockingQueue<Serializable> queue;
 
-        public AsyncThread(final List<AppenderControl<?>> appenders, final BlockingQueue<Serializable> queue) {
+        public AsyncThread(final List<AppenderControl> appenders, final BlockingQueue<Serializable> queue) {
             this.appenders = appenders;
             this.queue = queue;
             setDaemon(true);
@@ -228,7 +224,7 @@ public final class AsyncAppender<T exten
                 final Log4jLogEvent event = Log4jLogEvent.deserialize(s);
                 event.setEndOfBatch(queue.isEmpty());
                 boolean success = false;
-                for (final AppenderControl<?> control : appenders) {
+                for (final AppenderControl control : appenders) {
                     try {
                         control.callAppender(event);
                         success = true;
@@ -251,7 +247,7 @@ public final class AsyncAppender<T exten
                     if (s instanceof Log4jLogEvent) {
                         final Log4jLogEvent event = Log4jLogEvent.deserialize(s);
                         event.setEndOfBatch(queue.isEmpty());
-                        for (final AppenderControl<?> control : appenders) {
+                        for (final AppenderControl control : appenders) {
                             control.callAppender(event);
                         }
                     }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/ConsoleAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/ConsoleAppender.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/ConsoleAppender.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/ConsoleAppender.java Thu Aug 15 10:47:33 2013
@@ -44,11 +44,9 @@ import org.apache.logging.log4j.util.Pro
  * is handled within the Layout. Typically, a Layout will generate a String
  * and then call getBytes which may use a configured encoding or the system
  * default. OTOH, a Writer cannot print byte streams.
- *
- * @param <T> The {@link Layout}'s {@link Serializable} type.
  */
 @Plugin(name = "Console", category = "Core", elementType = "appender", printObject = true)
-public final class ConsoleAppender<T extends Serializable> extends AbstractOutputStreamAppender<T> {
+public final class ConsoleAppender extends AbstractOutputStreamAppender {
 
     private static ConsoleManagerFactory factory = new ConsoleManagerFactory();
 
@@ -62,7 +60,7 @@ public final class ConsoleAppender<T ext
         SYSTEM_ERR
     }
 
-    private ConsoleAppender(final String name, final Layout<T> layout, final Filter filter,
+    private ConsoleAppender(final String name, final Layout<? extends Serializable> layout, final Filter filter,
                             final OutputStreamManager manager,
                             final boolean ignoreExceptions) {
         super(name, layout, filter, ignoreExceptions, true, manager);
@@ -77,11 +75,10 @@ public final class ConsoleAppender<T ext
      * @param name The name of the Appender (required).
      * @param ignore If {@code "true"} (default) exceptions encountered when appending events are logged; otherwise
      *               they are propagated to the caller.
-     * @param <S> The {@link Layout}'s {@link Serializable} type.
      * @return The ConsoleAppender.
      */
     @PluginFactory
-    public static <S extends Serializable> ConsoleAppender<S> createAppender(@PluginElement("Layout") Layout<S> layout,
+    public static ConsoleAppender createAppender(@PluginElement("Layout") Layout<? extends Serializable> layout,
                                                  @PluginElement("Filters") final Filter filter,
                                                  @PluginAttr("target") final String t,
                                                  @PluginAttr("name") final String name,
@@ -92,18 +89,15 @@ public final class ConsoleAppender<T ext
             return null;
         }
         if (layout == null) {
-            @SuppressWarnings({ "unchecked", "UnnecessaryLocalVariable" })
-            final
-            Layout<S> l = (Layout<S>) PatternLayout.createLayout(null, null, null, null, null);
-            layout = l;
+            layout = PatternLayout.createLayout(null, null, null, null, null);
         }
         final boolean isFollow = Boolean.parseBoolean(follow);
         final boolean ignoreExceptions = Booleans.parseBoolean(ignore, true);
         final Target target = t == null ? Target.SYSTEM_OUT : Target.valueOf(t);
-        return new ConsoleAppender<S>(name, layout, filter, getManager(isFollow, target, layout), ignoreExceptions);
+        return new ConsoleAppender(name, layout, filter, getManager(isFollow, target, layout), ignoreExceptions);
     }
 
-    private static OutputStreamManager getManager(final boolean follow, final Target target, final Layout layout) {
+    private static OutputStreamManager getManager(final boolean follow, final Target target, final Layout<? extends Serializable> layout) {
         final String type = target.name();
         final OutputStream os = getOutputStream(follow, target);
         return OutputStreamManager.getManager(target.name() + "." + follow, new FactoryData(os, type, layout), factory);
@@ -217,14 +211,14 @@ public final class ConsoleAppender<T ext
     private static class FactoryData {
         private final OutputStream os;
         private final String type;
-        private final Layout layout;
+        private final Layout<? extends Serializable> layout;
 
         /**
          * Constructor.
          * @param os The OutputStream.
          * @param type The name of the target.
          */
-        public FactoryData(final OutputStream os, final String type, final Layout layout) {
+        public FactoryData(final OutputStream os, final String type, final Layout<? extends Serializable> layout) {
             this.os = os;
             this.type = type;
             this.layout = layout;

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/FailoverAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/FailoverAppender.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/FailoverAppender.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/FailoverAppender.java Thu Aug 15 10:47:33 2013
@@ -39,11 +39,9 @@ import org.apache.logging.log4j.core.hel
  * The FailoverAppender will capture exceptions in an Appender and then route the event
  * to a different appender. Hopefully it is obvious that the Appenders must be configured
  * to not suppress exceptions for the FailoverAppender to work.
- *
- * @param <T> The {@link org.apache.logging.log4j.core.Layout}'s {@link Serializable} type.
  */
 @Plugin(name = "Failover", category = "Core", elementType = "appender", printObject = true)
-public final class FailoverAppender<T extends Serializable> extends AbstractAppender<T> {
+public final class FailoverAppender extends AbstractAppender {
 
     private static final int DEFAULT_INTERVAL_SECONDS = 60;
 
@@ -53,9 +51,9 @@ public final class FailoverAppender<T ex
 
     private final Configuration config;
 
-    private AppenderControl<?> primary;
+    private AppenderControl primary;
 
-    private final List<AppenderControl<?>> failoverAppenders = new ArrayList<AppenderControl<?>>();
+    private final List<AppenderControl> failoverAppenders = new ArrayList<AppenderControl>();
 
     private final long intervalMillis;
 
@@ -74,9 +72,8 @@ public final class FailoverAppender<T ex
 
 
     @Override
-    @SuppressWarnings("unchecked")
     public void start() {
-        final Map<String, Appender<?>> map = config.getAppenders();
+        final Map<String, Appender> map = config.getAppenders();
         int errors = 0;
         if (map.containsKey(primaryRef)) {
             primary = new AppenderControl(map.get(primaryRef), null, null);
@@ -183,11 +180,10 @@ public final class FailoverAppender<T ex
      * @param filter A Filter (optional).
      * @param ignore If {@code "true"} (default) exceptions encountered when appending events are logged; otherwise
      *               they are propagated to the caller.
-     * @param <S> The {@link org.apache.logging.log4j.core.Layout}'s {@link Serializable} type.
      * @return The FailoverAppender that was created.
      */
     @PluginFactory
-    public static <S extends Serializable> FailoverAppender<S> createAppender(@PluginAttr("name") final String name,
+    public static FailoverAppender createAppender(@PluginAttr("name") final String name,
                                                   @PluginAttr("primary") final String primary,
                                                   @PluginElement("Failovers") final String[] failovers,
                                                   @PluginAttr("retryInterval") final String retryIntervalString,
@@ -218,6 +214,6 @@ public final class FailoverAppender<T ex
 
         final boolean ignoreExceptions = Booleans.parseBoolean(ignore, true);
 
-        return new FailoverAppender<S>(name, filter, primary, failovers, retryIntervalMillis, config, ignoreExceptions);
+        return new FailoverAppender(name, filter, primary, failovers, retryIntervalMillis, config, ignoreExceptions);
     }
 }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/FileAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/FileAppender.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/FileAppender.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/FileAppender.java Thu Aug 15 10:47:33 2013
@@ -34,17 +34,15 @@ import org.apache.logging.log4j.core.net
 
 /**
  * File Appender.
- *
- * @param <T> The {@link Layout}'s {@link Serializable} type.
  */
 @Plugin(name = "File", category = "Core", elementType = "appender", printObject = true)
-public final class FileAppender<T extends Serializable> extends AbstractOutputStreamAppender<T> {
+public final class FileAppender extends AbstractOutputStreamAppender {
 
     private final String fileName;
     private final Advertiser advertiser;
     private Object advertisement;
 
-    private FileAppender(final String name, final Layout<T> layout, final Filter filter, final FileManager manager,
+    private FileAppender(final String name, final Layout<? extends Serializable> layout, final Filter filter, final FileManager manager,
                          final String filename, final boolean ignoreExceptions, final boolean immediateFlush,
                          final Advertiser advertiser) {
         super(name, layout, filter, ignoreExceptions, immediateFlush, manager);
@@ -93,18 +91,17 @@ public final class FileAppender<T extend
      * @param advertise "true" if the appender configuration should be advertised, "false" otherwise.
      * @param advertiseURI The advertised URI which can be used to retrieve the file contents.
      * @param config The Configuration
-     * @param <S> The {@link Layout}'s {@link Serializable} type.
      * @return The FileAppender.
      */
     @PluginFactory
-    public static <S extends Serializable> FileAppender<S> createAppender(@PluginAttr("fileName") final String fileName,
+    public static FileAppender createAppender(@PluginAttr("fileName") final String fileName,
                                               @PluginAttr("append") final String append,
                                               @PluginAttr("locking") final String locking,
                                               @PluginAttr("name") final String name,
                                               @PluginAttr("immediateFlush") final String immediateFlush,
                                               @PluginAttr("ignoreExceptions") final String ignore,
                                               @PluginAttr("bufferedIO") final String bufferedIO,
-                                              @PluginElement("Layout") Layout<S> layout,
+                                              @PluginElement("Layout") Layout<? extends Serializable> layout,
                                               @PluginElement("Filters") final Filter filter,
                                               @PluginAttr("advertise") final String advertise,
                                               @PluginAttr("advertiseURI") final String advertiseURI,
@@ -133,10 +130,7 @@ public final class FileAppender<T extend
             return null;
         }
         if (layout == null) {
-            @SuppressWarnings({ "unchecked", "UnnecessaryLocalVariable" })
-            final
-            Layout<S> l = (Layout<S>) PatternLayout.createLayout(null, null, null, null, null);
-            layout = l;
+            layout = PatternLayout.createLayout(null, null, null, null, null);
         }
 
         final FileManager manager = FileManager.getFileManager(fileName, isAppend, isLocking, isBuffered, advertiseURI,
@@ -146,7 +140,7 @@ public final class FileAppender<T extend
         }
 
 
-        return new FileAppender<S>(name, layout, filter, manager, fileName, ignoreExceptions, isFlush,
+        return new FileAppender(name, layout, filter, manager, fileName, ignoreExceptions, isFlush,
                 isAdvertise ? config.getAdvertiser() : null);
     }
 }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/FileManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/FileManager.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/FileManager.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/FileManager.java Thu Aug 15 10:47:33 2013
@@ -22,6 +22,7 @@ import java.io.FileNotFoundException;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.OutputStream;
+import java.io.Serializable;
 import java.nio.channels.FileChannel;
 import java.nio.channels.FileLock;
 import java.util.HashMap;
@@ -42,7 +43,7 @@ public class FileManager extends OutputS
     private final String advertiseURI;
 
     protected FileManager(final String fileName, final OutputStream os, final boolean append, final boolean locking,
-                          final String advertiseURI, final Layout layout) {
+                          final String advertiseURI, final Layout<? extends Serializable> layout) {
         super(os, fileName, layout);
         this.isAppend = append;
         this.isLocking = locking;
@@ -61,7 +62,7 @@ public class FileManager extends OutputS
      */
     public static FileManager getFileManager(final String fileName, final boolean append, boolean locking,
                                              final boolean bufferedIO, final String advertiseURI,
-                                             final Layout layout) {
+                                             final Layout<? extends Serializable> layout) {
 
         if (locking && bufferedIO) {
             locking = false;
@@ -142,7 +143,7 @@ public class FileManager extends OutputS
         private final boolean locking;
         private final boolean bufferedIO;
         private final String advertiseURI;
-        private final Layout layout;
+        private final Layout<? extends Serializable> layout;
 
         /**
          * Constructor.
@@ -152,7 +153,7 @@ public class FileManager extends OutputS
          * @param advertiseURI the URI to use when advertising the file
          */
         public FactoryData(final boolean append, final boolean locking, final boolean bufferedIO,
-                           final String advertiseURI, final Layout layout) {
+                           final String advertiseURI, final Layout<? extends Serializable> layout) {
             this.append = append;
             this.locking = locking;
             this.bufferedIO = bufferedIO;

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/JMSQueueAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/JMSQueueAppender.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/JMSQueueAppender.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/JMSQueueAppender.java Thu Aug 15 10:47:33 2013
@@ -31,15 +31,13 @@ import org.apache.logging.log4j.core.net
 
 /**
  * Appender to write to a JMS Queue.
- *
- * @param <T> The {@link Layout}'s {@link Serializable} type.
  */
 @Plugin(name = "JMSQueue", category = "Core", elementType = "appender", printObject = true)
-public final class JMSQueueAppender<T extends Serializable> extends AbstractAppender<T> {
+public final class JMSQueueAppender extends AbstractAppender {
 
     private final JMSQueueManager manager;
 
-    private JMSQueueAppender(final String name, final Filter filter, final Layout<T> layout,
+    private JMSQueueAppender(final String name, final Filter filter, final Layout<? extends Serializable> layout,
                              final JMSQueueManager manager, final boolean ignoreExceptions) {
         super(name, filter, layout, ignoreExceptions);
         this.manager = manager;
@@ -76,11 +74,10 @@ public final class JMSQueueAppender<T ex
      * @param filter The Filter or null.
      * @param ignore If {@code "true"} (default) exceptions encountered when appending events are logged; otherwise
      *               they are propagated to the caller.
-     * @param <S> The {@link Layout}'s {@link Serializable} type.
      * @return The JMSQueueAppender.
      */
     @PluginFactory
-    public static <S extends Serializable> JMSQueueAppender<S> createAppender(
+    public static JMSQueueAppender createAppender(
                                                 @PluginAttr("name") final String name,
                                                 @PluginAttr("factoryName") final String factoryName,
                                                 @PluginAttr("providerURL") final String providerURL,
@@ -91,7 +88,7 @@ public final class JMSQueueAppender<T ex
                                                 @PluginAttr("queueBindingName") final String queueBindingName,
                                                 @PluginAttr("userName") final String userName,
                                                 @PluginAttr("password") final String password,
-                                                @PluginElement("Layout") Layout<S> layout,
+                                                @PluginElement("Layout") Layout<? extends Serializable> layout,
                                                 @PluginElement("Filter") final Filter filter,
                                                 @PluginAttr("ignoreExceptions") final String ignore) {
         if (name == null) {
@@ -105,11 +102,8 @@ public final class JMSQueueAppender<T ex
             return null;
         }
         if (layout == null) {
-            @SuppressWarnings({ "unchecked", "UnnecessaryLocalVariable" })
-            final
-            Layout<S> l = (Layout<S>) SerializedLayout.createLayout();
-            layout = l;
+            layout = SerializedLayout.createLayout();
         }
-        return new JMSQueueAppender<S>(name, filter, layout, manager, ignoreExceptions);
+        return new JMSQueueAppender(name, filter, layout, manager, ignoreExceptions);
     }
 }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/JMSTopicAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/JMSTopicAppender.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/JMSTopicAppender.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/JMSTopicAppender.java Thu Aug 15 10:47:33 2013
@@ -31,15 +31,13 @@ import org.apache.logging.log4j.core.net
 
 /**
  * Appender to write to a JMS Topic.
- *
- * @param <T> The {@link Layout}'s {@link Serializable} type.
  */
 @Plugin(name = "JMSTopic", category = "Core", elementType = "appender", printObject = true)
-public final class JMSTopicAppender<T extends Serializable> extends AbstractAppender<T> {
+public final class JMSTopicAppender extends AbstractAppender {
 
     private final JMSTopicManager manager;
 
-    private JMSTopicAppender(final String name, final Filter filter, final Layout<T> layout,
+    private JMSTopicAppender(final String name, final Filter filter, final Layout<? extends Serializable> layout,
                              final JMSTopicManager manager, final boolean ignoreExceptions) {
         super(name, filter, layout, ignoreExceptions);
         this.manager = manager;
@@ -76,11 +74,10 @@ public final class JMSTopicAppender<T ex
      * @param filter The Filter or null.
      * @param ignore If {@code "true"} (default) exceptions encountered when appending events are logged; otherwise
      *               they are propagated to the caller.
-     * @param <S> The {@link Layout}'s {@link Serializable} type.
      * @return The JMSTopicAppender.
      */
     @PluginFactory
-    public static <S extends Serializable> JMSTopicAppender<S> createAppender(
+    public static JMSTopicAppender createAppender(
                                                 @PluginAttr("name") final String name,
                                                 @PluginAttr("factoryName") final String factoryName,
                                                 @PluginAttr("providerURL") final String providerURL,
@@ -91,7 +88,7 @@ public final class JMSTopicAppender<T ex
                                                 @PluginAttr("topicBindingName") final String topicBindingName,
                                                 @PluginAttr("userName") final String userName,
                                                 @PluginAttr("password") final String password,
-                                                @PluginElement("Layout") Layout<S> layout,
+                                                @PluginElement("Layout") Layout<? extends Serializable> layout,
                                                 @PluginElement("Filters") final Filter filter,
                                                 @PluginAttr("ignoreExceptions") final String ignore) {
 
@@ -106,11 +103,8 @@ public final class JMSTopicAppender<T ex
             return null;
         }
         if (layout == null) {
-            @SuppressWarnings({ "unchecked", "UnnecessaryLocalVariable" })
-            final
-            Layout<S> l = (Layout<S>) SerializedLayout.createLayout();
-            layout = l;
+            layout = SerializedLayout.createLayout();
         }
-        return new JMSTopicAppender<S>(name, filter, layout, manager, ignoreExceptions);
+        return new JMSTopicAppender(name, filter, layout, manager, ignoreExceptions);
     }
 }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/OutputStreamManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/OutputStreamManager.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/OutputStreamManager.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/OutputStreamManager.java Thu Aug 15 10:47:33 2013
@@ -32,7 +32,7 @@ public class OutputStreamManager extends
     private final byte[] footer;
     private final byte[] header;
 
-    protected OutputStreamManager(final OutputStream os, final String streamName, final Layout layout) {
+    protected OutputStreamManager(final OutputStream os, final String streamName, final Layout<?> layout) {
         super(streamName);
         this.os = os;
         if (layout != null) {

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/RandomAccessFileAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/RandomAccessFileAppender.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/RandomAccessFileAppender.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/RandomAccessFileAppender.java Thu Aug 15 10:47:33 2013
@@ -35,17 +35,15 @@ import org.apache.logging.log4j.core.net
 
 /**
  * File Appender.
- *
- * @param <T> The {@link Layout}'s {@link Serializable} type.
  */
 @Plugin(name = "RandomAccessFile", category = "Core", elementType = "appender", printObject = true)
-public final class RandomAccessFileAppender<T extends Serializable> extends AbstractOutputStreamAppender<T> {
+public final class RandomAccessFileAppender extends AbstractOutputStreamAppender {
 
     private final String fileName;
     private Object advertisement;
     private final Advertiser advertiser;
 
-    private RandomAccessFileAppender(final String name, final Layout<T> layout, final Filter filter,
+    private RandomAccessFileAppender(final String name, final Layout<? extends Serializable> layout, final Filter filter,
             final RandomAccessFileManager manager, final String filename, final boolean ignoreExceptions,
             final boolean immediateFlush, final Advertiser advertiser) {
         super(name, layout, filter, ignoreExceptions, immediateFlush, manager);
@@ -117,17 +115,16 @@ public final class RandomAccessFileAppen
      * @param advertiseURI The advertised URI which can be used to retrieve the
      *            file contents.
      * @param config The Configuration.
-     * @param <S> The {@link Layout}'s {@link Serializable} type.
      * @return The FileAppender.
      */
     @PluginFactory
-    public static <S extends Serializable> RandomAccessFileAppender<S> createAppender(
+    public static RandomAccessFileAppender createAppender(
             @PluginAttr("fileName") final String fileName,
             @PluginAttr("append") final String append,
             @PluginAttr("name") final String name,
             @PluginAttr("immediateFlush") final String immediateFlush,
             @PluginAttr("ignoreExceptions") final String ignore,
-            @PluginElement("Layout") Layout<S> layout,
+            @PluginElement("Layout") Layout<? extends Serializable> layout,
             @PluginElement("Filters") final Filter filter,
             @PluginAttr("advertise") final String advertise,
             @PluginAttr("advertiseURI") final String advertiseURI,
@@ -149,10 +146,7 @@ public final class RandomAccessFileAppen
             return null;
         }
         if (layout == null) {
-            @SuppressWarnings({ "unchecked", "UnnecessaryLocalVariable" })
-            final
-            Layout<S> l = (Layout<S>) PatternLayout.createLayout(null, null, null, null, null);
-            layout = l;
+            layout = PatternLayout.createLayout(null, null, null, null, null);
         }
         final RandomAccessFileManager manager = RandomAccessFileManager.getFileManager(
                 fileName, isAppend, isFlush, advertiseURI, layout
@@ -161,7 +155,7 @@ public final class RandomAccessFileAppen
             return null;
         }
 
-        return new RandomAccessFileAppender<S>(
+        return new RandomAccessFileAppender(
                 name, layout, filter, manager, fileName, ignoreExceptions, isFlush,
                 isAdvertise ? config.getAdvertiser() : null
         );

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/RandomAccessFileManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/RandomAccessFileManager.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/RandomAccessFileManager.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/RandomAccessFileManager.java Thu Aug 15 10:47:33 2013
@@ -20,6 +20,7 @@ import java.io.File;
 import java.io.IOException;
 import java.io.OutputStream;
 import java.io.RandomAccessFile;
+import java.io.Serializable;
 import java.nio.ByteBuffer;
 import java.util.HashMap;
 import java.util.Map;
@@ -45,7 +46,7 @@ public class RandomAccessFileManager ext
     protected RandomAccessFileManager(final RandomAccessFile file,
             final String fileName, final OutputStream os,
             final boolean immediateFlush, final String advertiseURI,
-            final Layout layout) {
+            final Layout<? extends Serializable> layout) {
         super(os, fileName, layout);
         this.isImmediateFlush = immediateFlush;
         this.randomAccessFile = file;
@@ -70,7 +71,7 @@ public class RandomAccessFileManager ext
      */
     public static RandomAccessFileManager getFileManager(final String fileName,
             final boolean append, final boolean isFlush,
-            final String advertiseURI, final Layout layout) {
+            final String advertiseURI, final Layout<? extends Serializable> layout) {
         return (RandomAccessFileManager) getManager(fileName, new FactoryData(append,
                 isFlush, advertiseURI, layout), FACTORY);
     }
@@ -168,7 +169,7 @@ public class RandomAccessFileManager ext
         private final boolean append;
         private final boolean immediateFlush;
         private final String advertiseURI;
-        private final Layout layout;
+        private final Layout<? extends Serializable> layout;
 
         /**
          * Constructor.
@@ -176,7 +177,7 @@ public class RandomAccessFileManager ext
          * @param append Append status.
          */
         public FactoryData(final boolean append, final boolean immediateFlush,
-                final String advertiseURI, final Layout layout) {
+                final String advertiseURI, final Layout<? extends Serializable> layout) {
             this.append = append;
             this.immediateFlush = immediateFlush;
             this.advertiseURI = advertiseURI;

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/RollingFileAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/RollingFileAppender.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/RollingFileAppender.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/RollingFileAppender.java Thu Aug 15 10:47:33 2013
@@ -39,11 +39,9 @@ import org.apache.logging.log4j.core.net
 
 /**
  * An appender that writes to files and can roll over at intervals.
- *
- * @param <T> The {@link Layout}'s {@link Serializable} type.
  */
 @Plugin(name = "RollingFile", category = "Core", elementType = "appender", printObject = true)
-public final class RollingFileAppender<T extends Serializable> extends AbstractOutputStreamAppender<T> {
+public final class RollingFileAppender extends AbstractOutputStreamAppender {
 
     private final String fileName;
     private final String filePattern;
@@ -51,7 +49,7 @@ public final class RollingFileAppender<T
     private final Advertiser advertiser;
 
 
-    private RollingFileAppender(final String name, final Layout<T> layout, final Filter filter,
+    private RollingFileAppender(final String name, final Layout<? extends Serializable> layout, final Filter filter,
                                 final RollingFileManager manager, final String fileName,
                                 final String filePattern, final boolean ignoreExceptions, final boolean immediateFlush,
                                 final Advertiser advertiser) {
@@ -120,25 +118,24 @@ public final class RollingFileAppender<T
      * @param advertise "true" if the appender configuration should be advertised, "false" otherwise.
      * @param advertiseURI The advertised URI which can be used to retrieve the file contents.
      * @param config The Configuration.
-     * @param <S> The {@link Layout}'s {@link Serializable} type.
      * @return A RollingFileAppender.
      */
     @PluginFactory
-    public static <S extends Serializable> RollingFileAppender<S> createAppender(
-                                              @PluginAttr("fileName") final String fileName,
-                                              @PluginAttr("filePattern") final String filePattern,
-                                              @PluginAttr("append") final String append,
-                                              @PluginAttr("name") final String name,
-                                              @PluginAttr("bufferedIO") final String bufferedIO,
-                                              @PluginAttr("immediateFlush") final String immediateFlush,
-                                              @PluginElement("Policy") final TriggeringPolicy policy,
-                                              @PluginElement("Strategy") RolloverStrategy strategy,
-                                              @PluginElement("Layout") Layout<S> layout,
-                                              @PluginElement("Filter") final Filter filter,
-                                              @PluginAttr("ignoreExceptions") final String ignore,
-                                              @PluginAttr("advertise") final String advertise,
-                                              @PluginAttr("advertiseURI") final String advertiseURI,
-                                              @PluginConfiguration final Configuration config) {
+    public static RollingFileAppender createAppender(
+            @PluginAttr("fileName") final String fileName,
+            @PluginAttr("filePattern") final String filePattern,
+            @PluginAttr("append") final String append,
+            @PluginAttr("name") final String name,
+            @PluginAttr("bufferedIO") final String bufferedIO,
+            @PluginAttr("immediateFlush") final String immediateFlush,
+            @PluginElement("Policy") final TriggeringPolicy policy,
+            @PluginElement("Strategy") RolloverStrategy strategy,
+            @PluginElement("Layout") Layout<? extends Serializable> layout,
+            @PluginElement("Filter") final Filter filter,
+            @PluginAttr("ignoreExceptions") final String ignore,
+            @PluginAttr("advertise") final String advertise,
+            @PluginAttr("advertiseURI") final String advertiseURI,
+            @PluginConfiguration final Configuration config) {
 
         final boolean isAppend = Booleans.parseBoolean(append, true);
         final boolean ignoreExceptions = Booleans.parseBoolean(ignore, true);
@@ -170,10 +167,7 @@ public final class RollingFileAppender<T
         }
 
         if (layout == null) {
-            @SuppressWarnings({ "unchecked", "UnnecessaryLocalVariable" })
-            final
-            Layout<S> l = (Layout<S>) PatternLayout.createLayout(null, null, null, null, null);
-            layout = l;
+            layout = PatternLayout.createLayout(null, null, null, null, null);
         }
 
         final RollingFileManager manager = RollingFileManager.getFileManager(fileName, filePattern, isAppend,
@@ -182,7 +176,7 @@ public final class RollingFileAppender<T
             return null;
         }
 
-        return new RollingFileAppender<S>(name, layout, filter, manager, fileName, filePattern,
+        return new RollingFileAppender(name, layout, filter, manager, fileName, filePattern,
                 ignoreExceptions, isFlush, isAdvertise ? config.getAdvertiser() : null);
     }
 }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/RollingRandomAccessFileAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/RollingRandomAccessFileAppender.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/RollingRandomAccessFileAppender.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/RollingRandomAccessFileAppender.java Thu Aug 15 10:47:33 2013
@@ -41,18 +41,16 @@ import org.apache.logging.log4j.core.net
 /**
  * An appender that writes to random access files and can roll over at
  * intervals.
- *
- * @param <T> The {@link Layout}'s {@link Serializable} type.
  */
 @Plugin(name = "RollingRandomAccessFile", category = "Core", elementType = "appender", printObject = true)
-public final class RollingRandomAccessFileAppender<T extends Serializable> extends AbstractOutputStreamAppender<T> {
+public final class RollingRandomAccessFileAppender extends AbstractOutputStreamAppender {
 
     private final String fileName;
     private final String filePattern;
     private Object advertisement;
     private final Advertiser advertiser;
 
-    private RollingRandomAccessFileAppender(final String name, final Layout<T> layout,
+    private RollingRandomAccessFileAppender(final String name, final Layout<? extends Serializable> layout,
             final Filter filter, final RollingFileManager manager, final String fileName,
             final String filePattern, final boolean ignoreExceptions,
             final boolean immediateFlush, final Advertiser advertiser) {
@@ -139,11 +137,10 @@ public final class RollingRandomAccessFi
      * @param advertiseURI The advertised URI which can be used to retrieve the
      *            file contents.
      * @param config The Configuration.
-     * @param <S> The {@link Layout}'s {@link Serializable} type.
      * @return A RollingRandomAccessFileAppender.
      */
     @PluginFactory
-    public static <S extends Serializable> RollingRandomAccessFileAppender<S> createAppender(
+    public static RollingRandomAccessFileAppender createAppender(
             @PluginAttr("fileName") final String fileName,
             @PluginAttr("filePattern") final String filePattern,
             @PluginAttr("append") final String append,
@@ -151,7 +148,7 @@ public final class RollingRandomAccessFi
             @PluginAttr("immediateFlush") final String immediateFlush,
             @PluginElement("Policy") final TriggeringPolicy policy,
             @PluginElement("Strategy") RolloverStrategy strategy,
-            @PluginElement("Layout") Layout<S> layout,
+            @PluginElement("Layout") Layout<? extends Serializable> layout,
             @PluginElement("Filter") final Filter filter,
             @PluginAttr("ignoreExceptions") final String ignore,
             @PluginAttr("advertise") final String advertise,
@@ -191,10 +188,7 @@ public final class RollingRandomAccessFi
         }
 
         if (layout == null) {
-            @SuppressWarnings({ "unchecked", "UnnecessaryLocalVariable" })
-            final
-            Layout<S> l = (Layout<S>) PatternLayout.createLayout(null, null, null, null, null);
-            layout = l;
+            layout = PatternLayout.createLayout(null, null, null, null, null);
         }
 
 
@@ -204,7 +198,7 @@ public final class RollingRandomAccessFi
             return null;
         }
 
-        return new RollingRandomAccessFileAppender<S>(name, layout, filter, manager,
+        return new RollingRandomAccessFileAppender(name, layout, filter, manager,
                 fileName, filePattern, ignoreExceptions, isFlush,
                 isAdvertise ? config.getAdvertiser() : null);
     }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/SMTPAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/SMTPAppender.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/SMTPAppender.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/SMTPAppender.java Thu Aug 15 10:47:33 2013
@@ -48,18 +48,16 @@ import org.apache.logging.log4j.core.net
  * By default, an email message will be sent when an ERROR or higher severity
  * message is appended. This can be modified by setting a filter for the
  * appender.
- *
- * @param <T> The {@link Layout}'s {@link Serializable} type.
  */
 @Plugin(name = "SMTP", category = "Core", elementType = "appender", printObject = true)
-public final class SMTPAppender<T extends Serializable> extends AbstractAppender<T> {
+public final class SMTPAppender extends AbstractAppender {
 
     private static final int DEFAULT_BUFFER_SIZE = 512;
 
     /** The SMTP Manager */
     protected final SMTPManager manager;
 
-    private SMTPAppender(final String name, final Filter filter, final Layout<T> layout, final SMTPManager manager,
+    private SMTPAppender(final String name, final Filter filter, final Layout<? extends Serializable> layout, final SMTPManager manager,
                          final boolean ignoreExceptions) {
         super(name, filter, layout, ignoreExceptions);
         this.manager = manager;
@@ -102,11 +100,10 @@ public final class SMTPAppender<T extend
      *            ERROR).
      * @param ignore If {@code "true"} (default) exceptions encountered when appending events are logged; otherwise
      *               they are propagated to the caller.
-     * @param <S> The {@link Layout}'s {@link Serializable} type.
      * @return The SMTPAppender.
      */
     @PluginFactory
-    public static <S extends Serializable> SMTPAppender<S> createAppender(@PluginAttr("name") final String name,
+    public static SMTPAppender createAppender(@PluginAttr("name") final String name,
                                               @PluginAttr("to") final String to,
                                               @PluginAttr("cc") final String cc,
                                               @PluginAttr("bcc") final String bcc,
@@ -120,7 +117,7 @@ public final class SMTPAppender<T extend
                                               @PluginAttr("smtpPassword") final String smtpPassword,
                                               @PluginAttr("smtpDebug") final String smtpDebug,
                                               @PluginAttr("bufferSize") final String bufferSizeNum,
-                                              @PluginElement("Layout") Layout<S> layout,
+                                              @PluginElement("Layout") Layout<? extends Serializable> layout,
                                               @PluginElement("Filter") Filter filter,
                                               @PluginAttr("ignoreExceptions") final String ignore) {
         if (name == null) {
@@ -134,10 +131,7 @@ public final class SMTPAppender<T extend
         final int bufferSize = bufferSizeNum == null ? DEFAULT_BUFFER_SIZE : Integer.valueOf(bufferSizeNum);
 
         if (layout == null) {
-            @SuppressWarnings({ "unchecked", "UnnecessaryLocalVariable" })
-            final
-            Layout<S> l = (Layout<S>) HTMLLayout.createLayout(null, null, null, null, null, null);
-            layout = l;
+            layout = HTMLLayout.createLayout(null, null, null, null, null, null);
         }
         if (filter == null) {
             filter = ThresholdFilter.createFilter(null, null, null);
@@ -149,7 +143,7 @@ public final class SMTPAppender<T extend
             return null;
         }
 
-        return new SMTPAppender<S>(name, filter, layout, manager, ignoreExceptions);
+        return new SMTPAppender(name, filter, layout, manager, ignoreExceptions);
     }
 
     /**

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/SocketAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/SocketAppender.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/SocketAppender.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/SocketAppender.java Thu Aug 15 10:47:33 2013
@@ -39,15 +39,13 @@ import org.apache.logging.log4j.util.Eng
 
 /**
  * An Appender that delivers events over socket connections. Supports both TCP and UDP.
- *
- * @param <T> The {@link Layout}'s {@link Serializable} type.
  */
 @Plugin(name = "Socket", category = "Core", elementType = "appender", printObject = true)
-public class SocketAppender<T extends Serializable> extends AbstractOutputStreamAppender<T> {
+public class SocketAppender extends AbstractOutputStreamAppender {
     private Object advertisement;
     private final Advertiser advertiser;
 
-    protected SocketAppender(final String name, final Layout<T> layout, final Filter filter,
+    protected SocketAppender(final String name, final Layout<? extends Serializable> layout, final Filter filter,
                              final AbstractSocketManager manager, final boolean ignoreExceptions,
                              final boolean immediateFlush, final Advertiser advertiser) {
         super(name, layout, filter, ignoreExceptions, immediateFlush, manager);
@@ -84,11 +82,10 @@ public class SocketAppender<T extends Se
      * @param filter The Filter or null.
      * @param advertise "true" if the appender configuration should be advertised, "false" otherwise.
      * @param config The Configuration
-     * @param <S> The {@link Layout}'s {@link Serializable} type.
      * @return A SocketAppender.
      */
     @PluginFactory
-    public static <S extends Serializable> SocketAppender<S> createAppender(@PluginAttr("host") final String host,
+    public static SocketAppender createAppender(@PluginAttr("host") final String host,
                                                 @PluginAttr("port") final String portNum,
                                                 @PluginAttr("protocol") final String protocol,
                                                 @PluginAttr("reconnectionDelay") final String delay,
@@ -96,7 +93,7 @@ public class SocketAppender<T extends Se
                                                 @PluginAttr("name") final String name,
                                                 @PluginAttr("immediateFlush") final String immediateFlush,
                                                 @PluginAttr("ignoreExceptions") final String ignore,
-                                                @PluginElement("Layout") Layout<S> layout,
+                                                @PluginElement("Layout") Layout<? extends Serializable> layout,
                                                 @PluginElement("Filters") final Filter filter,
                                                 @PluginAttr("advertise") final String advertise,
                                                 @PluginConfiguration final Configuration config) {
@@ -108,10 +105,7 @@ public class SocketAppender<T extends Se
         final int reconnectDelay = AbstractAppender.parseInt(delay, 0);
         final int port = AbstractAppender.parseInt(portNum, 0);
         if (layout == null) {
-            @SuppressWarnings({ "unchecked", "UnnecessaryLocalVariable" })
-            final
-            Layout<S> l = (Layout<S>) SerializedLayout.createLayout();
-            layout = l;
+            layout = SerializedLayout.createLayout();
         }
 
         if (name == null) {
@@ -129,13 +123,13 @@ public class SocketAppender<T extends Se
             return null;
         }
 
-        return new SocketAppender<S>(name, layout, filter, manager, ignoreExceptions, isFlush,
+        return new SocketAppender(name, layout, filter, manager, ignoreExceptions, isFlush,
                 isAdvertise ? config.getAdvertiser() : null);
     }
 
     protected static AbstractSocketManager createSocketManager(final Protocol p, final String host, final int port,
                                                                final int delay, final boolean immediateFail,
-                                                               final Layout layout) {
+                                                               final Layout<? extends Serializable> layout) {
         switch (p) {
             case TCP:
                 return TCPSocketManager.getSocketManager(host, port, delay, immediateFail, layout);

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/SyslogAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/SyslogAppender.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/SyslogAppender.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/SyslogAppender.java Thu Aug 15 10:47:33 2013
@@ -37,15 +37,13 @@ import org.apache.logging.log4j.util.Eng
 
 /**
  * The Syslog Appender.
- *
- * @param <T> The {@link Layout}'s {@link Serializable} type.
  */
 @Plugin(name = "Syslog", category = "Core", elementType = "appender", printObject = true)
-public class SyslogAppender<T extends Serializable> extends SocketAppender<T> {
+public class SyslogAppender extends SocketAppender {
 
     private static final String RFC5424 = "RFC5424";
 
-    protected SyslogAppender(final String name, final Layout<T> layout, final Filter filter,
+    protected SyslogAppender(final String name, final Layout<? extends Serializable> layout, final Filter filter,
                              final boolean ignoreExceptions, final boolean immediateFlush,
                              final AbstractSocketManager manager, final Advertiser advertiser) {
         super(name, layout, filter, manager, ignoreExceptions, immediateFlush, advertiser);
@@ -86,11 +84,10 @@ public class SyslogAppender<T extends Se
      * @param exceptionPattern The converter pattern to use for formatting exceptions.
      * @param loggerFields The logger fields
      * @param advertise Whether to advertise
-     * @param <S> The {@link Layout}'s {@link Serializable} type.
      * @return A SyslogAppender.
      */
     @PluginFactory
-    public static <S extends Serializable> SyslogAppender<S> createAppender(@PluginAttr("host") final String host,
+    public static SyslogAppender createAppender(@PluginAttr("host") final String host,
                                                 @PluginAttr("port") final String portNum,
                                                 @PluginAttr("protocol") final String protocol,
                                                 @PluginAttr("reconnectionDelay") final String delay,
@@ -126,8 +123,7 @@ public class SyslogAppender<T extends Se
         final boolean fail = Booleans.parseBoolean(immediateFail, true);
         final int port = AbstractAppender.parseInt(portNum, 0);
         final boolean isAdvertise = Boolean.parseBoolean(advertise);
-        @SuppressWarnings("unchecked")
-        final Layout<S> layout = (Layout<S>) (RFC5424.equalsIgnoreCase(format) ?
+        final Layout<? extends Serializable> layout = (RFC5424.equalsIgnoreCase(format) ?
             RFC5424Layout.createLayout(facility, id, ein, includeMDC, mdcId, mdcPrefix, eventPrefix, includeNL,
                 escapeNL, appName, msgId, excludes, includes, required, exceptionPattern, loggerFields, config) :
             SyslogLayout.createLayout(facility, includeNL, escapeNL, charsetName));
@@ -142,7 +138,7 @@ public class SyslogAppender<T extends Se
             return null;
         }
 
-        return new SyslogAppender<S>(name, layout, filter, ignoreExceptions, isFlush, manager,
+        return new SyslogAppender(name, layout, filter, ignoreExceptions, isFlush, manager,
                 isAdvertise ? config.getAdvertiser() : null);
     }
 }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/AbstractDatabaseAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/AbstractDatabaseAppender.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/AbstractDatabaseAppender.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/AbstractDatabaseAppender.java Thu Aug 15 10:47:33 2013
@@ -35,7 +35,7 @@ import org.apache.logging.log4j.core.app
  *
  * @param <T> Specifies which type of {@link AbstractDatabaseManager} this Appender requires.
  */
-public abstract class AbstractDatabaseAppender<T extends AbstractDatabaseManager> extends AbstractAppender<LogEvent> {
+public abstract class AbstractDatabaseAppender<T extends AbstractDatabaseManager> extends AbstractAppender {
     private final ReadWriteLock lock = new ReentrantReadWriteLock();
     private final Lock readLock = lock.readLock();
     private final Lock writeLock = lock.writeLock();

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rewrite/RewriteAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rewrite/RewriteAppender.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rewrite/RewriteAppender.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rewrite/RewriteAppender.java Thu Aug 15 10:47:33 2013
@@ -41,7 +41,7 @@ import org.apache.logging.log4j.core.hel
  * @param <T> The {@link org.apache.logging.log4j.core.Layout}'s {@link Serializable} type.
  */
 @Plugin(name = "Rewrite", category = "Core", elementType = "appender", printObject = true)
-public final class RewriteAppender<T extends Serializable> extends AbstractAppender<T> {
+public final class RewriteAppender extends AbstractAppender {
     private final Configuration config;
     private final ConcurrentMap<String, AppenderControl> appenders = new ConcurrentHashMap<String, AppenderControl>();
     private final RewritePolicy rewritePolicy;
@@ -57,15 +57,14 @@ public final class RewriteAppender<T ext
     }
 
     @Override
-    @SuppressWarnings("unchecked")
     public void start() {
-        final Map<String, Appender<?>> map = config.getAppenders();
+        final Map<String, Appender> map = config.getAppenders();
         for (final AppenderRef ref : appenderRefs) {
             final String name = ref.getRef();
             final Appender appender = map.get(name);
             if (appender != null) {
-                final Filter filter = appender instanceof AbstractAppender<?> ?
-                    ((AbstractAppender<?>) appender).getFilter() : null;
+                final Filter filter = appender instanceof AbstractAppender ?
+                    ((AbstractAppender) appender).getFilter() : null;
                 appenders.put(name, new AppenderControl(appender, ref.getLevel(), filter));
             } else {
                 LOGGER.error("Appender " + ref + " cannot be located. Reference ignored");
@@ -102,11 +101,10 @@ public final class RewriteAppender<T ext
      * @param config The Configuration.
      * @param rewritePolicy The policy to use to modify the event.
      * @param filter A Filter to filter events.
-     * @param <S> The {@link org.apache.logging.log4j.core.Layout}'s {@link Serializable} type.
      * @return The created RewriteAppender.
      */
     @PluginFactory
-    public static <S extends Serializable> RewriteAppender<S> createAppender(@PluginAttr("name") final String name,
+    public static RewriteAppender createAppender(@PluginAttr("name") final String name,
                                           @PluginAttr("ignoreExceptions") final String ignore,
                                           @PluginElement("AppenderRef") final AppenderRef[] appenderRefs,
                                           @PluginConfiguration final Configuration config,
@@ -122,6 +120,6 @@ public final class RewriteAppender<T ext
             LOGGER.error("No appender references defined for RewriteAppender");
             return null;
         }
-        return new RewriteAppender<S>(name, filter, ignoreExceptions, appenderRefs, rewritePolicy, config);
+        return new RewriteAppender(name, filter, ignoreExceptions, appenderRefs, rewritePolicy, config);
     }
 }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rolling/RollingFileManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rolling/RollingFileManager.java?rev=1514231&r1=1514230&r2=1514231&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rolling/RollingFileManager.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rolling/RollingFileManager.java Thu Aug 15 10:47:33 2013
@@ -22,6 +22,7 @@ import java.io.FileNotFoundException;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.OutputStream;
+import java.io.Serializable;
 import java.util.concurrent.Semaphore;
 
 import org.apache.logging.log4j.core.Layout;
@@ -47,7 +48,7 @@ public class RollingFileManager extends 
 
     protected RollingFileManager(final String fileName, final String pattern, final OutputStream os,
                                  final boolean append, final long size, final long time, final TriggeringPolicy policy,
-                                 final RolloverStrategy strategy, final String advertiseURI, final Layout layout) {
+                                 final RolloverStrategy strategy, final String advertiseURI, final Layout<? extends Serializable> layout) {
         super(fileName, os, append, false, advertiseURI, layout);
         this.size = size;
         this.initialTime = time;
@@ -72,7 +73,7 @@ public class RollingFileManager extends 
     public static RollingFileManager getFileManager(final String fileName, final String pattern, final boolean append,
                                                     final boolean bufferedIO, final TriggeringPolicy policy,
                                                     final RolloverStrategy strategy, final String advertiseURI,
-                                                    final Layout layout) {
+                                                    final Layout<? extends Serializable> layout) {
 
         return (RollingFileManager) getManager(fileName, new FactoryData(pattern, append,
             bufferedIO, policy, strategy, advertiseURI, layout), factory);
@@ -237,7 +238,7 @@ public class RollingFileManager extends 
         private final TriggeringPolicy policy;
         private final RolloverStrategy strategy;
         private final String advertiseURI;
-        private final Layout layout;
+        private final Layout<? extends Serializable> layout;
 
         /**
          * Create the data for the factory.
@@ -249,7 +250,7 @@ public class RollingFileManager extends 
          */
         public FactoryData(final String pattern, final boolean append, final boolean bufferedIO,
                            final TriggeringPolicy policy, final RolloverStrategy strategy, final String advertiseURI,
-                           final Layout layout) {
+                           final Layout<? extends Serializable> layout) {
             this.pattern = pattern;
             this.append = append;
             this.bufferedIO = bufferedIO;



Mime
View raw message