Class SafeServiceLoader
- java.lang.Object
-
- io.opentelemetry.javaagent.instrumentation.api.SafeServiceLoader
-
public class SafeServiceLoader extends Object
-
-
Constructor Summary
Constructors Constructor Description SafeServiceLoader()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> List<T>load(Class<T> serviceClass, ClassLoader classLoader)Delegates toServiceLoader.load(Class, ClassLoader)and then eagerly iterates over returnedIterable, ignoring any potentialUnsupportedClassVersionError.
-
-
-
Method Detail
-
load
public static <T> List<T> load(Class<T> serviceClass, ClassLoader classLoader)
Delegates toServiceLoader.load(Class, ClassLoader)and then eagerly iterates over returnedIterable, ignoring any potentialUnsupportedClassVersionError.Those errors can happen when some classes returned by
ServiceLoaderwere compiled for later java version than is used by currently running JVM. During normal course of business this should not happen. Please read CONTRIBUTING.md, section "Testing - Java versions" for a background info why this is Ok.
-
-