revert redundant Project argument since getFilesToSearchInPsi() is accessed only...
authorDmitry Batkovich <dmitry.batkovich@jetbrains.com>
Mon, 24 Oct 2016 14:54:08 +0000 (17:54 +0300)
committerDmitry Batkovich <dmitry.batkovich@jetbrains.com>
Mon, 24 Oct 2016 14:54:33 +0000 (17:54 +0300)
java/java-indexing-impl/src/com/intellij/psi/impl/search/JavaFunctionalExpressionSearcher.java
java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/FindFunctionalInterfaceTest.java

index b23e14b0fb01a9249f68022ab57e29c01aa17ebc..a5cec558ce32a3ef430076081db035ea74c9f23f 100644 (file)
@@ -99,9 +99,9 @@ public class JavaFunctionalExpressionSearcher extends QueryExecutorBase<PsiFunct
   }
 
   @TestOnly
-  public static Set<VirtualFile> getFilesToSearchInPsi(PsiClass samClass, Project project) {
+  public static Set<VirtualFile> getFilesToSearchInPsi(PsiClass samClass) {
     Set<VirtualFile> result = new HashSet<>();
-    processOffsets(calcDescriptors(new SearchParameters(samClass, samClass.getUseScope())), project, (file, offsets) -> result.add(file));
+    processOffsets(calcDescriptors(new SearchParameters(samClass, samClass.getUseScope())), samClass.getProject(), (file, offsets) -> result.add(file));
     return result;
   }
 
index 801acf286bbb51024b88a0c73b316ab8a824eb51..c02e3c770fec78384d1c1bd1604ccd1136ec723a 100644 (file)
@@ -172,7 +172,7 @@ public class FindFunctionalInterfaceTest extends LightCodeInsightFixtureTestCase
                        "}");
 
     assertSize(1, FunctionalExpressionSearch.search(sam).findAll());
-    for (VirtualFile file : JavaFunctionalExpressionSearcher.getFilesToSearchInPsi(sam, getProject())) {
+    for (VirtualFile file : JavaFunctionalExpressionSearcher.getFilesToSearchInPsi(sam)) {
       assertFalse(file.getName(), file.getName().startsWith("_"));
     }
   }