Library[] (final Module module, final Condition<? super Library> condition) { if (module == null) return Library.EMPTY_ARRAY; final ArrayList<Library> libraries = new ArrayList<>(); ApplicationManager.getApplication().runReadAction(() -> populateOrderEntries(module, condition, libraries, false, new HashSet<>())); return libraries.toArray(Library.EMPTY_ARRAY); }