mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[java-i18n] Fix parameter index search
EA-262185 - AE: ClsParameterListImpl.getParameterIndex GitOrigin-RevId: 2ec0cf96807d0a875cef8d3445701ca3d733c442
This commit is contained in:
committed by
intellij-monorepo-bot
parent
e74cab5810
commit
e8a35c538f
@@ -86,9 +86,10 @@ final class AnnotationContext {
|
||||
}
|
||||
if (owner instanceof PsiParameter) {
|
||||
PsiParameter parameter = (PsiParameter)owner;
|
||||
PsiMethod method = ObjectUtils.tryCast(parameter.getDeclarationScope(), PsiMethod.class);
|
||||
if (method != null) {
|
||||
int index = method.getParameterList().getParameterIndex(parameter);
|
||||
PsiParameterList parameterList = ObjectUtils.tryCast(parameter.getParent(), PsiParameterList.class);
|
||||
PsiMethod method = parameterList == null ? null : ObjectUtils.tryCast(parameterList.getParent(), PsiMethod.class);
|
||||
if (parameterList != null && method != null) {
|
||||
int index = parameterList.getParameterIndex(parameter);
|
||||
if (index >= 0) {
|
||||
Supplier<Stream<PsiModifierListOwner>> supplier = () -> {
|
||||
HashSet<PsiMethod> visited = new HashSet<>();
|
||||
|
||||
Reference in New Issue
Block a user