Skip to content

Commit 605780b

Browse files
committed
Move comments to proper position and improve
1 parent 5c06f1b commit 605780b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

plexus-java/src/main/java/org/codehaus/plexus/languages/java/jpms/LocationManager.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,7 @@ public String extract(Path path) throws IOException {
188188
continue;
189189
}
190190

191-
// Consider strategies how to handle duplicate modules by name
192-
// For now, just ignore it
191+
// in case of identical module names, first one wins
193192
if (moduleDescriptor != null && moduleNameSources.putIfAbsent(moduleDescriptor.name(), source) == null) {
194193
availableNamedModules.put(moduleDescriptor.name(), moduleDescriptor);
195194

@@ -249,12 +248,15 @@ public String extract(Path path) throws IOException {
249248
request.isIncludeStatic());
250249
}
251250

252-
// in case of identical module names, first one wins
253251
Set<String> collectedModules = new HashSet<>(requiredNamedModules.size());
254252

255253
for (Entry<T, JavaModuleDescriptor> entry : pathElements.entrySet()) {
256254
if (entry.getValue() != null
257255
&& requiredNamedModules.contains(entry.getValue().name())) {
256+
// Consider strategies how to handle duplicate modules by name
257+
// For now only add first on modulePath, just ignore others,
258+
// This has effectively the same result as putting it on the modulePath, but might better help
259+
// analyzing issues.
258260
if (collectedModules.add(entry.getValue().name())) {
259261
result.getModulepathElements()
260262
.put(

0 commit comments

Comments
 (0)