From 34c7d8b39b45ba16690262f26aceb7a42fd684f0 Mon Sep 17 00:00:00 2001 From: Gauthier Roebroeck Date: Tue, 15 Jul 2025 12:22:45 +0800 Subject: [PATCH] refactor: fix types for new Kotlin compiler --- .../komga/interfaces/api/rest/AnnouncementController.kt | 2 +- .../org/gotson/komga/interfaces/api/rest/ReleaseController.kt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/AnnouncementController.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/AnnouncementController.kt index 16f6970bd..568af8488 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/AnnouncementController.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/AnnouncementController.kt @@ -36,7 +36,7 @@ class AnnouncementController( Caffeine .newBuilder() .expireAfterAccess(1, TimeUnit.DAYS) - .build() + .build() @GetMapping @PreAuthorize("hasRole('ADMIN')") diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/ReleaseController.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/ReleaseController.kt index 8d3d1bd26..966454317 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/ReleaseController.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/ReleaseController.kt @@ -58,7 +58,7 @@ class ReleaseController( } ?: throw ResponseStatusException(HttpStatus.NOT_FOUND) - fun fetchGitHubReleases(): List? { + fun fetchGitHubReleases(): List { val response = webClient .get() @@ -67,6 +67,6 @@ class ReleaseController( }.retrieve() .toEntity(object : ParameterizedTypeReference>() {}) .block() - return response?.body + return response?.body ?: emptyList() } }