EA-98262 - IAE: VfsUtilCore.getRelativePath

This commit is contained in:
Anna.Kozlova
2017-03-13 17:18:18 +01:00
parent 0953c36bb5
commit 03011ff292
@@ -66,7 +66,7 @@ public class TestLocationDataRule implements GetDataRule {
if (fileIndex.isInContent(file) && !fileIndex.isInSource(file) && !fileIndex.isInLibraryClasses(file)) {
final VirtualFile parent = file.getParent();
final VirtualFile contentRoot = fileIndex.getContentRootForFile(file);
if (contentRoot != null) {
if (contentRoot != null && parent != null) {
final String relativePath = VfsUtilCore.getRelativePath(parent, contentRoot, '/');
if (relativePath != null) {
final PsiSearchHelper searchHelper = PsiSearchHelper.SERVICE.getInstance(project);