Skip to content
Merged
Prev Previous commit
Next Next commit
Improve adding of ReplacedFuzzedTypeFlag
  • Loading branch information
IlyaMuravjov committed Sep 19, 2023
commit beef34fbd9cf3cb5a0a89c973cf2919a89b561b0
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,12 @@ class SpringApplicationContextImpl(
.withFallback(origValueProvider)
.replaceTypes { description, type ->
typeReplacer.replaceTypeIfNeeded(type.classId)
?.takeIf { it != type.classId }
?.let { replacement ->
?.let { replacementClassId ->
// TODO infer generic type of replacement
toFuzzerType(replacement.jClass, description.typeCache).addProperties(
val replacement =
if (type.classId == replacementClassId) type
else toFuzzerType(replacementClassId.jClass, description.typeCache)
replacement.addProperties(
dynamicPropertiesOf(ReplacedFuzzedTypeFlag.withValue(Unit))
)
} ?: type
Expand Down