Github user CMoH commented on a diff in the pull request:
https://github.com/apache/incubator-brooklyn/pull/1048#discussion_r45797421
--- Diff: core/src/main/java/org/apache/brooklyn/util/core/osgi/Osgis.java
---
@@ -338,12 +336,12 @@ public static Framework getFramework(String
felixCacheDir, boolean clean) {
* @param framework
*/
public static void ungetFramework(Framework framework) {
- final Bundle frameworkBundle =
FrameworkUtil.getBundle(Framework.class);
- if (frameworkBundle != null) {
- // already running inside an OSGi container
- final BundleContext ctx = frameworkBundle.getBundleContext();
- final ServiceReference<?> ref =
ctx.getServiceReference(Framework.class);
- ctx.ungetService(ref);
+ final Bundle bundle = FrameworkUtil.getBundle(Osgis.class);
+ if (bundle != null) {
+// // already running inside an OSGi container
+// final BundleContext ctx = bundle.getBundleContext();
+// final ServiceReference<Framework> ref =
ctx.getServiceReference(Framework.class);
+// ctx.ungetService(ref);
--- End diff --
I think it can be safely removed.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---