[#17465] Fix Kotlin templates to be compatible with Kotlin K2 compiler (#17466)

This commit is contained in:
Raphaël Ouazana 2023-12-26 03:09:28 +01:00 committed by GitHub
parent a4f1a17502
commit d0f659ec4d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 11 additions and 11 deletions

View File

@ -13,7 +13,7 @@ import java.util.Optional
class {{classname}}Controller( class {{classname}}Controller(
@org.springframework.beans.factory.annotation.Autowired(required = false) delegate: {{classname}}Delegate? @org.springframework.beans.factory.annotation.Autowired(required = false) delegate: {{classname}}Delegate?
) : {{classname}} { ) : {{classname}} {
private val delegate: {{classname}}Delegate private lateinit var delegate: {{classname}}Delegate
init { init {
this.delegate = Optional.ofNullable(delegate).orElse(object : {{classname}}Delegate {}) this.delegate = Optional.ofNullable(delegate).orElse(object : {{classname}}Delegate {})

View File

@ -20,7 +20,7 @@ import com.google.gson.Gson
{{/imports}} {{/imports}}
class {{classname}}VertxProxyHandler(private val vertx: Vertx, private val service: {{classname}}, topLevel: Boolean, private val timeoutSeconds: Long) : ProxyHandler() { class {{classname}}VertxProxyHandler(private val vertx: Vertx, private val service: {{classname}}, topLevel: Boolean, private val timeoutSeconds: Long) : ProxyHandler() {
private val timerID: Long private lateinit var timerID: Long
private var lastAccessed: Long = 0 private var lastAccessed: Long = 0
init { init {
try { try {

View File

@ -10,7 +10,7 @@ import java.util.Optional
class PetApiController( class PetApiController(
@org.springframework.beans.factory.annotation.Autowired(required = false) delegate: PetApiDelegate? @org.springframework.beans.factory.annotation.Autowired(required = false) delegate: PetApiDelegate?
) : PetApi { ) : PetApi {
private val delegate: PetApiDelegate private lateinit var delegate: PetApiDelegate
init { init {
this.delegate = Optional.ofNullable(delegate).orElse(object : PetApiDelegate {}) this.delegate = Optional.ofNullable(delegate).orElse(object : PetApiDelegate {})

View File

@ -10,7 +10,7 @@ import java.util.Optional
class StoreApiController( class StoreApiController(
@org.springframework.beans.factory.annotation.Autowired(required = false) delegate: StoreApiDelegate? @org.springframework.beans.factory.annotation.Autowired(required = false) delegate: StoreApiDelegate?
) : StoreApi { ) : StoreApi {
private val delegate: StoreApiDelegate private lateinit var delegate: StoreApiDelegate
init { init {
this.delegate = Optional.ofNullable(delegate).orElse(object : StoreApiDelegate {}) this.delegate = Optional.ofNullable(delegate).orElse(object : StoreApiDelegate {})

View File

@ -10,7 +10,7 @@ import java.util.Optional
class UserApiController( class UserApiController(
@org.springframework.beans.factory.annotation.Autowired(required = false) delegate: UserApiDelegate? @org.springframework.beans.factory.annotation.Autowired(required = false) delegate: UserApiDelegate?
) : UserApi { ) : UserApi {
private val delegate: UserApiDelegate private lateinit var delegate: UserApiDelegate
init { init {
this.delegate = Optional.ofNullable(delegate).orElse(object : UserApiDelegate {}) this.delegate = Optional.ofNullable(delegate).orElse(object : UserApiDelegate {})

View File

@ -20,7 +20,7 @@ import org.openapitools.server.api.model.ModelApiResponse
import org.openapitools.server.api.model.Pet import org.openapitools.server.api.model.Pet
class PetApiVertxProxyHandler(private val vertx: Vertx, private val service: PetApi, topLevel: Boolean, private val timeoutSeconds: Long) : ProxyHandler() { class PetApiVertxProxyHandler(private val vertx: Vertx, private val service: PetApi, topLevel: Boolean, private val timeoutSeconds: Long) : ProxyHandler() {
private val timerID: Long private lateinit var timerID: Long
private var lastAccessed: Long = 0 private var lastAccessed: Long = 0
init { init {
try { try {

View File

@ -19,7 +19,7 @@ import com.google.gson.Gson
import org.openapitools.server.api.model.Order import org.openapitools.server.api.model.Order
class StoreApiVertxProxyHandler(private val vertx: Vertx, private val service: StoreApi, topLevel: Boolean, private val timeoutSeconds: Long) : ProxyHandler() { class StoreApiVertxProxyHandler(private val vertx: Vertx, private val service: StoreApi, topLevel: Boolean, private val timeoutSeconds: Long) : ProxyHandler() {
private val timerID: Long private lateinit var timerID: Long
private var lastAccessed: Long = 0 private var lastAccessed: Long = 0
init { init {
try { try {

View File

@ -19,7 +19,7 @@ import com.google.gson.Gson
import org.openapitools.server.api.model.User import org.openapitools.server.api.model.User
class UserApiVertxProxyHandler(private val vertx: Vertx, private val service: UserApi, topLevel: Boolean, private val timeoutSeconds: Long) : ProxyHandler() { class UserApiVertxProxyHandler(private val vertx: Vertx, private val service: UserApi, topLevel: Boolean, private val timeoutSeconds: Long) : ProxyHandler() {
private val timerID: Long private lateinit var timerID: Long
private var lastAccessed: Long = 0 private var lastAccessed: Long = 0
init { init {
try { try {

View File

@ -20,7 +20,7 @@ import org.openapitools.server.api.model.ModelApiResponse
import org.openapitools.server.api.model.Pet import org.openapitools.server.api.model.Pet
class PetApiVertxProxyHandler(private val vertx: Vertx, private val service: PetApi, topLevel: Boolean, private val timeoutSeconds: Long) : ProxyHandler() { class PetApiVertxProxyHandler(private val vertx: Vertx, private val service: PetApi, topLevel: Boolean, private val timeoutSeconds: Long) : ProxyHandler() {
private val timerID: Long private lateinit var timerID: Long
private var lastAccessed: Long = 0 private var lastAccessed: Long = 0
init { init {
try { try {

View File

@ -19,7 +19,7 @@ import com.google.gson.Gson
import org.openapitools.server.api.model.Order import org.openapitools.server.api.model.Order
class StoreApiVertxProxyHandler(private val vertx: Vertx, private val service: StoreApi, topLevel: Boolean, private val timeoutSeconds: Long) : ProxyHandler() { class StoreApiVertxProxyHandler(private val vertx: Vertx, private val service: StoreApi, topLevel: Boolean, private val timeoutSeconds: Long) : ProxyHandler() {
private val timerID: Long private lateinit var timerID: Long
private var lastAccessed: Long = 0 private var lastAccessed: Long = 0
init { init {
try { try {

View File

@ -19,7 +19,7 @@ import com.google.gson.Gson
import org.openapitools.server.api.model.User import org.openapitools.server.api.model.User
class UserApiVertxProxyHandler(private val vertx: Vertx, private val service: UserApi, topLevel: Boolean, private val timeoutSeconds: Long) : ProxyHandler() { class UserApiVertxProxyHandler(private val vertx: Vertx, private val service: UserApi, topLevel: Boolean, private val timeoutSeconds: Long) : ProxyHandler() {
private val timerID: Long private lateinit var timerID: Long
private var lastAccessed: Long = 0 private var lastAccessed: Long = 0
init { init {
try { try {