Skip to content

Commit d48500f

Browse files
committed
Use ClasspathHelper for Reflections scanning
Replace package-limited scanning with ClasspathHelper-provided URLs for the Reflections configuration to make discovery of ConnectorProperties subtypes more robust across classloaders and deployment layouts. Signed-off-by: Nico Piel <nico.piel@hotmail.de>
1 parent d775848 commit d48500f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

server/src/com/mirth/connect/server/servlets/SwaggerServlet.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
import org.apache.logging.log4j.Logger;
4040
import org.reflections.Reflections;
4141
import org.reflections.scanners.SubTypesScanner;
42+
import org.reflections.util.ClasspathHelper;
4243
import org.reflections.util.ConfigurationBuilder;
4344

4445
import com.mirth.connect.client.core.Version;
@@ -130,7 +131,7 @@ private void addConnectorPropertiesSchemas(OpenAPI openApi) {
130131

131132
private SortedSet<Class<? extends ConnectorProperties>> findConnectorPropertiesSubtypes() {
132133
Reflections reflections = new Reflections(new ConfigurationBuilder()
133-
.forPackages("com.mirth.connect")
134+
.addUrls(ClasspathHelper.forClassLoader())
134135
.addScanners(new SubTypesScanner(false)));
135136

136137
SortedSet<Class<? extends ConnectorProperties>> subtypes = new TreeSet<>(

0 commit comments

Comments
 (0)