refine PsiField.getName() notnullness to avoid a lot of yellow code and fix redundant code in clients

GitOrigin-RevId: b9c9437b83e7ac8266b87b635757b9ca067041b4
This commit is contained in:
Alexey Kudravtsev
2019-10-14 12:48:21 +03:00
committed by intellij-monorepo-bot
parent e5837e0268
commit 97102f4588
37 changed files with 27 additions and 59 deletions

View File

@@ -61,10 +61,7 @@ public class PsiFieldTreeElement extends JavaClassTreeElementBase<PsiField> impl
public String getAlphaSortKey() {
final PsiField field = getElement();
if (field != null) {
String name = field.getName();
if (name != null) {
return name;
}
return field.getName();
}
return "";
}