style: スタイルを修正

This commit is contained in:
usbharu 2023-05-22 15:20:15 +09:00
parent cb2ee6ca3f
commit bfda7478ee
7 changed files with 9 additions and 28 deletions

View File

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

View File

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

View File

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

View File

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

View File

@ -1,10 +1,10 @@
package dev.usbharu.hideout.domain.model.ap
class ObjectValue : Object {
open class ObjectValue : Object {
var `object`: String? = null
protected constructor()
protected constructor() : super()
constructor(type: List<String>, name: String?, actor: String?, id: String?, `object`: String?) : super(
type,
name,
@ -28,9 +28,5 @@ class ObjectValue : Object {
return result
}
override fun toString(): String {
return "ObjectValue(`object`=$`object`) ${super.toString()}"
}
override fun toString(): String = "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 java.time.Instant
class Undo : Object {
open class Undo : Object {
@JsonDeserialize(using = ObjectDeserializer::class)
var `object`: Object? = null
var published: String? = null
protected constructor()
protected constructor() : super()
constructor(
type: List<String> = emptyList(),
name: String,
@ -38,9 +38,5 @@ class Undo : Object {
return result
}
override fun toString(): String {
return "Undo(`object`=$`object`, published=$published) ${super.toString()}"
}
override fun toString(): String = "Undo(`object`=$`object`, published=$published) ${super.toString()}"
}

View File

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