diagnostics for IDEA-94551 assertion JavaPsiImplementationHelperImpl.java:142 running tests

This commit is contained in:
peter
2012-11-10 23:05:30 +01:00
parent 4e36b88b45
commit d92ec6bf10
@@ -139,7 +139,9 @@ public class JavaPsiImplementationHelperImpl extends JavaPsiImplementationHelper
final VirtualFile folder = virtualFile.getParent();
if (sourceRoot != null && folder != null) {
String relativePath = VfsUtilCore.getRelativePath(folder, sourceRoot, '/');
LOG.assertTrue(relativePath != null);
if (relativePath == null) {
throw new AssertionError("Null relative path: folder=" + folder + "; root=" + sourceRoot);
}
List<OrderEntry> orderEntries = index.getOrderEntriesForFile(virtualFile);
if (orderEntries.isEmpty()) {
LOG.error("Inconsistent: " + DirectoryIndex.getInstance(myProject).getInfoForDirectory(folder).toString());