From 0f21042680d31758c8b81a68792358e9755d5125 Mon Sep 17 00:00:00 2001 From: perihelion1 <48521312+perihelion1@users.noreply.github.com> Date: Mon, 4 Nov 2019 19:41:18 +0000 Subject: [PATCH] Improve performance of Occurs constraint (#128) --- src/com/amazon/ionschema/internal/constraint/Occurs.kt | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/com/amazon/ionschema/internal/constraint/Occurs.kt b/src/com/amazon/ionschema/internal/constraint/Occurs.kt index ce57b06d..d1da4526 100644 --- a/src/com/amazon/ionschema/internal/constraint/Occurs.kt +++ b/src/com/amazon/ionschema/internal/constraint/Occurs.kt @@ -80,7 +80,6 @@ internal open class Occurs( private val typeReference: () -> TypeInternal private var attempts = 0 internal var validCount = 0 - private val values = ion.system.newEmptyList() init { var occurs: IonValue? = null @@ -121,8 +120,6 @@ internal open class Occurs( typeReference().validate(value, issues) validCount = attempts - issues.violations.size (issues as ViolationChild).addValue(value) - - values.add(value.clone()) } fun validateAttempts(issues: Violations) {