EA-37261: (code cleanup) PsiDocumentManager.getDocument() returns @Nullable value

This commit is contained in:
Oleg Sukhodolsky
2012-07-13 17:15:13 +04:00
parent e02bf8f82f
commit 5fd3191f60
2 changed files with 2 additions and 0 deletions
@@ -72,6 +72,7 @@ public abstract class PsiDocumentManager {
* @param file the file for which the document is requested.
* @return the document instance, or <code>null</code> if the file is binary or has no associated document.
*/
@Nullable
public abstract Document getDocument(@NotNull PsiFile file);
/**
@@ -203,6 +203,7 @@ public class PsiDocumentManagerImpl extends PsiDocumentManager implements Projec
return ((PsiManagerEx)myPsiManager).getFileManager().findFile(virtualFile);
}
@Nullable
@Override
public Document getDocument(@NotNull PsiFile file) {
if (file instanceof PsiBinaryFile) return null;