@@ -385,17 +385,18 @@ public void addBundles(Collection<File> bundles) {
385385 }
386386 }
387387
388+ @ SuppressWarnings ("deprecation" )
389+ private static final String FRAMEWORK_EXECUTIONENVIRONMENT = Constants .FRAMEWORK_EXECUTIONENVIRONMENT ;
390+
388391 public void resolveState () {
389392 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
392394
393395 // initialize profileManager and get the JRE profiles
394396 String [] javaProfiles = getJavaProfiles ();
395- String ee = null ;
396397
397398 for (Config aConfig : configs ) {
398- prop = new Hashtable <>();
399+ Dictionary < String , Object > prop = new Hashtable <>();
399400 if (AbstractScriptGenerator .getPropertyAsBoolean (RESOLVER_DEV_MODE ))
400401 prop .put (PROPERTY_RESOLVER_MODE , VALUE_DEVELOPMENT );
401402 String os = aConfig .getOs ();
@@ -427,38 +428,37 @@ public void resolveState() {
427428 properties .add (prop );
428429 }
429430
430- Properties profileProps = null ;
431431 boolean added = false ;
432432 String eeJava9 = null ;
433433 //javaProfiles are sorted, go in reverse order, and if when we hit 0 we haven't added any yet,
434434 //then add that last profile so we have something.
435435 for (int j = javaProfiles .length - 1 ; j >= 0 ; j --) {
436436 // 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 ]);
438438 if (profileProps != null ) {
439439 String profileName = profileProps .getProperty (ProfileManager .PROFILE_NAME );
440440 if (AbstractScriptGenerator .getImmutableAntProperty (profileName ) != null || (j == 0 && !added )) {
441441 IExecutionEnvironment env = JavaRuntime .getExecutionEnvironmentsManager ().getEnvironment (javaProfiles [j ]);
442442 String systemPackages = getSystemPackages (env , profileProps );
443- ee = profileProps .getProperty (Constants . FRAMEWORK_EXECUTIONENVIRONMENT );
443+ String ee = profileProps .getProperty (FRAMEWORK_EXECUTIONENVIRONMENT );
444444
445- prop = new Hashtable <>();
445+ Dictionary < String , Object > prop = new Hashtable <>();
446446 prop .put (ProfileManager .SYSTEM_PACKAGES , systemPackages );
447447 if (profileName .equals ("JavaSE-9" )) { //$NON-NLS-1$
448448 eeJava9 = ee ;
449449 }
450- prop .put (Constants . FRAMEWORK_EXECUTIONENVIRONMENT , ee );
450+ prop .put (FRAMEWORK_EXECUTIONENVIRONMENT , ee );
451451 properties .add (prop );
452452 added = true ;
453453 }
454454 }
455455 }
456456 // from java 10 and beyond
457- ArrayList <String > eeJava10AndBeyond = new ArrayList <>();
457+ List <String > eeJava10AndBeyond = new ArrayList <>();
458458 for (int i = 10 ; i <= LAST_SUPPORTED_JDK ; i ++) {
459459 eeJava10AndBeyond .add ("JavaSE-" + i );//$NON-NLS-1$
460460 }
461- prop = new Hashtable <>();
461+ Dictionary < String , Object > prop = new Hashtable <>();
462462 String previousEE = eeJava9 ;
463463 for (String execEnvID : eeJava10AndBeyond ) {
464464 prop = new Hashtable <>();
@@ -470,7 +470,7 @@ public void resolveState() {
470470 continue ;
471471 }
472472 prop .put (ProfileManager .SYSTEM_PACKAGES , systemPackages );
473- prop .put (Constants . FRAMEWORK_EXECUTIONENVIRONMENT , currentEE );
473+ prop .put (FRAMEWORK_EXECUTIONENVIRONMENT , currentEE );
474474 previousEE = currentEE ;
475475 properties .add (prop );
476476 }
0 commit comments