检查数字是否为非负数（>=0)

@param configKey   配置项
@param configValue 配置值
@throws SofaRpcRuntimeException 非法异常
16590
protected static void checkNotNegativeInteger(String configKey, int configValue) throws SofaRpcRuntimeException {
        if (configValue < 0) {
            throw ExceptionUtils.buildRuntime(configKey, configValue + "", "must >= 0");
        }
    }
478558
protected function encodeConfigValue(ConfigValue $configValue)
	{
		return ($configValue->isDeduplicated()) ? $configValue->getVarName() : $this->encode($configValue->getValue());
	}
162749
@Override
    public Object getValue(String name)
    {
        Object value = super.getValue(name);
        if (value != null)
        {
            return value;
        }
        else
        {
            return configMap.get(name);
        }
    }
331172
public String get(ConfigKey pKey) {
        String value = params.get(pKey);
        if (value != null) {
            return value;
        } else {
            return pKey.getDefaultValue();
        }
    }
705952
public void setValue(String constantValue)
    {
        this.fieldSource = SOURCE_VALUE;
        this.fieldRefName = null;
        this.returnedByProcedure = false;
        this.constantValue = constantValue;
    }
1108964
protected function _getConfigValueArrayMultiple($configKey = null) {
		$result = $this->_getConfigValueArray($configKey);
		if ((count($result) > 0) && (count($result) === count($result, COUNT_RECURSIVE))) {
			$result = [$result];
		}

		return $result;
	}
521243
protected static String getStringValue(Configuration config, String key) {
        try {
            String values[] = config.getStringArray(key);
            if (values == null) {
                return null;
            }
            if (values.length == 0) {
                return config.getString(key);
            } else if (values.length == 1) {
                return values[0];
            }

            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < values.length; i++) {
                sb.append(values[i]);
                if (i != values.length - 1) {
                    sb.append(",");
                }
            }
            return sb.toString();
        } catch (Exception e) {
            Object v = config.getProperty(key);
            if (v != null) {
                return String.valueOf(v);
            } else {
                return null;
            }
        }
    }
862245
private static void logDefault(final String key, final String defaultValue) {

        // Fortify will report a violation here because of disclosure of potentially confidential information.
        // However, neither the configuration keys nor the default propsbuilder values are confidential, which makes
        // this a non-issue / false positive.
        if (LOG.isInfoEnabled()) {
            final StringBuilder msg = new StringBuilder("Key is not configured ('")
                    .append(key)
                    .append("'), using default value ('");
            if (defaultValue == null) {
                msg.append("null')");
            } else {
                msg.append(defaultValue).append("')");
            }
            LOG.info(msg.toString());
        }
    }
559879
private void processKeyValue(Map<ConfigurationKey, Object> properties, String stringKey, Object value) {
        processKeyValue(properties, stringKey, value, false);
    }
309839
public Map<String,Object> addConfigProperty(Map<String,Object> properties, String key, String defaultValue)
    {
    	if (this.getProperty(key) != null)
    		properties.put(key, this.getProperty(key));
    	else if (defaultValue != null)
    		properties.put(key, defaultValue);
    	return properties;
    }
480225
public function removeConfigValue(\VinceT\AdminConfigurationBundle\Entity\ConfigValue $configValue)
    {
        $this->configValues->removeElement($configValue);
    }
494659
public function getConfigFlag($configKey, $store = null)
    {
        // if a value is given store, use it, even if it is null/false/empty string/whatever
        $store = count(func_get_args()) > 1 ? $store : $this->getStore();
        return $this->_getStoreConfigValue($configKey, $store, true);
    }
