File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
utbot-framework/src/main/kotlin/org/utbot/engine
utbot-framework-api/src/main/kotlin/org/utbot/framework/plugin/api Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -1270,10 +1270,11 @@ class SpringApplicationContext(
1270
1270
private val shouldUseImplementors : Boolean ,
1271
1271
): ApplicationContext(mockInstalled, staticsMockingIsConfigured) {
1272
1272
1273
+ // Classes representing concrete types that are actually used in Spring application
1273
1274
private val springInjectedClasses: Set <ClassId >
1274
1275
get() {
1275
1276
if (springInjectedClassesStorage.isEmpty()) {
1276
- springInjectedClassesStorage = beanQualifiedNames
1277
+ springInjectedClassesStorage + = beanQualifiedNames
1277
1278
.map { fqn -> utContext.classLoader.loadClass(fqn) }
1278
1279
.filterNot { it.isAbstract || it.isInterface || it.isLocalClass || it.isMemberClass && ! it.isStatic }
1279
1280
.mapTo(mutableSetOf ()) { it.id }
@@ -1282,7 +1283,9 @@ class SpringApplicationContext(
1282
1283
return springInjectedClassesStorage
1283
1284
}
1284
1285
1285
- private var springInjectedClassesStorage = mutableSetOf<ClassId >()
1286
+ // This is a service field to model the lazy behavior of [springInjectedClasses].
1287
+ // Do not call it outside the getter.
1288
+ private val springInjectedClassesStorage = mutableSetOf<ClassId >()
1286
1289
1287
1290
override val typeReplacementMode: TypeReplacementMode
1288
1291
get() = if (shouldUseImplementors) KnownImplementor else NoImplementors
Original file line number Diff line number Diff line change @@ -2341,7 +2341,6 @@ class Traverser(
2341
2341
return createArray(addr, type, useConcreteType = false )
2342
2342
}
2343
2343
2344
-
2345
2344
/* *
2346
2345
* Creates an array with given [addr] and [type].
2347
2346
*
You can’t perform that action at this time.
0 commit comments