From d92ec6bf100d014d2983a1fcfe73a98ed2ed0253 Mon Sep 17 00:00:00 2001 From: peter Date: Sat, 10 Nov 2012 10:14:45 +0100 Subject: [PATCH] diagnostics for IDEA-94551 assertion JavaPsiImplementationHelperImpl.java:142 running tests --- .../intellij/psi/impl/JavaPsiImplementationHelperImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/java/java-impl/src/com/intellij/psi/impl/JavaPsiImplementationHelperImpl.java b/java/java-impl/src/com/intellij/psi/impl/JavaPsiImplementationHelperImpl.java index 993e71917652..8b30b996bfe2 100644 --- a/java/java-impl/src/com/intellij/psi/impl/JavaPsiImplementationHelperImpl.java +++ b/java/java-impl/src/com/intellij/psi/impl/JavaPsiImplementationHelperImpl.java @@ -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 orderEntries = index.getOrderEntriesForFile(virtualFile); if (orderEntries.isEmpty()) { LOG.error("Inconsistent: " + DirectoryIndex.getInstance(myProject).getInfoForDirectory(folder).toString());