Improve OSGi initialisation
[lgpl/argeo-commons.git] / org.argeo.init / src / org / argeo / init / osgi / Activator.java
index a4f5a371d9d4c8ab708762b6be70156208510741..518751f91e655f27bcadda1e4ea02e21d0e056fa 100644 (file)
@@ -21,6 +21,8 @@ public class Activator implements BundleActivator {
        private Logger logger = System.getLogger(Activator.class.getName());
 
        private Long checkpoint = null;
+
+       /** Not null if we created it ourselves. */
        private OsgiRuntimeContext runtimeContext;
 
        public void start(final BundleContext bundleContext) throws Exception {
@@ -45,7 +47,7 @@ public class Activator implements BundleActivator {
        }
 
        public void stop(BundleContext context) throws Exception {
-               Objects.requireNonNull(runtimeContext);
+               Objects.nonNull(runtimeContext);
                runtimeContext.stop(context);
        }
 }