X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fblueprint%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fblueprint%2FBlueprintBundleTracker.java;h=562a8940c8d22e825160945fb6ff524399ae9736;hb=refs%2Fchanges%2F01%2F84601%2F3;hp=ebc697592348b2815b9de511f1bc639ff3bc0890;hpb=49809b5cffe5b70abff78003d0aaa15187970144;p=controller.git diff --git a/opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/BlueprintBundleTracker.java b/opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/BlueprintBundleTracker.java index ebc6975923..562a8940c8 100644 --- a/opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/BlueprintBundleTracker.java +++ b/opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/BlueprintBundleTracker.java @@ -21,6 +21,7 @@ import org.apache.aries.blueprint.services.BlueprintExtenderService; import org.apache.aries.quiesce.participant.QuiesceParticipant; import org.apache.aries.util.AriesFrameworkUtil; import org.eclipse.jdt.annotation.Nullable; +import org.gaul.modernizer_maven_annotations.SuppressModernizer; import org.opendaylight.controller.blueprint.ext.OpendaylightNamespaceHandler; import org.opendaylight.yangtools.util.xml.UntrustedXML; import org.osgi.framework.Bundle; @@ -151,20 +152,25 @@ public class BlueprintBundleTracker implements BundleActivator, BundleTrackerCus restartService.setBlueprintExtenderService(blueprintExtenderService); blueprintContainerRestartReg = bundleContext.registerService( - BlueprintContainerRestartService.class.getName(), restartService, new Hashtable<>()); + BlueprintContainerRestartService.class.getName(), restartService, emptyDict()); return blueprintExtenderService; } private void registerNamespaceHandler(final BundleContext context) { - Dictionary props = new Hashtable<>(); + Dictionary props = emptyDict(); props.put("osgi.service.blueprint.namespace", OpendaylightNamespaceHandler.NAMESPACE_1_0_0); namespaceReg = context.registerService(NamespaceHandler.class.getName(), new OpendaylightNamespaceHandler(), props); } private void registerBlueprintEventHandler(final BundleContext context) { - eventHandlerReg = context.registerService(BlueprintListener.class.getName(), this, new Hashtable<>()); + eventHandlerReg = context.registerService(BlueprintListener.class.getName(), this, emptyDict()); + } + + @SuppressModernizer + private static Dictionary emptyDict() { + return new Hashtable<>(); } /**