X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=opendaylight%2Fsal%2Fimplementation%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fimplementation%2Finternal%2FFlowProgrammerService.java;h=a7bdb9da8bf32072b73b45a3128b412b9f18f88a;hb=a201049bea35888764062c3a73164854f75e61d6;hp=d6feebd4a3067a057af0a7991dcf82613f2f5995;hpb=8398f3adb544427642694be13abe9c3bc1a4e192;p=controller.git diff --git a/opendaylight/sal/implementation/src/main/java/org/opendaylight/controller/sal/implementation/internal/FlowProgrammerService.java b/opendaylight/sal/implementation/src/main/java/org/opendaylight/controller/sal/implementation/internal/FlowProgrammerService.java index d6feebd4a3..a7bdb9da8b 100644 --- a/opendaylight/sal/implementation/src/main/java/org/opendaylight/controller/sal/implementation/internal/FlowProgrammerService.java +++ b/opendaylight/sal/implementation/src/main/java/org/opendaylight/controller/sal/implementation/internal/FlowProgrammerService.java @@ -38,6 +38,7 @@ import org.opendaylight.controller.sal.flowprogrammer.IPluginOutFlowProgrammerSe import org.opendaylight.controller.sal.match.Match; import org.opendaylight.controller.sal.match.MatchType; import org.opendaylight.controller.sal.utils.EtherTypes; +import org.opendaylight.controller.sal.utils.GlobalConstants; import org.opendaylight.controller.sal.utils.IPProtocols; import org.opendaylight.controller.sal.utils.NodeConnectorCreator; import org.opendaylight.controller.sal.utils.Status; @@ -115,21 +116,21 @@ public class FlowProgrammerService implements IFlowProgrammerService, } // Set the reference to the plugin flow programmer - public void setService(Map props, IPluginInFlowProgrammerService s) { + public void setService(Map props, IPluginInFlowProgrammerService s) { if (this.pluginFlowProgrammer == null) { logger.error("pluginFlowProgrammer store null"); return; } - logger.trace("Got a service set request {}", s); - String type = null; - for (Object e : props.entrySet()) { - Map.Entry entry = (Map.Entry) e; - logger.trace("Prop key:({}) value:({})", entry.getKey(), - entry.getValue()); + if (logger.isTraceEnabled()) { + logger.trace("Got a service set request {}", s); + for (Map.Entry entry : props.entrySet()) { + logger.trace("Prop key:({}) value:({})", entry.getKey(), entry.getValue()); + } } - Object value = props.get("protocolPluginType"); + String type = null; + Object value = props.get(GlobalConstants.PROTOCOLPLUGINTYPE.toString()); if (value instanceof String) { type = (String) value; } @@ -142,21 +143,22 @@ public class FlowProgrammerService implements IFlowProgrammerService, } } - public void unsetService(Map props, IPluginInFlowProgrammerService s) { + public void unsetService(Map props, IPluginInFlowProgrammerService s) { if (this.pluginFlowProgrammer == null) { logger.error("pluginFlowProgrammer store null"); return; } - String type = null; logger.debug("Received unsetpluginFlowProgrammer request"); - for (Object e : props.entrySet()) { - Map.Entry entry = (Map.Entry) e; - logger.trace("Prop key:({}) value:({})", entry.getKey(), - entry.getValue()); + if (logger.isTraceEnabled()) { + logger.trace("Got a service set request {}", s); + for (Map.Entry entry : props.entrySet()) { + logger.trace("Prop key:({}) value:({})", entry.getKey(), entry.getValue()); + } } - Object value = props.get("protocoloPluginType"); + String type = null; + Object value = props.get(GlobalConstants.PROTOCOLPLUGINTYPE.toString()); if (value instanceof String) { type = (String) value; }