Skip to content

Commit

Permalink
Improve performance of Occurs constraint (#128)
Browse files Browse the repository at this point in the history
  • Loading branch information
perihelion1 authored and Peter Cornell committed Nov 4, 2019
1 parent 13dd8aa commit 0f21042
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/com/amazon/ionschema/internal/constraint/Occurs.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 0f21042

Please sign in to comment.