@@ -34,7 +34,7 @@ public class Downloader extends Task {
3434 private String platform ; // macos
3535 private int train ; // Java 11 (was 1 through Java 8)
3636 private int version ; // 0 (was 8 prior to Java 9)
37- private int update ; // Update 131
37+ private String update ; // Update 131
3838 private int build ; // Build 11
3939
4040 private String component ; // "jdk" or "jfx"
@@ -80,7 +80,7 @@ public void setVersion(int version) {
8080 *
8181 * @param update The update within the version to use like 1 for "11.0.1_13".
8282 */
83- public void setUpdate (int update ) {
83+ public void setUpdate (String update ) {
8484 this .update = update ;
8585 }
8686
@@ -250,9 +250,9 @@ void download() throws IOException {
250250
251251
252252 static private String adoptOpenJdkUrl (String platform , String component ,
253- int train , int version , int update ,
253+ int train , int version , String update ,
254254 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" ;
256256
257257 String filename = null ;
258258 switch (platform ) {
@@ -286,9 +286,9 @@ static private String adoptOpenJdkUrl(String platform, String component,
286286
287287
288288 static private String gluonHqUrl (String platform , String component ,
289- int train , int version , int update ) {
289+ int train , int version , String update ) {
290290 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/" ;
292292
293293 String platformShort ;
294294 if (platform .contains ("linux" )) {
@@ -317,12 +317,12 @@ static private String gluonHqUrl(String platform, String component,
317317 * @param flavor The flavor like "macosx-x64.dmg".
318318 */
319319 static private String getLocalFilename (String component , int version ,
320- int update , String flavor ) {
320+ String update , String flavor ) {
321321 String versionStr ;
322- if (update == 0 ) {
322+ if (update . equals ( "0" ) ) {
323323 versionStr = String .format ("-%d-%s" , version , flavor );
324324 } else {
325- versionStr = String .format ("-%du%d -%s" , version , update , flavor );
325+ versionStr = String .format ("-%du%s -%s" , version , update , flavor );
326326 }
327327 return component + versionStr ;
328328 }
0 commit comments