commit | f3e3cbed847f54074cd89b377cc372c10999a799 | [log] [tgz] |
---|---|---|
author | Wim Jongman <wim.jongman@remainsoftware.com> | Tue Jan 25 16:43:04 2022 +0100 |
committer | Wim Jongman <wim.jongman@remainsoftware.com> | Tue Jan 25 11:06:01 2022 -0500 |
tree | 33a73b1fa90aa26ad48b773836eaa2ce759f3046 | |
parent | 0268894be15dc02f2de6ac949f21952d96d67dfe [diff] |
Bug 578382 - getBundle throws exception if eclipse is not running When the framwork is not running, no attempt is made to resolve bundles. Instead null is returned. Change-Id: Idc91cf0a9bc8fc1fdf66e61e24e6cbdddca96091 Reviewed-on: https://git.eclipse.org/r/c/platform/eclipse.platform.runtime/+/190004 Tested-by: Platform Bot <platform-bot@eclipse.org> Tested-by: Wim Jongman <wim.jongman@remainsoftware.com> Reviewed-by: Wim Jongman <wim.jongman@remainsoftware.com>
diff --git a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/InternalPlatform.java b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/InternalPlatform.java index 714ce10..3f50707 100644 --- a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/InternalPlatform.java +++ b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/InternalPlatform.java
@@ -224,6 +224,9 @@ } public Bundle[] getBundles(String symbolicName, String versionRange) { + if(!isRunning()) { + return null; + } if (Constants.SYSTEM_BUNDLE_SYMBOLICNAME.equals(symbolicName)) { symbolicName = context.getBundle(Constants.SYSTEM_BUNDLE_LOCATION).getSymbolicName(); }