import org.osgi.util.tracker.ServiceTracker;
public class ConfigPusherFeatureActivator implements BundleActivator {
+ private BundleContext bc = null;
+ private ConfigPusherCustomizer cpc = null;
+ private ServiceTracker<ConfigPusher, ConfigPusher> cpst = null;
- BundleContext bc = null;
- ConfigPusherCustomizer cpc = null;
- ServiceTracker<ConfigPusher,ConfigPusher> cpst = null;
-
- public void start(BundleContext context) throws Exception {
+ public void start(final BundleContext context) throws Exception {
bc = context;
cpc = new ConfigPusherCustomizer();
- cpst = new ServiceTracker<ConfigPusher, ConfigPusher>(bc, ConfigPusher.class.getName(), cpc);
+ cpst = new ServiceTracker<>(bc, ConfigPusher.class.getName(), cpc);
cpst.open();
}
- public void stop(BundleContext context) throws Exception {
- if(cpst != null) {
+ public void stop(final BundleContext context) throws Exception {
+ if (cpst != null) {
cpst.close();
cpst = null;
}
- if(cpc != null) {
+ if (cpc != null) {
cpc.close();
cpc = null;
}