@@ -34,7 +34,7 @@ public class Downloader extends Task {
34
34
private String platform ; // macos
35
35
private int train ; // Java 11 (was 1 through Java 8)
36
36
private int version ; // 0 (was 8 prior to Java 9)
37
- private int update ; // Update 131
37
+ private String update ; // Update 131
38
38
private int build ; // Build 11
39
39
40
40
private String component ; // "jdk" or "jfx"
@@ -80,7 +80,7 @@ public void setVersion(int version) {
80
80
*
81
81
* @param update The update within the version to use like 1 for "11.0.1_13".
82
82
*/
83
- public void setUpdate (int update ) {
83
+ public void setUpdate (String update ) {
84
84
this .update = update ;
85
85
}
86
86
@@ -250,9 +250,9 @@ void download() throws IOException {
250
250
251
251
252
252
static private String adoptOpenJdkUrl (String platform , String component ,
253
- int train , int version , int update ,
253
+ int train , int version , String update ,
254
254
int build , String flavor ) {
255
- final String URL_FORMAT = "https://github.com/AdoptOpenJDK/openjdk%d-binaries/releases/download/jdk-%d.%d.%d %%2B%d/OpenJDK%dU-%s_%d.%d.%d_ %d.%s" ;
255
+ final String URL_FORMAT = "https://github.com/AdoptOpenJDK/openjdk%d-binaries/releases/download/jdk-%d.%d.%s %%2B%d/OpenJDK%dU-%s_%d.%d.%s_ %d.%s" ;
256
256
257
257
String filename = null ;
258
258
switch (platform ) {
@@ -286,9 +286,9 @@ static private String adoptOpenJdkUrl(String platform, String component,
286
286
287
287
288
288
static private String gluonHqUrl (String platform , String component ,
289
- int train , int version , int update ) {
289
+ int train , int version , String update ) {
290
290
final String URL_FORMAT =
291
- "https://gluonhq.com/download/javafx-%d-%d-%d -sdk-%s/" ;
291
+ "https://gluonhq.com/download/javafx-%d-%d-%s -sdk-%s/" ;
292
292
293
293
String platformShort ;
294
294
if (platform .contains ("linux" )) {
@@ -317,12 +317,12 @@ static private String gluonHqUrl(String platform, String component,
317
317
* @param flavor The flavor like "macosx-x64.dmg".
318
318
*/
319
319
static private String getLocalFilename (String component , int version ,
320
- int update , String flavor ) {
320
+ String update , String flavor ) {
321
321
String versionStr ;
322
- if (update == 0 ) {
322
+ if (update . equals ( "0" ) ) {
323
323
versionStr = String .format ("-%d-%s" , version , flavor );
324
324
} else {
325
- versionStr = String .format ("-%du%d -%s" , version , update , flavor );
325
+ versionStr = String .format ("-%du%s -%s" , version , update , flavor );
326
326
}
327
327
return component + versionStr ;
328
328
}
0 commit comments