Skip to content

Commit

Permalink
WFCORE-6445 Update ModuleSpecification.getMutableUserDependencies to …
Browse files Browse the repository at this point in the history
…resolve pending TODOs

WFCORE-6445 Update ModuleSpecification.getMutableUserDependencies to resolve pending TODOs
  • Loading branch information
gabrielpadilh4 committed Oct 23, 2023
1 parent 5df90f4 commit 1ee51c6
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ public class ModuleSpecification extends SimpleAttachable {
private final List<ModuleDependency> userDependencies = new ArrayList<>();
/**
* Set view of user dependencies, used to prevent duplicates in the userDependencies list.
* TODO update getMutableUserDependencies and replace the list with this.
*/
private final Set<ModuleDependency> userDependenciesSet = new HashSet<>();

Expand Down Expand Up @@ -234,12 +233,11 @@ public List<ModuleDependency> getUserDependencies() {

/**
* Gets a modifiable view of the user dependencies list.
*
* @return The user dependencies TODO change the return type to Collection and return a Set
* @return The user dependencies
*/
public List<ModuleDependency> getMutableUserDependencies() {
public Collection<ModuleDependency> getMutableUserDependencies() {
allDependencies = null;
return userDependencies;
return userDependenciesSet;
}

public void addResourceLoader(final ResourceLoaderSpec resourceLoader) {
Expand Down

0 comments on commit 1ee51c6

Please sign in to comment.