@@ -61,6 +61,7 @@ import org.utbot.framework.plugin.api.TypeReplacementMode.*
61
61
import org.utbot.framework.plugin.api.util.allDeclaredFieldIds
62
62
import org.utbot.framework.plugin.api.util.fieldId
63
63
import org.utbot.framework.plugin.api.util.isSubtypeOf
64
+ import org.utbot.framework.plugin.api.util.objectClassId
64
65
import org.utbot.framework.plugin.api.util.utContext
65
66
import org.utbot.framework.process.OpenModulesContainer
66
67
import soot.SootField
@@ -1200,7 +1201,6 @@ enum class TypeReplacementMode {
1200
1201
* @param mockFrameworkInstalled shows if we have installed framework dependencies
1201
1202
* @param staticsMockingIsConfigured shows if we have installed static mocking tools
1202
1203
*/
1203
- @Suppress(" KDocUnresolvedReference" )
1204
1204
open class ApplicationContext (
1205
1205
val mockFrameworkInstalled : Boolean = true ,
1206
1206
staticsMockingIsConfigured : Boolean = true ,
@@ -1278,6 +1278,11 @@ class SpringApplicationContext(
1278
1278
.map { fqn -> utContext.classLoader.loadClass(fqn) }
1279
1279
.filterNot { it.isAbstract || it.isInterface || it.isLocalClass || it.isMemberClass && ! it.isStatic }
1280
1280
.mapTo(mutableSetOf ()) { it.id }
1281
+
1282
+ // This is done to be sure that this storage is not empty after the first class loading iteration.
1283
+ // So, even if all loaded classes were filtered out, we will not try to load them again.
1284
+ // Having `Object` in a list of injected classes is harmless from the point of abstract types replacements.
1285
+ springInjectedClassesStorage + = objectClassId
1281
1286
}
1282
1287
1283
1288
return springInjectedClassesStorage
0 commit comments