We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b50cfee commit 1a61543Copy full SHA for 1a61543
core/src/main/java/org/testcontainers/utility/ImageNameSubstitutor.java
@@ -33,7 +33,12 @@ public static synchronized ImageNameSubstitutor instance() {
33
ImageNameSubstitutor configuredInstance;
34
try {
35
configuredInstance =
36
- (ImageNameSubstitutor) Class.forName(configuredClassName).getConstructor().newInstance();
+ (ImageNameSubstitutor) Thread
37
+ .currentThread()
38
+ .getContextClassLoader()
39
+ .loadClass(configuredClassName)
40
+ .getConstructor()
41
+ .newInstance();
42
} catch (Exception e) {
43
throw new IllegalArgumentException(
44
"Configured Image Substitutor could not be loaded: " + configuredClassName,
0 commit comments