@@ -139,7 +139,8 @@ protected File doApply(Packager packager) throws Exception {
139
139
140
140
// gets JDK release info
141
141
Map <String ,String > releaseMap = JDKUtils .getRelease (jdkPath );
142
- String releaseInfo = "add:IMAGE_TYPE=\" JRE\" :OS_ARCH=\" " + releaseMap .get ("OS_ARCH" ) + "\" :OS_NAME=\" " + releaseMap .get ("OS_NAME" ) + "\" " ;
142
+ assert releaseMap != null ;
143
+ String releaseInfo = "add:IMAGE_TYPE=\" JRE\" :OS_ARCH=\" " + releaseMap .get ("OS_ARCH" ) + "\" :OS_NAME=\" " + releaseMap .get ("OS_NAME" ) + "\" " ;
143
144
144
145
// full path to jlink command
145
146
File jlink = new File (currentJdk , "/bin/jlink" );
@@ -222,7 +223,7 @@ protected String getRequiredModules(File packagingJdk, File libsFolder, boolean
222
223
modulesList =
223
224
defaultModules
224
225
.stream ()
225
- .map (module -> module . trim () )
226
+ .map (String :: trim )
226
227
.collect (Collectors .toList ());
227
228
228
229
} else if (VersionUtils .getJavaMajorVersion () >= 13 ) {
@@ -235,13 +236,14 @@ protected String getRequiredModules(File packagingJdk, File libsFolder, boolean
235
236
"--ignore-missing-deps" ,
236
237
"--print-module-deps" ,
237
238
"--add-modules=ALL-MODULE-PATH" ,
238
- "--module-path=" + StringUtils .join (modulePaths , File .pathSeparator )
239
+ "--module-path=" + StringUtils .join (modulePaths , File .pathSeparator ),
240
+ libsFolder ,
241
+ jarFile
239
242
);
240
243
241
244
modulesList =
242
- Arrays .asList (modules .split ("," ))
243
- .stream ()
244
- .map (module -> module .trim ())
245
+ Arrays .stream (modules .split ("," ))
246
+ .map (String ::trim )
245
247
.filter (module -> !module .isEmpty ())
246
248
.collect (Collectors .toList ());
247
249
@@ -255,13 +257,14 @@ protected String getRequiredModules(File packagingJdk, File libsFolder, boolean
255
257
"--ignore-missing-deps" ,
256
258
"--list-deps" ,
257
259
"--add-modules=ALL-MODULE-PATH" ,
258
- "--module-path=" + StringUtils .join (modulePaths , File .pathSeparator )
260
+ "--module-path=" + StringUtils .join (modulePaths , File .pathSeparator ),
261
+ libsFolder ,
262
+ jarFile
259
263
);
260
264
261
265
modulesList =
262
- Arrays .asList (modules .split ("\n " ))
263
- .stream ()
264
- .map (module -> module .trim ())
266
+ Arrays .stream (modules .split ("\n " ))
267
+ .map (String ::trim )
265
268
.map (module -> (module .contains ("/" ) ? module .split ("/" )[0 ] : module ))
266
269
.filter (module -> !module .isEmpty ())
267
270
.filter (module -> !module .startsWith ("JDK removed internal" ))
0 commit comments