style: スタイルを修正

This commit is contained in:
usbharu 2023-05-22 15:20:15 +09:00
parent c8b7dd452a
commit 33b72e4c76
Signed by: usbharu
GPG Key ID: 6556747BF94EEBC8
7 changed files with 9 additions and 28 deletions

View File

@ -92,7 +92,7 @@ exceptions:
active: true active: true
NotImplementedDeclaration: NotImplementedDeclaration:
active: true active: false
ObjectExtendsThrowable: ObjectExtendsThrowable:
active: true active: true

View File

@ -20,10 +20,7 @@ open class Accept : Object {
this.`object` = `object` this.`object` = `object`
} }
override fun toString(): String = "Accept(`object`=$`object`) ${super.toString()}"
override fun toString(): String {
return "Accept(`object`=$`object`) ${super.toString()}"
}
override fun equals(other: Any?): Boolean { override fun equals(other: Any?): Boolean {
if (this === other) return true if (this === other) return true
@ -38,6 +35,4 @@ open class Accept : Object {
result = 31 * result + (`object`?.hashCode() ?: 0) result = 31 * result + (`object`?.hashCode() ?: 0)
return result return result
} }
} }

View File

@ -31,9 +31,5 @@ open class Follow : Object {
return result return result
} }
override fun toString(): String { override fun toString(): String = "Follow(`object`=$`object`) ${super.toString()}"
return "Follow(`object`=$`object`) ${super.toString()}"
}
} }

View File

@ -45,5 +45,4 @@ class ObjectDeserializer : JsonDeserializer<Object>() {
TODO() TODO()
} }
} }
} }

View File

@ -1,10 +1,10 @@
package dev.usbharu.hideout.domain.model.ap package dev.usbharu.hideout.domain.model.ap
class ObjectValue : Object { open class ObjectValue : Object {
var `object`: String? = null var `object`: String? = null
protected constructor() protected constructor() : super()
constructor(type: List<String>, name: String?, actor: String?, id: String?, `object`: String?) : super( constructor(type: List<String>, name: String?, actor: String?, id: String?, `object`: String?) : super(
type, type,
name, name,
@ -28,9 +28,5 @@ class ObjectValue : Object {
return result return result
} }
override fun toString(): String { override fun toString(): String = "ObjectValue(`object`=$`object`) ${super.toString()}"
return "ObjectValue(`object`=$`object`) ${super.toString()}"
}
} }

View File

@ -3,13 +3,13 @@ package dev.usbharu.hideout.domain.model.ap
import com.fasterxml.jackson.databind.annotation.JsonDeserialize import com.fasterxml.jackson.databind.annotation.JsonDeserialize
import java.time.Instant import java.time.Instant
class Undo : Object { open class Undo : Object {
@JsonDeserialize(using = ObjectDeserializer::class) @JsonDeserialize(using = ObjectDeserializer::class)
var `object`: Object? = null var `object`: Object? = null
var published: String? = null var published: String? = null
protected constructor() protected constructor() : super()
constructor( constructor(
type: List<String> = emptyList(), type: List<String> = emptyList(),
name: String, name: String,
@ -38,9 +38,5 @@ class Undo : Object {
return result return result
} }
override fun toString(): String { override fun toString(): String = "Undo(`object`=$`object`, published=$published) ${super.toString()}"
return "Undo(`object`=$`object`, published=$published) ${super.toString()}"
}
} }

View File

@ -14,7 +14,6 @@ class ActivityPubUndoServiceImpl(
private val activityPubUserService: ActivityPubUserService private val activityPubUserService: ActivityPubUserService
) : ActivityPubUndoService { ) : ActivityPubUndoService {
override suspend fun receiveUndo(undo: Undo): ActivityPubResponse { override suspend fun receiveUndo(undo: Undo): ActivityPubResponse {
if (undo.actor == null) { if (undo.actor == null) {
return ActivityPubStringResponse(HttpStatusCode.BadRequest, "actor is null") return ActivityPubStringResponse(HttpStatusCode.BadRequest, "actor is null")
} }