File tree Expand file tree Collapse file tree 2 files changed +7
-10
lines changed
utbot-framework/src/main/kotlin/org/utbot/framework/context/spring Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -12,8 +12,6 @@ class SpringNonNullSpeculator(
12
12
private val springApplicationContext : SpringApplicationContext
13
13
) : NonNullSpeculator {
14
14
override fun speculativelyCannotProduceNullPointerException (field : SootField , classUnderTest : ClassId ): Boolean =
15
- // TODO add ` || delegateNonNullSpeculator.speculativelyCannotProduceNullPointerException(field, classUnderTest)`
16
- // (TODO is added as a part of only equivalent transformations refactoring PR and should be completed in the follow up PR)
17
15
field.fieldId in classUnderTest.allDeclaredFieldIds && field.type.classId !in springApplicationContext.allInjectedSuperTypes
18
-
16
+ || delegateNonNullSpeculator.speculativelyCannotProduceNullPointerException(field, classUnderTest)
19
17
}
Original file line number Diff line number Diff line change @@ -13,14 +13,13 @@ class SpringTypeReplacer(
13
13
private val springApplicationContext : SpringApplicationContext
14
14
) : TypeReplacer {
15
15
override val typeReplacementMode: TypeReplacementMode =
16
- // TODO add ` || delegateTypeReplacer.typeReplacementMode == TypeReplacementMode.KnownImplementor`
17
- // (TODO is added as a part of only equivalent transformations refactoring PR and should be completed in the follow up PR)
18
- if (springApplicationContext.beanDefinitions.isNotEmpty()) TypeReplacementMode .KnownImplementor
19
- else TypeReplacementMode .NoImplementors
16
+ if (springApplicationContext.beanDefinitions.isNotEmpty() ||
17
+ delegateTypeReplacer.typeReplacementMode == TypeReplacementMode .KnownImplementor )
18
+ TypeReplacementMode .KnownImplementor
19
+ else
20
+ TypeReplacementMode .NoImplementors
20
21
21
22
override fun replaceTypeIfNeeded (type : RefType ): ClassId ? =
22
- // TODO add `delegateTypeReplacer.replaceTypeIfNeeded(type) ?: `
23
- // (TODO is added as a part of only equivalent transformations refactoring PR and should be completed in the follow up PR)
24
23
if (type.isAbstractType) springApplicationContext.injectedTypes.singleOrNull { it.isSubtypeOf(type.id) }
25
- else null
24
+ else delegateTypeReplacer.replaceTypeIfNeeded(type)
26
25
}
You can’t perform that action at this time.
0 commit comments