mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-04 07:35:53 +00:00
Deprecating Service in favor of ServiceLoader.
This commit is contained in:
5 files changed
+25
-18
No files matched your search
@@ -120,7 +120,6 @@ import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.ListIterator;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.TreeMap;
|
||||
@@ -144,6 +143,7 @@ import hudson.util.FormValidation;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.net.JarURLConnection;
|
||||
import java.net.URLConnection;
|
||||
import java.util.ServiceLoader;
|
||||
import java.util.jar.JarEntry;
|
||||
|
||||
import static java.util.logging.Level.FINE;
|
||||
@@ -1195,7 +1195,9 @@ public abstract class PluginManager extends AbstractModelObject implements OnMas
|
||||
/**
|
||||
* Discover all the service provider implementations of the given class,
|
||||
* via <tt>META-INF/services</tt>.
|
||||
* @deprecated Use {@link ServiceLoader} instead, or (more commonly) {@link ExtensionList}.
|
||||
*/
|
||||
@Deprecated
|
||||
public <T> Collection<Class<? extends T>> discover( Class<T> spi ) {
|
||||
Set<Class<? extends T>> result = new HashSet<Class<? extends T>>();
|
||||
|
||||
|
||||
Reference in new issue
Block a user