mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
explicit no read access assert
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
package com.intellij.openapi.fileTypes.impl;
|
||||
|
||||
import com.intellij.ide.FileIconProvider;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.SystemInfo;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
@@ -68,6 +69,7 @@ public class NativeFileIconProvider implements FileIconProvider {
|
||||
}
|
||||
Icon icon;
|
||||
try { // VM will ensure lock to init -static final field--, note we should have no read access here, to avoid deadlock with EDT needed to init component
|
||||
assert !ApplicationManager.getApplication().isReadAccessAllowed();
|
||||
icon = SwingComponentHolder.ourFileChooser.getIcon(f);
|
||||
}
|
||||
catch (Exception e) { // see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4854174
|
||||
|
||||
Reference in New Issue
Block a user