From 91c18c4c64aaa5b7f7ac2ebabedfe828ec58bc67 Mon Sep 17 00:00:00 2001 From: usbharu <64310155+usbharu@users.noreply.github.com> Date: Thu, 12 Oct 2023 02:04:08 +0900 Subject: [PATCH] =?UTF-8?q?style:=20=E3=82=B9=E3=82=BF=E3=82=A4=E3=83=AB?= =?UTF-8?q?=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dev/usbharu/hideout/service/core/MdcXrequestIdFilter.kt | 2 +- .../kotlin/dev/usbharu/hideout/service/post/PostServiceImpl.kt | 2 +- .../kotlin/dev/usbharu/hideout/service/user/UserServiceImpl.kt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/dev/usbharu/hideout/service/core/MdcXrequestIdFilter.kt b/src/main/kotlin/dev/usbharu/hideout/service/core/MdcXrequestIdFilter.kt index d934449c..2ad64bd9 100644 --- a/src/main/kotlin/dev/usbharu/hideout/service/core/MdcXrequestIdFilter.kt +++ b/src/main/kotlin/dev/usbharu/hideout/service/core/MdcXrequestIdFilter.kt @@ -21,6 +21,6 @@ class MdcXrequestIdFilter : Filter { } companion object { - val KEY = "x-request-id" + private const val KEY = "x-request-id" } } diff --git a/src/main/kotlin/dev/usbharu/hideout/service/post/PostServiceImpl.kt b/src/main/kotlin/dev/usbharu/hideout/service/post/PostServiceImpl.kt index f4d36084..ac5e54c6 100644 --- a/src/main/kotlin/dev/usbharu/hideout/service/post/PostServiceImpl.kt +++ b/src/main/kotlin/dev/usbharu/hideout/service/post/PostServiceImpl.kt @@ -35,7 +35,7 @@ class PostServiceImpl( private suspend fun internalCreate(post: Post, isLocal: Boolean): Post { val save = try { postRepository.save(post) - } catch (e: ExposedSQLException) { + } catch (_: ExposedSQLException) { postQueryService.findByApId(post.apId) } timelineService.publishTimeline(save, isLocal) diff --git a/src/main/kotlin/dev/usbharu/hideout/service/user/UserServiceImpl.kt b/src/main/kotlin/dev/usbharu/hideout/service/user/UserServiceImpl.kt index 2af93ed6..0f865526 100644 --- a/src/main/kotlin/dev/usbharu/hideout/service/user/UserServiceImpl.kt +++ b/src/main/kotlin/dev/usbharu/hideout/service/user/UserServiceImpl.kt @@ -67,7 +67,7 @@ class UserServiceImpl( ) return try { userRepository.save(userEntity) - } catch (e: ExposedSQLException) { + } catch (_: ExposedSQLException) { userQueryService.findByUrl(user.url) } }