diff --git a/runtime/bundles/org.eclipse.core.runtime/META-INF/MANIFEST.MF b/runtime/bundles/org.eclipse.core.runtime/META-INF/MANIFEST.MF index 1eeb53d089c..7ad1e9e8a7b 100644 --- a/runtime/bundles/org.eclipse.core.runtime/META-INF/MANIFEST.MF +++ b/runtime/bundles/org.eclipse.core.runtime/META-INF/MANIFEST.MF @@ -1,7 +1,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName -Bundle-Version: 3.34.100.qualifier +Bundle-Version: 3.34.200.qualifier Bundle-SymbolicName: org.eclipse.core.runtime; singleton:=true Bundle-Vendor: %providerName Bundle-Activator: org.eclipse.core.internal.runtime.PlatformActivator diff --git a/runtime/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/InternalPlatform.java b/runtime/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/InternalPlatform.java index 7148f259a8d..e4ba969794e 100644 --- a/runtime/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/InternalPlatform.java +++ b/runtime/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/InternalPlatform.java @@ -471,7 +471,11 @@ public String getOption(String option) { } public String getOS() { - return getContextProperty(PROP_OS); + String property = getContextProperty(PROP_OS); + if (property == null) { + return Platform.OS_UNKNOWN; + } + return property; } public String getWS() { diff --git a/runtime/bundles/org.eclipse.core.runtime/src/org/eclipse/core/runtime/Platform.java b/runtime/bundles/org.eclipse.core.runtime/src/org/eclipse/core/runtime/Platform.java index 65bd5f2ac11..5cadd28ba70 100644 --- a/runtime/bundles/org.eclipse.core.runtime/src/org/eclipse/core/runtime/Platform.java +++ b/runtime/bundles/org.eclipse.core.runtime/src/org/eclipse/core/runtime/Platform.java @@ -22,6 +22,7 @@ import java.util.LinkedHashMap; import java.util.Map; import java.util.MissingResourceException; +import java.util.Objects; import java.util.ResourceBundle; import org.eclipse.core.internal.runtime.AuthorizationHandler; import org.eclipse.core.internal.runtime.InternalPlatform; @@ -79,7 +80,7 @@ private OS() { * @since 3.30 */ public static boolean is(String osString) { - return Platform.getOS().equals(osString); + return Objects.equals(Platform.getOS(), osString); } /**