explicit no read access assert

This commit is contained in:
Maxim.Mossienko
2011-03-02 18:25:36 +03:00
parent 136c6b8305
commit d426fa86df
@@ -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