use VfsUtilCore.toVirtualFileArray in LocalSearchScope constructor
authorpeter <peter@jetbrains.com>
Mon, 2 May 2016 16:10:38 +0000 (18:10 +0200)
committerpeter <peter@jetbrains.com>
Mon, 2 May 2016 16:20:23 +0000 (18:20 +0200)
platform/core-api/src/com/intellij/psi/search/LocalSearchScope.java

index faa50784dcd5724de54ba7600f7dc1f8eead1594..42c3e9ea995a168a86b85234e34ac28d761c2248 100644 (file)
@@ -19,6 +19,7 @@ import com.intellij.openapi.diagnostic.Logger;
 import com.intellij.openapi.project.Project;
 import com.intellij.openapi.util.Comparing;
 import com.intellij.openapi.util.TextRange;
+import com.intellij.openapi.vfs.VfsUtilCore;
 import com.intellij.openapi.vfs.VirtualFile;
 import com.intellij.psi.PsiElement;
 import com.intellij.psi.PsiFile;
@@ -87,7 +88,7 @@ public class LocalSearchScope extends SearchScope {
       }
     }
     myScope = PsiUtilCore.toPsiElementArray(localScope);
-    myVirtualFiles = virtualFiles.isEmpty() ? VirtualFile.EMPTY_ARRAY : virtualFiles.toArray(VirtualFile.EMPTY_ARRAY);
+    myVirtualFiles = VfsUtilCore.toVirtualFileArray(virtualFiles);
   }
 
   public boolean isIgnoreInjectedPsi() {