From b013114e227575891d20c990cc3068359e5f8d32 Mon Sep 17 00:00:00 2001 From: sharmakh <65189541+sharmakh@users.noreply.github.com> Date: Fri, 25 Oct 2024 16:26:39 +0530 Subject: [PATCH] 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 --- .../src/org/eclipse/pde/internal/build/site/PDEState.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/site/PDEState.java b/build/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/site/PDEState.java index b112aca2f1..55977855ba 100644 --- a/build/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/site/PDEState.java +++ b/build/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/site/PDEState.java @@ -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 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; }