Skip to content

Commit

Permalink
Null pointer check added for system package (#1455)
Browse files Browse the repository at this point in the history
* Null pointer check added for system package

Hashtable does not store null values , so if systempackage comes as null it will throw null pointer exception
  • Loading branch information
Khushboo-Sharma-110597 authored Oct 25, 2024
1 parent dfe2720 commit b013114
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -441,9 +441,10 @@ public void resolveState() {
IExecutionEnvironment env = JavaRuntime.getExecutionEnvironmentsManager().getEnvironment(javaProfiles[j]);
String systemPackages = getSystemPackages(env, profileProps);
String ee = profileProps.getProperty(FRAMEWORK_EXECUTIONENVIRONMENT);

Dictionary<String, Object> prop = new Hashtable<>();
prop.put(ProfileManager.SYSTEM_PACKAGES, systemPackages);
if (systemPackages != null) {
prop.put(ProfileManager.SYSTEM_PACKAGES, systemPackages);
}
if (profileName.equals("JavaSE-9")) { //$NON-NLS-1$
eeJava9 = ee;
}
Expand Down

0 comments on commit b013114

Please sign in to comment.