mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-09 14:26:11 +00:00
[kotlin][client] fix Android crash on API level 25 and bellow (#9578)
* [kotlin][client] fix Android crash on API level * [kotlin][client] update sample project * Try to fix CI * [kotlin][client] add flag to control android api level supported * [kotlin][client] update docs * [kotlin][client] update docs
This commit is contained in:
@@ -16,7 +16,6 @@ import java.io.File
|
||||
import java.io.BufferedWriter
|
||||
import java.io.FileWriter
|
||||
import java.net.URLConnection
|
||||
import java.nio.file.Files
|
||||
import java.util.Date
|
||||
import java.time.LocalDate
|
||||
import java.time.LocalDateTime
|
||||
@@ -119,7 +118,7 @@ open class ApiClient(val baseUrl: String) {
|
||||
}
|
||||
if (T::class.java == File::class.java) {
|
||||
// return tempfile
|
||||
val f = Files.createTempFile("tmp.org.openapitools.client", null).toFile()
|
||||
val f = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile()
|
||||
f.deleteOnExit()
|
||||
val out = BufferedWriter(FileWriter(f))
|
||||
out.write(bodyContent)
|
||||
|
||||
Reference in New Issue
Block a user