Skip to content

Commit 2ec09c4

Browse files
authored
Merge pull request #789 from jeffgbutler/polishing
Kotlin Polishing
2 parents 97db065 + 82d0880 commit 2ec09c4

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ This log will detail notable changes to MyBatis Dynamic SQL. Full details are av
44

55
## Release 1.5.2 - Unreleased
66

7-
This is a small maintenance release with improvements to the Kotlin DSL for CASE expressions.
7+
This is a small maintenance release with improvements to the Kotlin DSL for CASE expressions. We worked on this soon
8+
after the 1.5.1 release, so wanted to get it out quickly.
9+
See this PR for details: ([#785](https://github.com/mybatis/mybatis-dynamic-sql/pull/785))
10+
11+
GitHub milestone: [https://github.com/mybatis/mybatis-dynamic-sql/milestone/14?closed=1](https://github.com/mybatis/mybatis-dynamic-sql/milestone/14?closed=1)
812

913
**Important:** This is the last release that will be compatible with Java 8.
1014

src/main/kotlin/org/mybatis/dynamic/sql/util/kotlin/elements/CaseDSLs.kt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,10 @@ class KSimpleCaseDSL<T : Any> : KElseDSL {
6666
internal val whenConditions = mutableListOf<SimpleCaseWhenCondition<T>>()
6767

6868
fun `when`(vararg conditions: VisitableCondition<T>) =
69-
SimpleCaseThenGatherer { thenValue ->
70-
whenConditions.add(ConditionBasedWhenCondition(conditions.asList(), thenValue))
71-
}
69+
SimpleCaseThenGatherer { whenConditions.add(ConditionBasedWhenCondition(conditions.asList(), it)) }
7270

7371
fun `when`(vararg values: T) =
74-
SimpleCaseThenGatherer { thenValue ->
75-
whenConditions.add(BasicWhenCondition(values.asList(), thenValue))
76-
}
72+
SimpleCaseThenGatherer { whenConditions.add(BasicWhenCondition(values.asList(), it)) }
7773

7874
override infix fun `else`(column: BasicColumn) {
7975
this.elseValue = column

0 commit comments

Comments
 (0)