From 4d6646e442b3422d346e7329a46b1e972b9f7d88 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sat, 28 Sep 2024 21:38:37 +0200 Subject: [PATCH] =?utf8?q?=F0=9F=91=BD=EF=B8=8F=20Use=20non-deprecated=20v?= =?utf8?q?ariant=20of=20@JvmDefault?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- build.gradle | 2 +- src/main/kotlin/net/pterodactylus/sone/notify/PostVisibilityFilter.kt | 2 +- src/main/kotlin/net/pterodactylus/sone/notify/ReplyVisibilityFilter.kt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index 17a35df..064b94f 100644 --- a/build.gradle +++ b/build.gradle @@ -27,7 +27,7 @@ tasks.withType(JavaCompile) { tasks.withType(KotlinCompile) { kotlinOptions { jvmTarget = "1.8" - freeCompilerArgs += '-Xjvm-default=enable' + freeCompilerArgs += '-Xjvm-default=all' } } diff --git a/src/main/kotlin/net/pterodactylus/sone/notify/PostVisibilityFilter.kt b/src/main/kotlin/net/pterodactylus/sone/notify/PostVisibilityFilter.kt index 36b6f89..1d5d4f9 100644 --- a/src/main/kotlin/net/pterodactylus/sone/notify/PostVisibilityFilter.kt +++ b/src/main/kotlin/net/pterodactylus/sone/notify/PostVisibilityFilter.kt @@ -5,11 +5,11 @@ import net.pterodactylus.sone.data.Post import net.pterodactylus.sone.data.Sone @ImplementedBy(DefaultPostVisibilityFilter::class) +@JvmDefaultWithoutCompatibility interface PostVisibilityFilter { fun isPostVisible(sone: Sone?, post: Post): Boolean - @JvmDefault fun isVisible(currentSone: Sone?) = { p: Post? -> p != null && isPostVisible(currentSone, p) } diff --git a/src/main/kotlin/net/pterodactylus/sone/notify/ReplyVisibilityFilter.kt b/src/main/kotlin/net/pterodactylus/sone/notify/ReplyVisibilityFilter.kt index e8a48cb..5b1f122 100644 --- a/src/main/kotlin/net/pterodactylus/sone/notify/ReplyVisibilityFilter.kt +++ b/src/main/kotlin/net/pterodactylus/sone/notify/ReplyVisibilityFilter.kt @@ -5,11 +5,11 @@ import net.pterodactylus.sone.data.PostReply import net.pterodactylus.sone.data.Sone @ImplementedBy(DefaultReplyVisibilityFilter::class) +@JvmDefaultWithoutCompatibility interface ReplyVisibilityFilter { fun isReplyVisible(sone: Sone?, reply: PostReply): Boolean - @JvmDefault fun isVisible(currentSone: Sone?) = { reply: PostReply -> isReplyVisible(currentSone, reply) } -- 2.7.4