diff --git a/src/main/kotlin/dev/usbharu/hideout/activitypub/domain/model/Delete.kt b/src/main/kotlin/dev/usbharu/hideout/activitypub/domain/model/Delete.kt index f2142722..6f691492 100644 --- a/src/main/kotlin/dev/usbharu/hideout/activitypub/domain/model/Delete.kt +++ b/src/main/kotlin/dev/usbharu/hideout/activitypub/domain/model/Delete.kt @@ -43,8 +43,8 @@ open class Delete : Object, HasId, HasActor { override fun hashCode(): Int { var result = super.hashCode() - result = 31 * result + (apObject?.hashCode() ?: 0) - result = 31 * result + (published?.hashCode() ?: 0) + result = 31 * result + apObject.hashCode() + result = 31 * result + published.hashCode() result = 31 * result + actor.hashCode() result = 31 * result + id.hashCode() return result diff --git a/src/main/kotlin/dev/usbharu/hideout/activitypub/domain/model/Undo.kt b/src/main/kotlin/dev/usbharu/hideout/activitypub/domain/model/Undo.kt index d02ccc4d..01dbc17c 100644 --- a/src/main/kotlin/dev/usbharu/hideout/activitypub/domain/model/Undo.kt +++ b/src/main/kotlin/dev/usbharu/hideout/activitypub/domain/model/Undo.kt @@ -30,14 +30,13 @@ open class Undo( override fun hashCode(): Int { var result = super.hashCode() - result = 31 * result + (`object`?.hashCode() ?: 0) - result = 31 * result + (published?.hashCode() ?: 0) + result = 31 * result + `object`.hashCode() + result = 31 * result + published.hashCode() result = 31 * result + actor.hashCode() result = 31 * result + id.hashCode() return result } - override fun toString(): String { - return "Undo(`object`=$`object`, published=$published, actor='$actor', id='$id') ${super.toString()}" - } + override fun toString(): String = + "Undo(`object`=$`object`, published=$published, actor='$actor', id='$id') ${super.toString()}" } diff --git a/src/main/kotlin/dev/usbharu/hideout/application/config/SecurityConfig.kt b/src/main/kotlin/dev/usbharu/hideout/application/config/SecurityConfig.kt index 499e68dd..9801c6da 100644 --- a/src/main/kotlin/dev/usbharu/hideout/application/config/SecurityConfig.kt +++ b/src/main/kotlin/dev/usbharu/hideout/application/config/SecurityConfig.kt @@ -6,7 +6,6 @@ import com.nimbusds.jose.jwk.RSAKey import com.nimbusds.jose.jwk.source.ImmutableJWKSet import com.nimbusds.jose.jwk.source.JWKSource import com.nimbusds.jose.proc.SecurityContext -import dev.usbharu.hideout.activitypub.service.objects.user.APUserService import dev.usbharu.hideout.application.external.Transaction import dev.usbharu.hideout.core.infrastructure.springframework.httpsignature.HttpSignatureFilter import dev.usbharu.hideout.core.infrastructure.springframework.httpsignature.HttpSignatureUserDetailsService @@ -116,9 +115,6 @@ class SecurityConfig { @Bean fun getHttpSignatureFilter( authenticationManager: AuthenticationManager, - transaction: Transaction, - apUserService: APUserService, - userQueryService: UserQueryService ): HttpSignatureFilter { val httpSignatureFilter = HttpSignatureFilter(DefaultSignatureHeaderParser()) diff --git a/src/main/kotlin/dev/usbharu/hideout/core/domain/model/instance/Nodeinfo2_0.kt b/src/main/kotlin/dev/usbharu/hideout/core/domain/model/instance/Nodeinfo2_0.kt index 98247150..97478228 100644 --- a/src/main/kotlin/dev/usbharu/hideout/core/domain/model/instance/Nodeinfo2_0.kt +++ b/src/main/kotlin/dev/usbharu/hideout/core/domain/model/instance/Nodeinfo2_0.kt @@ -3,17 +3,17 @@ package dev.usbharu.hideout.core.domain.model.instance @Suppress("ClassNaming") -class Nodeinfo2_0() { +class Nodeinfo2_0 { var metadata: Metadata? = null var software: Software? = null } -class Metadata() { +class Metadata { var nodeName: String? = null var nodeDescription: String? = null } -class Software() { +class Software { var name: String? = null var version: String? = null }