Skip to content

Commit

Permalink
Fix active locations when module override is empty.
Browse files Browse the repository at this point in the history
  • Loading branch information
jshiell committed Jun 4, 2022
1 parent 047cf26 commit b907c68
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,17 @@ public SortedSet<ConfigurationLocation> getConfigurationLocations(@Nullable fina
if (moduleConfiguration.isExcluded()) {
return Collections.emptySortedSet();
}

PluginConfiguration configuration = configurationManager().getCurrent();
return moduleConfiguration.getActiveLocationIds().stream()
TreeSet<ConfigurationLocation> moduleActiveConfigurations = moduleConfiguration.getActiveLocationIds().stream()
.map(id -> configuration.getLocationById(id).orElse(null))
.filter(Objects::nonNull)
.collect(Collectors.toCollection(TreeSet::new));
if (!moduleActiveConfigurations.isEmpty()) {
return moduleActiveConfigurations;
}
}

return configurationManager().getCurrent().getActiveLocations();
}

Expand Down

0 comments on commit b907c68

Please sign in to comment.