File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
src/main/java/org/mangorage/bootstrap/internal Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ interface UnsafeRunnable {
2424 enum ModuleNameOrigin {
2525 MODULE_INFO , // Takes Highest priority
2626 MANIFEST ,
27+ MANIFEST_BUNDLE_SYMBOLIC_NAME ,
2728 MULTI_RELEASE ,
2829 GUESSED // Takes lowest
2930 }
@@ -136,6 +137,7 @@ private static Result resolveModuleName(Path jarPath) {
136137
137138 // 2. Check MANIFEST.MF for Automatic-Module-Name
138139 Manifest manifest = jarFile .getManifest ();
140+
139141 if (manifest != null ) {
140142 String autoName = manifest .getMainAttributes ()
141143 .getValue ("Automatic-Module-Name" );
@@ -147,6 +149,18 @@ private static Result resolveModuleName(Path jarPath) {
147149 jarPath
148150 );
149151 }
152+
153+ String symbolicName = manifest .getMainAttributes ()
154+ .getValue ("Bundle-SymbolicName" );
155+
156+ if (symbolicName != null ) {
157+ return new Result (
158+ symbolicName ,
159+ ModuleNameOrigin .MANIFEST_BUNDLE_SYMBOLIC_NAME ,
160+ jarPath
161+ );
162+ }
163+
150164 }
151165
152166 // 3. Fallback: filename heuristic (aka desperation mode)
You can’t perform that action at this time.
0 commit comments