History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEA-14937
Type: Bug Bug
Status: Open Open
Assignee: Maxim Shafirov
Reporter: Keith Lea
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
IDEA: Feedback

Exception in FileManagerImpl.findDirectory when calling PsiPackageImpl.getDirectories

Created: 14 Sep 07 00:22   Updated: 20 Sep 07 21:41
Component/s: Plugin Support. API

Build: 6,180
Severity: Medium


 Description  « Hide
This test used to pass... It creates some files in parallel source roots which are in the same package, then deletes one of the folders...

java.lang.AssertionError: File is not valid:sub
at com.intellij.testFramework.LoggedErrorProcessor$1.processError(LoggedErrorProcessor.java:4)
at com.intellij.testFramework.TestLogger.error(TestLogger.java:13)
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:48)
at com.intellij.psi.impl.file.impl.FileManagerImpl.findDirectory(FileManagerImpl.java:156)
at com.intellij.psi.impl.PsiManagerImpl.findDirectory(PsiManagerImpl.java:396)
at com.intellij.psi.impl.file.PsiPackageImpl$DirectoriesSearch$1$1.process(PsiPackageImpl.java:5)
at com.intellij.psi.impl.file.PsiPackageImpl$DirectoriesSearch$1$1.process(PsiPackageImpl.java)
at com.intellij.openapi.roots.impl.DirectoryIndexImpl$PackageSink$1.execute(DirectoryIndexImpl.java:1)
at com.intellij.openapi.roots.impl.DirectoryIndexImpl$PackageSink$1.execute(DirectoryIndexImpl.java)
at com.intellij.util.ExecutorsQuery.forEach(ExecutorsQuery.java:59)
at com.intellij.psi.impl.file.PsiPackageImpl$DirectoriesSearch$1.execute(PsiPackageImpl.java:2)
at com.intellij.psi.impl.file.PsiPackageImpl$DirectoriesSearch$1.execute(PsiPackageImpl.java:3)
at com.intellij.util.ExecutorsQuery.forEach(ExecutorsQuery.java:59)
at com.intellij.util.ExecutorsQuery.findAll(ExecutorsQuery.java:36)
at com.intellij.util.ExecutorsQuery.toArray(ExecutorsQuery.java:76)
at com.intellij.psi.impl.file.PsiPackageImpl.getDirectories(PsiPackageImpl.java:124)

[[ plugin code ]]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at com.intellij.testFramework.IdeaTestCase.access$201(IdeaTestCase.java:177)
at com.intellij.testFramework.IdeaTestCase$6.run(IdeaTestCase.java:8)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:382)
at com.intellij.testFramework.IdeaTestCase$7.run(IdeaTestCase.java:4)
at com.intellij.testFramework.IdeaTestCase.invokeTestRunnable(IdeaTestCase.java:196)
at com.intellij.testFramework.IdeaTestCase.runTest(IdeaTestCase.java:75)
at com.intellij.testFramework.IdeaTestCase$5.run(IdeaTestCase.java:14)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

Here's the test, so you can get an idea of what it does:

public void testDeleteParallelFolder() throws IOException {
    VirtualFile subpkg1 = createFolder(pkg1, "sub");
    final VirtualFile subpkg2 = createFolder(pkg2, "sub");
    addSourceFolder(content1, java1);
    addSourceFolder(content2, java2);
    assertOneParallelFolder(subpkg1, subpkg2);
    cache.assertWasCalledAndClear();
    assertOneParallelFolder(subpkg2, subpkg1);
    cache.assertWasCalledAndClear();
    ApplicationManager.getApplication().runWriteAction(new Runnable() {
      public void run() {
        try {
          subpkg2.delete(null);
        } catch (IOException e) {
          throw new IllegalStateException(e);
        }
      }
    });
    assertNoParallelFolders(subpkg1);
    cache.assertWasCalledAndClear();
    assertNoParallelFolders(subpkg1);
    cache.assertWasNotCalled();
  }


 All   Comments   Work Log   Change History      Sort Order:
Maxim Shafirov - 19 Sep 07 22:56
Are you guys going to migrate to Selena?

Keith Lea - 20 Sep 07 21:41
I plan to stop supporting 6.x when 7.x is stable. We have many developers testing both M1 and M2 in the meantime.