File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
src/main/kotlin/org/mybatis/dynamic/sql/util/kotlin Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ import org.mybatis.dynamic.sql.SqlBuilder
20
20
import org.mybatis.dynamic.sql.SqlColumn
21
21
import org.mybatis.dynamic.sql.select.SelectModel
22
22
import org.mybatis.dynamic.sql.util.Buildable
23
+ import java.lang.NullPointerException
23
24
24
25
@MyBatisDslMarker
25
26
sealed class KotlinBaseSubQueryBuilder : Buildable <SelectModel > {
@@ -40,7 +41,11 @@ sealed class KotlinBaseSubQueryBuilder : Buildable<SelectModel> {
40
41
}
41
42
42
43
override fun build (): SelectModel =
43
- selectBuilder?.build()? : throw KInvalidSQLException (" You must specify a select statement in a sub query" )
44
+ try {
45
+ selectBuilder!! .build()
46
+ } catch (e: NullPointerException ) {
47
+ throw KInvalidSQLException (" You must specify a select statement in a sub query" )
48
+ }
44
49
}
45
50
46
51
class KotlinSubQueryBuilder : KotlinBaseSubQueryBuilder ()
You can’t perform that action at this time.
0 commit comments