Skip to content

Commit b013114

Browse files
Null pointer check added for system package (#1455)
* 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
1 parent dfe2720 commit b013114

File tree

1 file changed

+3
-2
lines changed
  • build/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/site

1 file changed

+3
-2
lines changed

build/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/site/PDEState.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,9 +441,10 @@ public void resolveState() {
441441
IExecutionEnvironment env = JavaRuntime.getExecutionEnvironmentsManager().getEnvironment(javaProfiles[j]);
442442
String systemPackages = getSystemPackages(env, profileProps);
443443
String ee = profileProps.getProperty(FRAMEWORK_EXECUTIONENVIRONMENT);
444-
445444
Dictionary<String, Object> prop = new Hashtable<>();
446-
prop.put(ProfileManager.SYSTEM_PACKAGES, systemPackages);
445+
if (systemPackages != null) {
446+
prop.put(ProfileManager.SYSTEM_PACKAGES, systemPackages);
447+
}
447448
if (profileName.equals("JavaSE-9")) { //$NON-NLS-1$
448449
eeJava9 = ee;
449450
}

0 commit comments

Comments
 (0)