mirror of
https://github.com/usbharu/Hideout.git
synced 2026-08-06 04:54:38 +00:00
refactor: nullチェックをrequirenotnullに置換
This commit is contained in:
+1
-4
@@ -89,10 +89,7 @@ class APNoteServiceImpl(
|
|||||||
targetActor: String?,
|
targetActor: String?,
|
||||||
url: String
|
url: String
|
||||||
): Note {
|
): Note {
|
||||||
if (note.id == null) {
|
requireNotNull(note.id) { "id is null" }
|
||||||
throw IllegalArgumentException("id is null")
|
|
||||||
// return internalNote(note, targetActor, url)
|
|
||||||
}
|
|
||||||
|
|
||||||
return try {
|
return try {
|
||||||
noteQueryService.findByApid(note.id!!).first
|
noteQueryService.findByApid(note.id!!).first
|
||||||
|
|||||||
Reference in New Issue
Block a user