logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1432085 - in /logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/plugins: PluginManager.java ResolverUtil.java
Date Fri, 11 Jan 2013 15:06:31 GMT
Author: ggregory
Date: Fri Jan 11 15:06:30 2013
New Revision: 1432085

URL: http://svn.apache.org/viewvc?rev=1432085&view=rev
Log:
Fix generics. ResolverUtils should not be typed.

Modified:
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/plugins/PluginManager.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/plugins/ResolverUtil.java

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/plugins/PluginManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/plugins/PluginManager.java?rev=1432085&r1=1432084&r2=1432085&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/plugins/PluginManager.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/plugins/PluginManager.java
Fri Jan 11 15:06:30 2013
@@ -137,7 +137,7 @@ public class PluginManager {
             preLoad = false;
         }
         final long start = System.nanoTime();
-        final ResolverUtil<?> resolver = new ResolverUtil();
+        final ResolverUtil resolver = new ResolverUtil();
         final ClassLoader loader = Loader.getClassLoader();
         if (loader != null) {
             resolver.setClassLoader(loader);

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/plugins/ResolverUtil.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/plugins/ResolverUtil.java?rev=1432085&r1=1432084&r2=1432085&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/plugins/ResolverUtil.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/plugins/ResolverUtil.java
Fri Jan 11 15:06:30 2013
@@ -71,9 +71,8 @@ import java.util.jar.JarInputStream;
  * </p>
  *
  * @author Tim Fennell
- * @param <T> The type of the Class that can be returned.
  */
-public class ResolverUtil<T> {
+public class ResolverUtil {
     /** An instance of Log to use for logging in this class. */
     private static final Logger LOG = StatusLogger.getLogger();
 
@@ -82,7 +81,7 @@ public class ResolverUtil<T> {
     private static final String BUNDLE_RESOURCE = "bundleresource";
 
     /** The set of matches being accumulated. */
-    private final Set<Class<? extends T>> classMatches = new HashSet<Class<?
extends T>>();
+    private final Set<Class<?>> classMatches = new HashSet<Class<?>>();
 
     /** The set of matches being accumulated. */
     private final Set<URI> resourceMatches = new HashSet<URI>();
@@ -99,7 +98,7 @@ public class ResolverUtil<T> {
      *
      * @return the set of classes that have been discovered.
      */
-    public Set<Class<? extends T>> getClasses() {
+    public Set<Class<?>> getClasses() {
         return classMatches;
     }
 
@@ -383,7 +382,7 @@ public class ResolverUtil<T> {
                     LOG.debug("Checking to see if class " + externalName + " matches criteria
[" + test + "]");
                 }
 
-                final Class type = loader.loadClass(externalName);
+                final Class<?> type = loader.loadClass(externalName);
                 if (test.matches(type)) {
                     classMatches.add(type);
                 }



Mime
View raw message