cleanup JavaAnnotationIndex

GitOrigin-RevId: 3c83d50d85a84170edda2fd2bed4da081c0dda88
This commit is contained in:
Max Medvedev
2025-08-24 15:03:32 +00:00
committed by intellij-monorepo-bot
parent ec217aef02
commit 4c60ff4437
@@ -1,4 +1,4 @@
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.psi.impl.java.stubs.index;
import com.intellij.openapi.project.Project;
@@ -33,7 +33,11 @@ public final class JavaAnnotationIndex extends StringStubIndexExtension<PsiAnnot
return getAnnotations(s, project, scope);
}
public Collection<PsiAnnotation> getAnnotations(final @NotNull String s, final @NotNull Project project, final @NotNull GlobalSearchScope scope) {
return StubIndex.getElements(getKey(), s, project, new JavaSourceFilterScope(scope), PsiAnnotation.class);
public Collection<PsiAnnotation> getAnnotations(
@NotNull String shortName,
@NotNull Project project,
@NotNull GlobalSearchScope scope
) {
return StubIndex.getElements(getKey(), shortName, project, new JavaSourceFilterScope(scope), PsiAnnotation.class);
}
}