Skip to content

Commit 7f38d5e

Browse files
committed
Fixed issue
1 parent d624313 commit 7f38d5e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/main/java/org/mangorage/bootstrap/internal/JarHandler.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@ private static String resolveModuleName(Path jarPath) {
6969
// This is a proper JPMS module JAR
7070
return ModuleFinder.of(jarPath).findAll().iterator().next().descriptor().name();
7171
} else {
72+
final var found = ModuleFinder.of(jarPath).findAll().stream().findAny();
73+
if (found.isPresent()) {
74+
return found.get().descriptor().name();
75+
}
76+
7277
// Fall back to heuristic based on filename (best effort)
7378
String filename = jarPath.getFileName().toString();
7479
return filename.replaceAll("-[\\d\\.]+.*\\.jar$", "").replaceAll("\\.jar$", "");

0 commit comments

Comments
 (0)