X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fconfig%2Fconfig-manager%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fconfig%2Fmanager%2Fimpl%2FServiceReferenceRegistryImpl.java;h=52bb3f5ed1df99a678e9ad44357cef6eadc4b3cf;hb=bfae8a4c16f0fabe4e425aa0849166db1b104671;hp=ceea99415471d1ecd48a0d2cd17f469174aa792a;hpb=61bad4207cc91cd14d8d38a255ad6549c20ff54e;p=controller.git diff --git a/opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/ServiceReferenceRegistryImpl.java b/opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/ServiceReferenceRegistryImpl.java index ceea994154..52bb3f5ed1 100644 --- a/opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/ServiceReferenceRegistryImpl.java +++ b/opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/ServiceReferenceRegistryImpl.java @@ -50,7 +50,7 @@ public class ServiceReferenceRegistryImpl implements CloseableServiceReferenceRe private final Map serviceQNamesToAnnotations; // all Service Interface qNames for sanity checking private final Set allQNames; - Map> modulesToServiceRef = new HashMap<>(); + Map> modulesToServiceRef = new HashMap<>(); // actual reference database @@ -241,8 +241,8 @@ public class ServiceReferenceRegistryImpl implements CloseableServiceReferenceRe } @Override - public Map findServiceInterfaces(ModuleIdentifier moduleIdentifier) { - Map result = modulesToServiceRef.get(moduleIdentifier); + public Map findServiceInterfaces(ModuleIdentifier moduleIdentifier) { + Map result = modulesToServiceRef.get(moduleIdentifier); if (result == null) { return Collections.emptyMap(); } @@ -417,7 +417,7 @@ public class ServiceReferenceRegistryImpl implements CloseableServiceReferenceRe } // save to refNames refNames.put(serviceReference, moduleIdentifier); - Map refNamesToAnnotations = modulesToServiceRef.get(moduleIdentifier); + Map refNamesToAnnotations = modulesToServiceRef.get(moduleIdentifier); if (refNamesToAnnotations == null){ refNamesToAnnotations = new HashMap<>(); modulesToServiceRef.put(moduleIdentifier, refNamesToAnnotations); @@ -425,7 +425,7 @@ public class ServiceReferenceRegistryImpl implements CloseableServiceReferenceRe ServiceInterfaceAnnotation annotation = serviceQNamesToAnnotations.get(serviceReference.getServiceInterfaceQName()); checkNotNull(annotation, "Possible error in code, cannot find annotation for " + serviceReference); - refNamesToAnnotations.put(serviceReference.getRefName(), annotation); + refNamesToAnnotations.put(annotation, serviceReference.getRefName()); return result; }