List<JsonSchemaFileProvider> (@NotNull VirtualFile file) { Map<VirtualFile, List<JsonSchemaFileProvider>> map = myState.myData.getValue(); if (map.isEmpty()) { return Collections.emptyList(); } List<JsonSchemaFileProvider> result = null; for (List<JsonSchemaFileProvider> providers : map.values()) { for (JsonSchemaFileProvider provider : providers) { if (isProviderAvailable(file, provider)) { if (result == null) { result = new SmartList<>(); } result.add(provider); } } } return result == null ? Collections.emptyList() : result; }