From 0a6eb487d13e03d1b13c4099c6e4c6f03f1a7255 Mon Sep 17 00:00:00 2001 From: Bart van Helvert Date: Sun, 19 Jan 2025 00:33:40 +0100 Subject: [PATCH] Fix broken property key GitOrigin-RevId: d6637b139efa8dde3075a295a71ec63f9a6ea6bf --- .../messages/JavaPsiBundle.properties | 1 - .../checkers/FieldAnnotationChecker.java | 20 +++---------------- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/java/java-frontback-psi-api/resources/messages/JavaPsiBundle.properties b/java/java-frontback-psi-api/resources/messages/JavaPsiBundle.properties index 430e944b1fe6..523582411e17 100644 --- a/java/java-frontback-psi-api/resources/messages/JavaPsiBundle.properties +++ b/java/java-frontback-psi-api/resources/messages/JavaPsiBundle.properties @@ -300,7 +300,6 @@ annotation.target.ANNOTATION_TYPE=annotation type annotation.target.CONSTRUCTOR=constructor # suppress inspection "UnusedProperty" annotation.target.FIELD=field -# suppress inspection "UnusedProperty" annotation.target.LOCAL_VARIABLE=local variable # suppress inspection "UnusedProperty" annotation.target.METHOD=method diff --git a/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/annotator/checkers/FieldAnnotationChecker.java b/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/annotator/checkers/FieldAnnotationChecker.java index 73a2372c0968..a43c8d8615e1 100644 --- a/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/annotator/checkers/FieldAnnotationChecker.java +++ b/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/annotator/checkers/FieldAnnotationChecker.java @@ -1,22 +1,8 @@ -/* - * Copyright 2000-2016 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package org.jetbrains.plugins.groovy.annotator.checkers; import com.intellij.codeInsight.daemon.JavaErrorBundle; -import com.intellij.java.analysis.JavaAnalysisBundle; +import com.intellij.core.JavaPsiBundle; import com.intellij.lang.annotation.AnnotationHolder; import com.intellij.lang.annotation.HighlightSeverity; import com.intellij.psi.PsiAnnotation; @@ -60,7 +46,7 @@ public final class FieldAnnotationChecker extends CustomAnnotationChecker { if (!GrAnnotationImpl.isAnnotationApplicableTo(annotation, PsiAnnotation.TargetType.LOCAL_VARIABLE)) { GrCodeReferenceElement ref = annotation.getClassReference(); - String target = JavaAnalysisBundle.message("annotation.target.LOCAL_VARIABLE"); + String target = JavaPsiBundle.message("annotation.target.LOCAL_VARIABLE"); String description = JavaErrorBundle.message("annotation.not.applicable", ref.getText(), target); holder.newAnnotation(HighlightSeverity.ERROR, description).range(ref).create(); }