diff --git a/CHANGELOG.md b/CHANGELOG.md index 04122d5f9..1ce1aa731 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,11 @@ This log will detail notable changes to MyBatis Dynamic SQL. Full details are av ## Release 1.5.2 - Unreleased -This is a small maintenance release with improvements to the Kotlin DSL for CASE expressions. +This is a small maintenance release with improvements to the Kotlin DSL for CASE expressions. We worked on this soon +after the 1.5.1 release, so wanted to get it out quickly. +See this PR for details: ([#785](https://github.com/mybatis/mybatis-dynamic-sql/pull/785)) + +GitHub milestone: [https://github.com/mybatis/mybatis-dynamic-sql/milestone/14?closed=1](https://github.com/mybatis/mybatis-dynamic-sql/milestone/14?closed=1) **Important:** This is the last release that will be compatible with Java 8. diff --git a/src/main/kotlin/org/mybatis/dynamic/sql/util/kotlin/elements/CaseDSLs.kt b/src/main/kotlin/org/mybatis/dynamic/sql/util/kotlin/elements/CaseDSLs.kt index 027b5b187..639a981fe 100644 --- a/src/main/kotlin/org/mybatis/dynamic/sql/util/kotlin/elements/CaseDSLs.kt +++ b/src/main/kotlin/org/mybatis/dynamic/sql/util/kotlin/elements/CaseDSLs.kt @@ -66,14 +66,10 @@ class KSimpleCaseDSL : KElseDSL { internal val whenConditions = mutableListOf>() fun `when`(vararg conditions: VisitableCondition) = - SimpleCaseThenGatherer { thenValue -> - whenConditions.add(ConditionBasedWhenCondition(conditions.asList(), thenValue)) - } + SimpleCaseThenGatherer { whenConditions.add(ConditionBasedWhenCondition(conditions.asList(), it)) } fun `when`(vararg values: T) = - SimpleCaseThenGatherer { thenValue -> - whenConditions.add(BasicWhenCondition(values.asList(), thenValue)) - } + SimpleCaseThenGatherer { whenConditions.add(BasicWhenCondition(values.asList(), it)) } override infix fun `else`(column: BasicColumn) { this.elseValue = column