X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-binding-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fbinding%2Fdom%2Fserializer%2Fimpl%2FRuntimeGeneratedMappingServiceImpl.xtend;fp=opendaylight%2Fmd-sal%2Fsal-binding-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fbinding%2Fdom%2Fserializer%2Fimpl%2FRuntimeGeneratedMappingServiceImpl.xtend;h=853e62aa38799302fb46319ac2f09577ad4d4ec5;hb=75b3060af970364e7b856a16c47f5555d568d2f4;hp=13975cad4c807abc636870f99fbea2a921e4a312;hpb=5b4fe76e48ced1146c26421aa163626a36bc09c9;p=controller.git diff --git a/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/dom/serializer/impl/RuntimeGeneratedMappingServiceImpl.xtend b/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/dom/serializer/impl/RuntimeGeneratedMappingServiceImpl.xtend index 13975cad4c..853e62aa38 100644 --- a/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/dom/serializer/impl/RuntimeGeneratedMappingServiceImpl.xtend +++ b/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/dom/serializer/impl/RuntimeGeneratedMappingServiceImpl.xtend @@ -170,7 +170,9 @@ class RuntimeGeneratedMappingServiceImpl implements BindingIndependentMappingSer */ return; } - + if(registry.isCodecAvailable(class1)) { + return; + } val ref = Types.typeForClass(class1); getSchemaWithRetry(ref); } @@ -242,31 +244,6 @@ class RuntimeGeneratedMappingServiceImpl implements BindingIndependentMappingSer } } - private def getTypeDefinition(Type type) { - val typeDef = typeToDefinition.get(type); - if (typeDef !== null) { - return typeDef; - } - return type.getTypeDefInFuture.get(); - } - - private def Future getTypeDefInFuture(Type type) { - val future = SettableFuture.create() - promisedTypeDefinitions.put(type, future); - return future; - } - - private def void updatePromisedTypeDefinitions(GeneratedTypeBuilder builder) { - val futures = promisedTypeDefinitions.get(builder); - if (futures === null || futures.empty) { - return; - } - for (future : futures) { - future.set(builder); - } - promisedTypeDefinitions.removeAll(builder); - } - private def getSchemaWithRetry(Type type) { val typeDef = typeToSchemaNode.get(type); if (typeDef !== null) {