logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1479694 - /logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/Charsets.java
Date Mon, 06 May 2013 20:11:24 GMT
Author: ggregory
Date: Mon May  6 20:11:24 2013
New Revision: 1479694

URL: http://svn.apache.org/r1479694
Log:
UTF-8 is always supported, so we can simplify some code.

Modified:
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/Charsets.java

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/Charsets.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/Charsets.java?rev=1479694&r1=1479693&r2=1479694&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/Charsets.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/Charsets.java
Mon May  6 20:11:24 2013
@@ -31,8 +31,7 @@ public final class Charsets {
     }
 
     /**
-     * Gets a Charset, starting with the preferred {@code charsetName} if supported, if not,
use UTF-8, if not
-     * supported, use the platform default.
+     * Gets a Charset, starting with the preferred {@code charsetName} if supported, if not,
use UTF-8.
      *
      * @param charsetName
      *            the preferred charset name
@@ -46,7 +45,7 @@ public final class Charsets {
             }
         }
         if (charset == null) {
-            charset = Charset.isSupported(UTF_8) ? Charset.forName(UTF_8) : Charset.defaultCharset();
+            charset = Charset.forName(UTF_8);
             if (charsetName != null) {
                 StatusLogger.getLogger().error("Charset " + charsetName + " is not supported
for layout, using " +
                     charset.displayName());



Mime
View raw message