From 839b61b5420cae0813d0c5c924a04cf7261620b9 Mon Sep 17 00:00:00 2001 From: Danny Seymour Date: Thu, 7 Mar 2024 10:59:49 -0800 Subject: [PATCH] fix: Add class loader to OpenAPIExtensions ServiceLoader --- .../main/java/io/swagger/v3/jaxrs2/ext/OpenAPIExtensions.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/swagger-jaxrs2/src/main/java/io/swagger/v3/jaxrs2/ext/OpenAPIExtensions.java b/modules/swagger-jaxrs2/src/main/java/io/swagger/v3/jaxrs2/ext/OpenAPIExtensions.java index f504159934..f5bfa7b3b7 100644 --- a/modules/swagger-jaxrs2/src/main/java/io/swagger/v3/jaxrs2/ext/OpenAPIExtensions.java +++ b/modules/swagger-jaxrs2/src/main/java/io/swagger/v3/jaxrs2/ext/OpenAPIExtensions.java @@ -28,7 +28,7 @@ public static Iterator chain() { static { extensions = new ArrayList<>(); - ServiceLoader loader = ServiceLoader.load(OpenAPIExtension.class); + ServiceLoader loader = ServiceLoader.load(OpenAPIExtension.class, OpenAPIExtensions.class.getClassLoader()); for (OpenAPIExtension ext : loader) { LOGGER.debug("adding extension {}", ext); extensions.add(ext);