From c0dc198a949cc1fd5897c6ce24125a80f3f8e2c6 Mon Sep 17 00:00:00 2001 From: Maxim Medvedev Date: Sun, 6 Mar 2011 21:13:08 +0300 Subject: [PATCH] IDEA-66069 Groovy: AssertionError at GrTypeParameterImpl.getOwner() on incorrect generic method definition --- .../groovy/lang/psi/impl/types/GrTypeParameterImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/groovy/src/org/jetbrains/plugins/groovy/lang/psi/impl/types/GrTypeParameterImpl.java b/plugins/groovy/src/org/jetbrains/plugins/groovy/lang/psi/impl/types/GrTypeParameterImpl.java index 3d4bc5692344..f1a372122fa5 100644 --- a/plugins/groovy/src/org/jetbrains/plugins/groovy/lang/psi/impl/types/GrTypeParameterImpl.java +++ b/plugins/groovy/src/org/jetbrains/plugins/groovy/lang/psi/impl/types/GrTypeParameterImpl.java @@ -313,8 +313,8 @@ public class GrTypeParameterImpl extends GrStubElementBase final PsiElement parent = getParent(); if (parent == null) throw new PsiInvalidElementAccessException(this); final PsiElement parentParent = parent.getParent(); - if (parentParent != null && !(parentParent instanceof PsiTypeParameterListOwner)) { - throw new AssertionError("CCE: " + parentParent); + if (!(parentParent instanceof PsiTypeParameterListOwner)) { + return null; } return (PsiTypeParameterListOwner)parentParent; }