commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1130284 - in /commons/proper/discovery/trunk/src/java/org/apache/commons/discovery/tools: DiscoverClass.java Service.java
Date Wed, 01 Jun 2011 20:08:32 GMT
Author: simonetripodi
Date: Wed Jun  1 20:08:31 2011
New Revision: 1130284

URL: http://svn.apache.org/viewvc?rev=1130284&view=rev
Log:
[DISCOVERY-18] Discovery fails to compile with opendjk6's javac - patch submitted by Denis
Lila

Modified:
    commons/proper/discovery/trunk/src/java/org/apache/commons/discovery/tools/DiscoverClass.java
    commons/proper/discovery/trunk/src/java/org/apache/commons/discovery/tools/Service.java

Modified: commons/proper/discovery/trunk/src/java/org/apache/commons/discovery/tools/DiscoverClass.java
URL: http://svn.apache.org/viewvc/commons/proper/discovery/trunk/src/java/org/apache/commons/discovery/tools/DiscoverClass.java?rev=1130284&r1=1130283&r2=1130284&view=diff
==============================================================================
--- commons/proper/discovery/trunk/src/java/org/apache/commons/discovery/tools/DiscoverClass.java
(original)
+++ commons/proper/discovery/trunk/src/java/org/apache/commons/discovery/tools/DiscoverClass.java
Wed Jun  1 20:08:31 2011
@@ -185,10 +185,10 @@ public class DiscoverClass {
      *            the resulting class does not implement (or extend) the SPI.
      */
     public <T, S extends T> Class<S> find(Class<T> spiClass) throws DiscoveryException
{
-        return find(getClassLoaders(spiClass),
-                    new SPInterface<T>(spiClass),
-                    nullProperties,
-                    (DefaultClassHolder<T>) null);
+        return DiscoverClass.<T, S>find(getClassLoaders(spiClass),
+                                        new SPInterface<T>(spiClass),
+                                        nullProperties,
+                                        (DefaultClassHolder<T>) null);
     }
 
     /**
@@ -204,10 +204,10 @@ public class DiscoverClass {
      *            the resulting class does not implement (or extend) the SPI.
      */
     public <T, S extends T> Class<S> find(Class<T> spiClass, Properties
properties) throws DiscoveryException {
-        return find(getClassLoaders(spiClass),
-                    new SPInterface<T>(spiClass),
-                    new PropertiesHolder(properties),
-                    (DefaultClassHolder<T>) null);
+        return DiscoverClass.<T, S>find(getClassLoaders(spiClass),
+                                        new SPInterface<T>(spiClass),
+                                        new PropertiesHolder(properties),
+                                        (DefaultClassHolder<T>) null);
     }
 
     /**
@@ -223,10 +223,10 @@ public class DiscoverClass {
      *            the resulting class does not implement (or extend) the SPI.
      */
     public <T, S extends T> Class<S> find(Class<T> spiClass, String defaultImpl)
throws DiscoveryException {
-        return find(getClassLoaders(spiClass),
-                    new SPInterface<T>(spiClass),
-                    nullProperties,
-                    new DefaultClassHolder<T>(defaultImpl));
+        return DiscoverClass.<T, S>find(getClassLoaders(spiClass),
+                                        new SPInterface<T>(spiClass),
+                                        nullProperties,
+                                        new DefaultClassHolder<T>(defaultImpl));
     }
 
     /**
@@ -244,10 +244,10 @@ public class DiscoverClass {
      */
     public <T, S extends T> Class<S> find(Class<T> spiClass, Properties
properties, String defaultImpl)
             throws DiscoveryException {
-        return find(getClassLoaders(spiClass),
-                    new SPInterface<T>(spiClass),
-                    new PropertiesHolder(properties),
-                    new DefaultClassHolder<T>(defaultImpl));
+        return DiscoverClass.<T, S>find(getClassLoaders(spiClass),
+                                        new SPInterface<T>(spiClass),
+                                        new PropertiesHolder(properties),
+                                        new DefaultClassHolder<T>(defaultImpl));
     }
 
     /**
@@ -265,10 +265,10 @@ public class DiscoverClass {
      */
     public <T, S extends T> Class<S> find(Class<T> spiClass, String propertiesFileName,
String defaultImpl)
             throws DiscoveryException {
-        return find(getClassLoaders(spiClass),
-                    new SPInterface<T>(spiClass),
-                    new PropertiesHolder(propertiesFileName),
-                    new DefaultClassHolder<T>(defaultImpl));
+        return DiscoverClass.<T, S>find(getClassLoaders(spiClass),
+                                        new SPInterface<T>(spiClass),
+                                        new PropertiesHolder(propertiesFileName),
+                                        new DefaultClassHolder<T>(defaultImpl));
     }
 
     /**
@@ -517,7 +517,7 @@ public class DiscoverClass {
                IllegalAccessException,
                NoSuchMethodException,
                InvocationTargetException {
-        return spi.newInstance(find(loaders, spi, properties, defaultImpl));
+        return spi.newInstance(DiscoverClass.<T, T>find(loaders, spi, properties, defaultImpl));
     }
 
     /**

Modified: commons/proper/discovery/trunk/src/java/org/apache/commons/discovery/tools/Service.java
URL: http://svn.apache.org/viewvc/commons/proper/discovery/trunk/src/java/org/apache/commons/discovery/tools/Service.java?rev=1130284&r1=1130283&r2=1130284&view=diff
==============================================================================
--- commons/proper/discovery/trunk/src/java/org/apache/commons/discovery/tools/Service.java
(original)
+++ commons/proper/discovery/trunk/src/java/org/apache/commons/discovery/tools/Service.java
Wed Jun  1 20:08:31 2011
@@ -63,7 +63,7 @@ public class Service {
      * @return Enumeration of class instances ({@code S})
      */
     public static <T, S extends T> Enumeration<S> providers(Class<T> spiClass)
{
-        return providers(new SPInterface<T>(spiClass), null);
+        return Service.<T, S>providers(new SPInterface<T>(spiClass), null);
     }
 
     /**



Mime
View raw message