@@ -385,17 +385,18 @@ public void addBundles(Collection<File> bundles) {
385
385
}
386
386
}
387
387
388
+ @ SuppressWarnings ("deprecation" )
389
+ private static final String FRAMEWORK_EXECUTIONENVIRONMENT = Constants .FRAMEWORK_EXECUTIONENVIRONMENT ;
390
+
388
391
public void resolveState () {
389
392
List <Config > configs = AbstractScriptGenerator .getConfigInfos ();
390
- ArrayList <Dictionary <String , Object >> properties = new ArrayList <>(); //Collection of dictionaries
391
- Dictionary <String , Object > prop ;
393
+ List <Dictionary <String , Object >> properties = new ArrayList <>(); //Collection of dictionaries
392
394
393
395
// initialize profileManager and get the JRE profiles
394
396
String [] javaProfiles = getJavaProfiles ();
395
- String ee = null ;
396
397
397
398
for (Config aConfig : configs ) {
398
- prop = new Hashtable <>();
399
+ Dictionary < String , Object > prop = new Hashtable <>();
399
400
if (AbstractScriptGenerator .getPropertyAsBoolean (RESOLVER_DEV_MODE ))
400
401
prop .put (PROPERTY_RESOLVER_MODE , VALUE_DEVELOPMENT );
401
402
String os = aConfig .getOs ();
@@ -427,38 +428,37 @@ public void resolveState() {
427
428
properties .add (prop );
428
429
}
429
430
430
- Properties profileProps = null ;
431
431
boolean added = false ;
432
432
String eeJava9 = null ;
433
433
//javaProfiles are sorted, go in reverse order, and if when we hit 0 we haven't added any yet,
434
434
//then add that last profile so we have something.
435
435
for (int j = javaProfiles .length - 1 ; j >= 0 ; j --) {
436
436
// add a property set for each EE that is defined in the build.
437
- profileProps = profileManager .getProfileProperties (javaProfiles [j ]);
437
+ Properties profileProps = profileManager .getProfileProperties (javaProfiles [j ]);
438
438
if (profileProps != null ) {
439
439
String profileName = profileProps .getProperty (ProfileManager .PROFILE_NAME );
440
440
if (AbstractScriptGenerator .getImmutableAntProperty (profileName ) != null || (j == 0 && !added )) {
441
441
IExecutionEnvironment env = JavaRuntime .getExecutionEnvironmentsManager ().getEnvironment (javaProfiles [j ]);
442
442
String systemPackages = getSystemPackages (env , profileProps );
443
- ee = profileProps .getProperty (Constants . FRAMEWORK_EXECUTIONENVIRONMENT );
443
+ String ee = profileProps .getProperty (FRAMEWORK_EXECUTIONENVIRONMENT );
444
444
445
- prop = new Hashtable <>();
445
+ Dictionary < String , Object > prop = new Hashtable <>();
446
446
prop .put (ProfileManager .SYSTEM_PACKAGES , systemPackages );
447
447
if (profileName .equals ("JavaSE-9" )) { //$NON-NLS-1$
448
448
eeJava9 = ee ;
449
449
}
450
- prop .put (Constants . FRAMEWORK_EXECUTIONENVIRONMENT , ee );
450
+ prop .put (FRAMEWORK_EXECUTIONENVIRONMENT , ee );
451
451
properties .add (prop );
452
452
added = true ;
453
453
}
454
454
}
455
455
}
456
456
// from java 10 and beyond
457
- ArrayList <String > eeJava10AndBeyond = new ArrayList <>();
457
+ List <String > eeJava10AndBeyond = new ArrayList <>();
458
458
for (int i = 10 ; i <= LAST_SUPPORTED_JDK ; i ++) {
459
459
eeJava10AndBeyond .add ("JavaSE-" + i );//$NON-NLS-1$
460
460
}
461
- prop = new Hashtable <>();
461
+ Dictionary < String , Object > prop = new Hashtable <>();
462
462
String previousEE = eeJava9 ;
463
463
for (String execEnvID : eeJava10AndBeyond ) {
464
464
prop = new Hashtable <>();
@@ -470,7 +470,7 @@ public void resolveState() {
470
470
continue ;
471
471
}
472
472
prop .put (ProfileManager .SYSTEM_PACKAGES , systemPackages );
473
- prop .put (Constants . FRAMEWORK_EXECUTIONENVIRONMENT , currentEE );
473
+ prop .put (FRAMEWORK_EXECUTIONENVIRONMENT , currentEE );
474
474
previousEE = currentEE ;
475
475
properties .add (prop );
476
476
}
0 commit comments