logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1405267 - /logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/AbstractStringLayout.java
Date Sat, 03 Nov 2012 02:41:52 GMT
Author: ggregory
Date: Sat Nov  3 02:41:52 2012
New Revision: 1405267

URL: http://svn.apache.org/viewvc?rev=1405267&view=rev
Log:
Use generics and fix compile warnings.

Modified:
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/AbstractStringLayout.java

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/AbstractStringLayout.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/AbstractStringLayout.java?rev=1405267&r1=1405266&r2=1405267&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/AbstractStringLayout.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/AbstractStringLayout.java
Sat Nov  3 02:41:52 2012
@@ -37,11 +37,9 @@ public abstract class AbstractStringLayo
         this.charset = charset;
         boolean useClass = false;
         try {
-            Class[] types = new Class[] {Charset.class};
-            if (String.class.getMethod("getBytes", types) != null) {
+            if (String.class.getMethod("getBytes", new Class[] {Charset.class}) != null)
{
                 useClass = true;
             }
-
         } catch (NoSuchMethodException ex) {
             // Not JDK 6 or greater.
         }



Mime
View raw message