Use PsiField::computeConstantValue to avoid building AST
This commit is contained in:
+1
-1
@@ -44,7 +44,7 @@ public class JavaFieldImpl extends JavaMemberImpl<PsiField> implements JavaField
|
||||
@Nullable
|
||||
@Override
|
||||
public Object getInitializerValue() {
|
||||
return JavaConstantExpressionEvaluator.computeConstantExpression(getPsi().getInitializer(), false);
|
||||
return getPsi().computeConstantValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user