logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1432043 - /logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/ReflectionComparison.java
Date Fri, 11 Jan 2013 13:34:35 GMT
Author: ggregory
Date: Fri Jan 11 13:34:35 2013
New Revision: 1432043

URL: http://svn.apache.org/viewvc?rev=1432043&view=rev
Log:
Fix generics warnings and then remove unnecessary type cast.

Modified:
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/ReflectionComparison.java

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/ReflectionComparison.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/ReflectionComparison.java?rev=1432043&r1=1432042&r2=1432043&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/ReflectionComparison.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/ReflectionComparison.java
Fri Jan 11 13:34:35 2013
@@ -123,8 +123,8 @@ public class ReflectionComparison {
     }
 
     private Message createMessage(final Class<? extends Message> clazz, final String
msg, final Object... params) throws Exception {
-        final Constructor constructor = clazz.getConstructor(paramTypes);
-        return (Message) constructor.newInstance(msg, params);
+        final Constructor<? extends Message> constructor = clazz.getConstructor(paramTypes);
+        return constructor.newInstance(msg, params);
     }
 
 }



Mime
View raw message