Fix UOE when using Java annotation with infinity/NaN as default value
The root problem is the fact that ConstantExpressionEvaluator returns
null for values such as infinity and NaN loaded from cls psi (see
IDEA-207252). This commit simply reverts a part of 8ab9226805 where we
started to compute default values more often than needed. In
LazyJavaClassMemberScope, we only need to check whether or not there
_is_ a default value, not compute its value.
#KT-29792 Fixed
This commit is contained in:
+6
@@ -69,6 +69,12 @@ public class JavaMethodImpl extends JavaMemberImpl<PsiMethod> implements JavaMet
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getHasAnnotationParameterDefaultValue() {
|
||||
PsiMethod psiMethod = getPsi();
|
||||
return psiMethod instanceof PsiAnnotationMethod && ((PsiAnnotationMethod) psiMethod).getDefaultValue() != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public JavaType getReturnType() {
|
||||
|
||||
Reference in New Issue
Block a user