logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1396017 - /logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/OptionConverter.java
Date Tue, 09 Oct 2012 13:09:51 GMT
Author: ggregory
Date: Tue Oct  9 13:09:50 2012
New Revision: 1396017

URL: http://svn.apache.org/viewvc?rev=1396017&view=rev
Log:
Fix generics warning.

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

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/OptionConverter.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/OptionConverter.java?rev=1396017&r1=1396016&r2=1396017&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/OptionConverter.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/OptionConverter.java
Tue Oct  9 13:09:50 2012
@@ -103,7 +103,7 @@ public final class OptionConverter {
     }
 
 
-    public static Object instantiateByKey(Properties props, String key, Class superClass,
+    public static Object instantiateByKey(Properties props, String key, Class<?> superClass,
                                    Object defaultValue) {
 
         // Get the value of the property in string form
@@ -230,11 +230,11 @@ public final class OptionConverter {
      * @param defaultValue The object to return in case of non-fulfillment
      * @return The created object.
      */
-    public static Object instantiateByClassName(String className, Class superClass,
+    public static Object instantiateByClassName(String className, Class<?> superClass,
                                          Object defaultValue) {
         if (className != null) {
             try {
-                Class classObj = Loader.loadClass(className);
+                Class<?> classObj = Loader.loadClass(className);
                 if (!superClass.isAssignableFrom(classObj)) {
                     LOGGER.error("A \"" + className + "\" object is not assignable to a \""
+
                         superClass.getName() + "\" variable.");



Mime
View raw message