Skip to content

Commit 1cb8c00

Browse files
authored
Block parent classloader for engine process (#2479)
Block parent classloader for instrumentation process #2477
1 parent a6842f7 commit 1cb8c00

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

utbot-framework/src/main/kotlin/org/utbot/framework/process/EngineProcessMain.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,10 @@ private var idCounter: Long = 0
7474
private fun EngineProcessModel.setup(kryoHelper: KryoHelper, watchdog: IdleWatchdog, realProtocol: IProtocol) {
7575
val model = this
7676
watchdog.measureTimeForActiveCall(setupUtContext, "UtContext setup") { params ->
77+
// we use parent classloader with null to disable autoload classes from system classloader
7778
UtContext.setUtContext(UtContext(URLClassLoader(params.classpathForUrlsClassloader.map {
7879
File(it).toURI().toURL()
79-
}.toTypedArray())))
80+
}.toTypedArray(), null)))
8081
}
8182
watchdog.measureTimeForActiveCall(getSpringBeanDefinitions, "Getting Spring bean definitions") { params ->
8283
try {

0 commit comments

Comments
 (0)