Skip to content

Commit

Permalink
Improve adding of ReplacedFuzzedTypeFlag
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyaMuravjov committed Aug 29, 2023
1 parent 775db7b commit 1ba7d74
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,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

0 comments on commit 1ba7d74

Please sign in to comment.