mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
content entry editor: fast fail if getModel returns null (investigating EA-89693 - NPE: ContentEntryEditor.isExcludedOrUnderExcludedDirectory) (IDEA-CR-14528)
This commit is contained in:
+4
-1
@@ -289,7 +289,10 @@ public abstract class ContentEntryEditor implements ContentRootPanel.ActionCallb
|
||||
|
||||
public boolean isExcludedOrUnderExcludedDirectory(@NotNull VirtualFile file) {
|
||||
ModifiableRootModel model = getModel();
|
||||
Project project = model != null ? model.getProject() : null;
|
||||
if (model == null) {
|
||||
throw new AssertionError(getClass() + ".getModel() returned null unexpectedly");
|
||||
}
|
||||
Project project = model.getProject();
|
||||
ContentEntry contentEntry = getContentEntry();
|
||||
if (contentEntry == null) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user