Skip to content
This repository was archived by the owner on May 15, 2024. It is now read-only.

Commit d77b3c7

Browse files
committed
fix code style
1 parent 428fafc commit d77b3c7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ktorm-ksp-codegen/src/main/kotlin/org/ktorm/ksp/codegen/DefaultTableCodeGenerator.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,14 +247,14 @@ public class DefaultTableFunctionGenerator : TableFunctionGenerator {
247247
if (nonConstructorParameterNames.isEmpty()) {
248248
addStatement("return constructor.callBy(parameterMap)", table.entityClassName)
249249
} else {
250-
addStatement("val instance = constructor.callBy(parameterMap)", table.entityClassName)
250+
addStatement("val entity = constructor.callBy(parameterMap)", table.entityClassName)
251251
}
252252
} else {
253253
// Create instance with code when construct has no default value parameter
254254
if (nonConstructorParameterNames.isEmpty()) {
255255
addStatement(" return·%T(", table.entityClassName)
256256
} else {
257-
addStatement("val instance = %T(", table.entityClassName)
257+
addStatement("val·entity·=·%T(", table.entityClassName)
258258
}
259259
logger.info("constructorParameter:${constructorParameters.map { it.name!!.asString() }}")
260260
withIndent {
@@ -291,14 +291,14 @@ public class DefaultTableFunctionGenerator : TableFunctionGenerator {
291291
}
292292
val notNullOperator = if (column.isNullable) "" else "!!"
293293
addStatement(
294-
"instance.%L·=·%L[%M]%L",
294+
"entity.%L·=·%L[%M]%L",
295295
property,
296296
row,
297297
column.tablePropertyName,
298298
notNullOperator
299299
)
300300
}
301-
addStatement("return instance")
301+
addStatement("return·entity")
302302
}
303303
})
304304
.build()

0 commit comments

Comments
 (0)