Skip to content

Commit 5df041f

Browse files
committed
Little cleanup
1 parent 00ef9a5 commit 5df041f

File tree

2 files changed

+5
-5
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
-5
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1200,6 +1200,7 @@ class SpringApplicationContext(
12001200
val beanQualifiedNames: List<String> = emptyList(),
12011201
val shouldUseImplementors: Boolean,
12021202
): ApplicationContext(mockInstalled, staticsMockingIsConfigured) {
1203+
12031204
private val springInjectedClasses: List<ClassId> by lazy {
12041205
beanQualifiedNames
12051206
.map { fqn -> utContext.classLoader.loadClass(fqn) }

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1481,12 +1481,11 @@ class Traverser(
14811481
return it
14821482
}
14831483

1484-
// In Spring application we may rely on concrete types only
1485-
// if this type is obtained from bean definitions,
1486-
// this has already been checked in
1487-
val allowsConcreteTypes = applicationContext !is SpringApplicationContext
1484+
// In Spring application we may rely on concrete types obtained from bean definitions only,
1485+
// and this potential replacement has already been suggested in the beginning of the method
1486+
val useConcreteTypes = applicationContext !is SpringApplicationContext
14881487

1489-
if (allowsConcreteTypes && typeStorage.possibleConcreteTypes.any()) {
1488+
if (useConcreteTypes && typeStorage.possibleConcreteTypes.any()) {
14901489
// If we have this$0 with UtArrayList type, we have to create such instance.
14911490
// We should create an object with typeStorage of all possible real types and concrete implementation
14921491
// Otherwise we'd have either a wrong type in the resolver, or missing method like 'preconditionCheck'.

0 commit comments

Comments
 (0)