EditorConfig documentation test
[idea/community.git] / java / java-impl / src / com / intellij / cyclicDependencies / CyclicDependenciesBuilder.java
index aec2bfc91b29b0ae9ed7e2bc8a604426c84c933f..8f546070ad139aadf32d5ac69a475d3cb063ea8d 100644 (file)
@@ -204,7 +204,7 @@ public class CyclicDependenciesBuilder{
     return myCyclicDependencies;
   }
 
-  public HashMap<PsiPackage, Set<List<PsiPackage>>> getCycles(Collection<PsiPackage> packages) {
+  public HashMap<PsiPackage, Set<List<PsiPackage>>> getCycles(Collection<? extends PsiPackage> packages) {
     if (myGraph == null){
       myGraph = buildGraph();
     }
@@ -251,7 +251,7 @@ public class CyclicDependenciesBuilder{
       public Iterator<PsiPackage> getIn(PsiPackage psiPack) {
         final Set<PsiPackage> psiPackages = myPackageDependencies.get(psiPack);
         if (psiPackages == null) {     //for packs without java classes
-          return new HashSet<PsiPackage>().iterator();
+          return Collections.emptyIterator();
         }
         return psiPackages.iterator();
       }