mirror of https://github.com/usbharu/Hideout.git
refactor: nullチェックをrequirenotnullに置換
This commit is contained in:
parent
64ca262343
commit
4a25c4290e
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue