From c54eb20ed6556dd307f854499f1326cceb08edf0 Mon Sep 17 00:00:00 2001 From: Joe Date: Mon, 25 Sep 2023 02:35:13 +0100 Subject: [PATCH] Use AnnotationUtil.findAnnotation --- .../translations/identification/TranslationIdentifier.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/translations/identification/TranslationIdentifier.kt b/src/main/kotlin/translations/identification/TranslationIdentifier.kt index 883504fe5..23a7931a8 100644 --- a/src/main/kotlin/translations/identification/TranslationIdentifier.kt +++ b/src/main/kotlin/translations/identification/TranslationIdentifier.kt @@ -28,6 +28,7 @@ import com.demonwav.mcdev.util.constantStringValue import com.demonwav.mcdev.util.constantValue import com.demonwav.mcdev.util.extractVarArgs import com.demonwav.mcdev.util.referencedMethod +import com.intellij.codeInsight.AnnotationUtil import com.intellij.codeInspection.dataFlow.CommonDataflow import com.intellij.openapi.project.Project import com.intellij.psi.CommonClassNames @@ -68,7 +69,7 @@ abstract class TranslationIdentifier { val method = call.referencedMethod ?: return null val parameter = method.parameterList.getParameter(index) ?: return null - val translatableAnnotation = parameter.getAnnotation(TranslationConstants.TRANSLATABLE_ANNOTATION) + val translatableAnnotation = AnnotationUtil.findAnnotation(parameter, TranslationConstants.TRANSLATABLE_ANNOTATION) ?: return null val prefix =