logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mattsic...@apache.org
Subject svn commit: r1615848 - /logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/ConsoleAppender.java
Date Tue, 05 Aug 2014 02:32:11 GMT
Author: mattsicker
Date: Tue Aug  5 02:32:11 2014
New Revision: 1615848

URL: http://svn.apache.org/r1615848
Log:
Simplify Loader usage.

Modified:
    logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/ConsoleAppender.java

Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/ConsoleAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/ConsoleAppender.java?rev=1615848&r1=1615847&r2=1615848&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/ConsoleAppender.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/ConsoleAppender.java
Tue Aug  5 02:32:11 2014
@@ -121,9 +121,8 @@ public final class ConsoleAppender exten
             return printStream;
         }
         try {
-            final ClassLoader loader = Loader.getClassLoader();
             // We type the parameter as a wildcard to avoid a hard reference to Jansi.
-            final Class<?> clazz = loader.loadClass(JANSI_CLASS);
+            final Class<?> clazz = Loader.loadClass(JANSI_CLASS);
             final Constructor<?> constructor = clazz.getConstructor(OutputStream.class);
             return (OutputStream) constructor.newInstance(printStream);
         } catch (final ClassNotFoundException cnfe) {



Mime
View raw message