mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
diagnostics for the NPE when cloning a PsiFile for completion
This commit is contained in:
@@ -385,6 +385,9 @@ public abstract class PsiFileImpl extends ElementBase implements PsiFileEx, PsiF
|
||||
protected PsiFileImpl clone() {
|
||||
FileViewProvider provider = getViewProvider().clone();
|
||||
final Language language = getLanguage();
|
||||
if (provider == null) {
|
||||
throw new AssertionError("Unable to clone the view provider: " + getViewProvider() + "; " + language);
|
||||
}
|
||||
PsiFileImpl clone = (PsiFileImpl)provider.getPsi(language);
|
||||
assert clone != null:"Cannot find psi file with language:"+language + " from viewprovider:"+provider+" virtual file:"+getVirtualFile();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user