Skip to content

Commit 2ff452b

Browse files
committed
Little fixes under review
1 parent 1fba46a commit 2ff452b

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

2 files changed

+5
-3
lines changed

utbot-framework-api/src/main/kotlin/org/utbot/framework/plugin/api/Api.kt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1270,10 +1270,11 @@ class SpringApplicationContext(
12701270
private val shouldUseImplementors: Boolean,
12711271
): ApplicationContext(mockInstalled, staticsMockingIsConfigured) {
12721272

1273+
// Classes representing concrete types that are actually used in Spring application
12731274
private val springInjectedClasses: Set<ClassId>
12741275
get() {
12751276
if (springInjectedClassesStorage.isEmpty()) {
1276-
springInjectedClassesStorage = beanQualifiedNames
1277+
springInjectedClassesStorage += beanQualifiedNames
12771278
.map { fqn -> utContext.classLoader.loadClass(fqn) }
12781279
.filterNot { it.isAbstract || it.isInterface || it.isLocalClass || it.isMemberClass && !it.isStatic }
12791280
.mapTo(mutableSetOf()) { it.id }
@@ -1282,7 +1283,9 @@ class SpringApplicationContext(
12821283
return springInjectedClassesStorage
12831284
}
12841285

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>()
12861289

12871290
override val typeReplacementMode: TypeReplacementMode
12881291
get() = if (shouldUseImplementors) KnownImplementor else NoImplementors

utbot-framework/src/main/kotlin/org/utbot/engine/Traverser.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2341,7 +2341,6 @@ class Traverser(
23412341
return createArray(addr, type, useConcreteType = false)
23422342
}
23432343

2344-
23452344
/**
23462345
* Creates an array with given [addr] and [type].
23472346
*

0 commit comments

Comments
 (0)