Bug 5540 - TableFeaturesResponseConvertor
[openflowplugin.git] / openflowplugin-impl / src / main / java / org / opendaylight / openflowplugin / impl / common / NodeStaticReplyTranslatorUtil.java
index 449c24cfe2deb67e81a7ac3aca0fd2a886376162..8a2284c3d9f56e8f18a24d2c3ae909b8483372cb 100644 (file)
@@ -12,9 +12,10 @@ import com.google.common.base.Preconditions;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
+import java.util.Optional;
 import javax.annotation.CheckForNull;
 import org.opendaylight.openflowplugin.api.OFConstants;
-import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.TableFeaturesReplyConvertor;
+import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.ConvertorManager;
 import org.opendaylight.openflowplugin.openflow.md.util.OpenflowPortsUtil;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Counter32;
@@ -221,7 +222,8 @@ public class NodeStaticReplyTranslatorUtil {
      */
     public static List<TableFeatures> nodeTableFeatureTranslator(@CheckForNull final MultipartReplyTableFeatures reply) {
         Preconditions.checkArgument(reply != null);
-        return TableFeaturesReplyConvertor.toTableFeaturesReply(reply);
+        final Optional<List<TableFeatures>> tableFeaturesList = ConvertorManager.getInstance().convert(reply);
+        return tableFeaturesList.orElse(Collections.emptyList());
     }
 
     /**