Skip to content

Commit

Permalink
GH-799 - Guard against multiple non-unique module base packages.
Browse files Browse the repository at this point in the history
  • Loading branch information
odrotbohm committed Sep 4, 2024
1 parent 375dd50 commit 85e1fda
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,14 @@ protected ApplicationModules(ModulithMetadata metadata, Collection<String> packa
Classes classes = Classes.of(allClasses);

this.modules = packages.stream() //
.distinct()
.map(it -> JavaPackage.of(classes, it))
.flatMap(DETECTION_STRATEGY::getModuleBasePackages) //
.map(it -> new ApplicationModule(it, useFullyQualifiedModuleNames)) //
.collect(toMap(ApplicationModule::getName, Function.identity()));

this.rootPackages = packages.stream() //
.distinct()
.map(it -> JavaPackage.of(classes, it).toSingle()) //
.toList();

Expand Down

0 comments on commit 85e1fda

Please sign in to comment.