mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[java-impl] getClassPresentableName: avoid returning null
GitOrigin-RevId: 07e66efcf905b8d55d34a954c87a100dd6c54636
This commit is contained in:
committed by
intellij-monorepo-bot
parent
e2c7ac2978
commit
c8e020b146
+5
-2
@@ -361,10 +361,13 @@ public final class GlobalJavaInspectionContextImpl extends GlobalJavaInspectionC
|
||||
}
|
||||
}
|
||||
|
||||
private static String getClassPresentableName(@NotNull UClass uClass) {
|
||||
private static @NotNull String getClassPresentableName(@NotNull UClass uClass) {
|
||||
return ReadAction.compute(() -> {
|
||||
String qualifiedName = uClass.getQualifiedName();
|
||||
return qualifiedName != null ? qualifiedName : uClass.getName();
|
||||
if (qualifiedName != null) {
|
||||
return qualifiedName;
|
||||
}
|
||||
return Objects.requireNonNullElse(uClass.getName(), "anonymous class");
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user