public static boolean isNotEmptyMap(Map map) { return !isEmptyMap(map); }
public static boolean isNotEmptyMap(Map map) { return !isEmptyMap(map); }
protected static void checkParameterName(Map<String, String> parameters) { if (CollectionUtils.isEmptyMap(parameters)) { return; } for (Map.Entry<String, String> entry : parameters.entrySet()) { checkNameHasSymbol(entry.getKey(), entry.getValue()); } }
protected static void checkParameterName(Map<String, String> parameters) { if (CollectionUtils.isEmptyMap(parameters)) { return; } for (Map.Entry<String, String> entry : parameters.entrySet()) { checkNameHasSymbol(entry.getKey(), entry.getValue()); } }
boolean matchWhen(URL url, Invocation invocation) { return CollectionUtils.isEmptyMap(whenCondition) || matchCondition(whenCondition, url, null, invocation); }
boolean matchWhen(URL url, Invocation invocation) { return CollectionUtils.isEmptyMap(whenCondition) || matchCondition(whenCondition, url, null, invocation); }
public URL addParametersIfAbsent(Map<String, String> parameters) { if (CollectionUtils.isEmptyMap(parameters)) { return this; } Map<String, String> map = new HashMap<String, String>(parameters); map.putAll(getParameters()); return new URL(protocol, username, password, host, port, path, map); }
public URL addParametersIfAbsent(Map<String, String> parameters) { if (CollectionUtils.isEmptyMap(parameters)) { return this; } Map<String, String> map = new HashMap<String, String>(parameters); map.putAll(getParameters()); return new URL(protocol, username, password, host, port, path, map); }
if (CollectionUtils.isEmptyMap(parameters)) { return this;
if (CollectionUtils.isEmptyMap(parameters)) { return this;
private static String toParameterString(ConfigItem item) { StringBuilder sb = new StringBuilder(); sb.append("category="); sb.append(Constants.DYNAMIC_CONFIGURATORS_CATEGORY); if (item.getSide() != null) { sb.append("&side="); sb.append(item.getSide()); } Map<String, String> parameters = item.getParameters(); if (CollectionUtils.isEmptyMap(parameters)) { throw new IllegalStateException("Invalid configurator rule, please specify at least one parameter " + "you want to change in the rule."); } parameters.forEach((k, v) -> { sb.append("&"); sb.append(k); sb.append("="); sb.append(v); }); if (CollectionUtils.isNotEmpty(item.getProviderAddresses())) { sb.append("&"); sb.append(Constants.OVERRIDE_PROVIDERS_KEY); sb.append("="); sb.append(CollectionUtils.join(item.getProviderAddresses(), ",")); } return sb.toString(); }
private static String toParameterString(ConfigItem item) { StringBuilder sb = new StringBuilder(); sb.append("category="); sb.append(Constants.DYNAMIC_CONFIGURATORS_CATEGORY); if (item.getSide() != null) { sb.append("&side="); sb.append(item.getSide()); } Map<String, String> parameters = item.getParameters(); if (CollectionUtils.isEmptyMap(parameters)) { throw new IllegalStateException("Invalid configurator rule, please specify at least one parameter " + "you want to change in the rule."); } parameters.forEach((k, v) -> { sb.append("&"); sb.append(k); sb.append("="); sb.append(v); }); if (CollectionUtils.isNotEmpty(item.getProviderAddresses())) { sb.append("&"); sb.append(Constants.OVERRIDE_PROVIDERS_KEY); sb.append("="); sb.append(CollectionUtils.join(item.getProviderAddresses(), ",")); } return sb.toString(); }
if (CollectionUtils.isEmptyMap(dataSources)) { return new Status(Status.Level.UNKNOWN);
if (CollectionUtils.isEmptyMap(dataSources)) { return new Status(Status.Level.UNKNOWN);
if (CollectionUtils.isEmptyMap(newUrlInvokerMap)) { logger.error(new IllegalStateException("urls to invokers error .invokerUrls.size :" + invokerUrls.size() + ", invoker.size :0. urls :" + invokerUrls .toString()));
if (CollectionUtils.isEmptyMap(newUrlInvokerMap)) { logger.error(new IllegalStateException("urls to invokers error .invokerUrls.size :" + invokerUrls.size() + ", invoker.size :0. urls :" + invokerUrls .toString()));
if (providerConfigMap != null && providerConfigMap.size() > 0) { Map<String, ProtocolConfig> protocolConfigMap = applicationContext == null ? null : BeanFactoryUtils.beansOfTypeIncludingAncestors(applicationContext, ProtocolConfig.class, false, false); if (CollectionUtils.isEmptyMap(protocolConfigMap) && providerConfigMap.size() > 1) { // backward compatibility List<ProviderConfig> providerConfigs = new ArrayList<ProviderConfig>();
if (providerConfigMap != null && providerConfigMap.size() > 0) { Map<String, ProtocolConfig> protocolConfigMap = applicationContext == null ? null : BeanFactoryUtils.beansOfTypeIncludingAncestors(applicationContext, ProtocolConfig.class, false, false); if (CollectionUtils.isEmptyMap(protocolConfigMap) && providerConfigMap.size() > 1) { // backward compatibility List<ProviderConfig> providerConfigs = new ArrayList<ProviderConfig>();