903159
private static void assignConfigField(int configNum, DatabaseFieldConfig config, Field field, Object value) {
		switch (configNum) {
			case COLUMN_NAME:
				config.setColumnName(valueIfNotBlank((String) value));
				break;
			case DATA_TYPE:
				config.setDataType((DataType) value);
				break;
			case DEFAULT_VALUE:
				String defaultValue = (String) value;
				if (!(defaultValue == null || defaultValue.equals(DatabaseField.DEFAULT_STRING))) {
					config.setDefaultValue(defaultValue);
				}
				break;
			case WIDTH:
				config.setWidth((Integer) value);
				break;
			case CAN_BE_NULL:
				config.setCanBeNull((Boolean) value);
				break;
			case ID:
				config.setId((Boolean) value);
				break;
			case GENERATED_ID:
				config.setGeneratedId((Boolean) value);
				break;
			case GENERATED_ID_SEQUENCE:
				config.setGeneratedIdSequence(valueIfNotBlank((String) value));
				break;
			case FOREIGN:
				config.setForeign((Boolean) value);
				break;
			case USE_GET_SET:
				config.setUseGetSet((Boolean) value);
				break;
			case UNKNOWN_ENUM_NAME:
				config.setUnknownEnumValue(DatabaseFieldConfig.findMatchingEnumVal(field, (String) value));
				break;
			case THROW_IF_NULL:
				config.setThrowIfNull((Boolean) value);
				break;
			case PERSISTED:
				config.setPersisted((Boolean) value);
				break;
			case FORMAT:
				config.setFormat(valueIfNotBlank((String) value));
				break;
			case UNIQUE:
				config.setUnique((Boolean) value);
				break;
			case UNIQUE_COMBO:
				config.setUniqueCombo((Boolean) value);
				break;
			case INDEX:
				config.setIndex((Boolean) value);
				break;
			case UNIQUE_INDEX:
				config.setUniqueIndex((Boolean) value);
				break;
			case INDEX_NAME:
				config.setIndexName(valueIfNotBlank((String) value));
				break;
			case UNIQUE_INDEX_NAME:
				config.setUniqueIndexName(valueIfNotBlank((String) value));
				break;
			case FOREIGN_AUTO_REFRESH:
				config.setForeignAutoRefresh((Boolean) value);
				break;
			case MAX_FOREIGN_AUTO_REFRESH_LEVEL:
				config.setMaxForeignAutoRefreshLevel((Integer) value);
				break;
			case PERSISTER_CLASS:
				@SuppressWarnings("unchecked")
				Class<? extends DataPersister> clazz = (Class<? extends DataPersister>) value;
				config.setPersisterClass(clazz);
				break;
			case ALLOW_GENERATED_ID_INSERT:
				config.setAllowGeneratedIdInsert((Boolean) value);
				break;
			case COLUMN_DEFINITON:
				config.setColumnDefinition(valueIfNotBlank((String) value));
				break;
			case FULL_COLUMN_DEFINITON:
				config.setFullColumnDefinition(valueIfNotBlank((String) value));
				break;
			case FOREIGN_AUTO_CREATE:
				config.setForeignAutoCreate((Boolean) value);
				break;
			case VERSION:
				config.setVersion((Boolean) value);
				break;
			case FOREIGN_COLUMN_NAME:
				config.setForeignColumnName(valueIfNotBlank((String) value));
				break;
			case READ_ONLY:
				config.setReadOnly((Boolean) value);
				break;
			default:
				throw new IllegalStateException("Could not find support for DatabaseField number " + configNum);
		}
	}
395109
private static String getDatasetFromConfigKey(ConfigKeyPath configKey) {
    return StringUtils.removeStart(configKey.getAbsolutePathString(), SingleLinkedListConfigKeyPath.PATH_DELIMETER);
  }
1077020
public static String getStringValue(String primaryKey) {
        String val = (String) CFG.get(primaryKey);
        if (val == null) {
            throw new SofaRpcRuntimeException("Not Found Key: " + primaryKey);
        } else {
            return val;
        }
    }
1050339
public function set($configOption, $configValue)
    {
        $this->repository->git(sprintf('config --local %s %s', $configOption, $configValue));
        unset($this->configuration[$configOption]);
    }
896219
public Object getMethodConfigValue(String methodName, String configKey) {
        if (configValueCache == null) {
            return null;
        }
        String key = buildmkey(methodName, configKey);
        return configValueCache.get(key);
    }