mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-03 17:49:40 +00:00
remove unusded registrations set from persistence activator
This commit is contained in:
1 parent
d55144a9cc
commit
14645a8f98
1 file changed
-10
-10
@@ -1,16 +1,11 @@
|
||||
package com.sap.sailing.domain.persistence.impl;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import org.osgi.framework.BundleActivator;
|
||||
import org.osgi.framework.BundleContext;
|
||||
import org.osgi.framework.ServiceRegistration;
|
||||
|
||||
import com.sap.sailing.mongodb.MongoDBService;
|
||||
|
||||
public class Activator implements BundleActivator {
|
||||
private Set<ServiceRegistration<?>> registrations = new HashSet<>();
|
||||
@Override
|
||||
public void start(BundleContext context) throws Exception {
|
||||
for (CollectionNames name : CollectionNames.values())
|
||||
@@ -19,10 +14,5 @@ public class Activator implements BundleActivator {
|
||||
|
||||
@Override
|
||||
public void stop(BundleContext context) throws Exception {
|
||||
for (ServiceRegistration<?> reg : registrations) {
|
||||
reg.unregister();
|
||||
}
|
||||
registrations.clear();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user