Skip to content

Commit d37fdff

Browse files
Do not substitute static fields from library classes with unbounded symbolic variables
1 parent 90aca22 commit d37fdff

File tree

1 file changed

+3
-2
lines changed
  • utbot-framework/src/main/kotlin/org/utbot/engine

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3328,10 +3328,11 @@ class Traverser(
33283328
val updatedFields = staticFieldsUpdates.mapTo(mutableSetOf()) { it.fieldId }
33293329
val objectUpdates = mutableListOf<UtNamedStore>()
33303330

3331-
// we assign unbounded symbolic variables for every non-final field of the class
3331+
// we assign unbounded symbolic variables for every non-final meaningful field of the class
3332+
// fields from predefined library classes are excluded, because there are not meaningful
33323333
typeResolver
33333334
.findFields(declaringClass.type)
3334-
.filter { !it.isFinal && it.fieldId in updatedFields }
3335+
.filter { !it.isFinal && it.fieldId in updatedFields && isStaticFieldMeaningful(it) }
33353336
.forEach {
33363337
// remove updates from clinit, because we'll replace those values
33373338
// with new unbounded symbolic variable

0 commit comments

Comments
 (0)