import com.google.common.collect.Maps;
import java.util.Collection;
+import java.util.Locale;
import java.util.Map;
import javax.annotation.Nonnull;
import javax.annotation.PostConstruct;
// suffix OS_HOST_CONFIG_CONFIG_KEY_PREFIX.length()
String hostType = openvswitchExternalIds.getExternalIdKey().substring(
OS_HOST_CONFIG_CONFIG_KEY_PREFIX.length());
- if (null != hostType && hostType.length() > 0) {
+ if (hostType.length() > 0) {
if (hostType.length() > HOST_TYPE_STR_LEN) {
hostType = hostType.substring(0, HOST_TYPE_STR_LEN);
}
- hostType = "ODL " + hostType.toUpperCase();
+ hostType = "ODL " + hostType.toUpperCase(Locale.ROOT);
if (null != openvswitchExternalIds.getExternalIdValue()) {
config.put(hostType, openvswitchExternalIds.getExternalIdValue());
}
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
+import java.util.Locale;
import java.util.Map;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
public NeutronHostconfigVppListener(final DataBroker dataBroker, String spath, String sname, String vhostMode) {
LOG.info("Initializing Neutron-Hostconfig-Vpp-Listener");
this.dataBroker = Preconditions.checkNotNull(dataBroker);
- final String vhostModeChecked = Preconditions.checkNotNull(vhostMode).toLowerCase();
+ final String vhostModeChecked = Preconditions.checkNotNull(vhostMode).toLowerCase(Locale.ROOT);
Preconditions.checkArgument(vhostModeChecked.equals("server") || vhostModeChecked.equals("client"),
"Supported values for vhostuser-mode are client and server.");
this.socketInfo =