Code review comment: user's init workload group = normal?

Code before review:
public void update(List<Pair<String, String>> properties) throws UserException {
long newMaxConn = this.commonProperties.getMaxConn();
long newMaxQueryInstances = this.commonProperties.getMaxQueryInstances();
String sqlBlockRules = this.commonProperties.getSqlBlockRules();
int cpuResourceLimit = this.commonProperties.getCpuResourceLimit();
Set<Tag> resourceTags = this.commonProperties.getResourceTags();
long execMemLimit = this.commonProperties.getExecMemLimit();
int queryTimeout = this.commonProperties.getQueryTimeout();
int insertTimeout = this.commonProperties.getInsertTimeout();
String workloadGroup = this.commonProperties.getWorkloadGroup();
String newDefaultLoadCluster = defaultLoadCluster;
Map<String, DppConfig> newDppConfigs = Maps.newHashMap(clusterToDppConfig);
for (Pair<String, String> entry : properties) {
String key = entry.first;
String value = entry.second;
String[] keyArr = key.split("\\" + SetUserPropertyVar.DOT_SEPARATOR);
if (keyArr[0].equalsIgnoreCase(PROP_MAX_USER_CONNECTIONS)) {
if (keyArr.length != 1) {
throw new DdlException(PROP_MAX_USER_CONNECTIONS + " format error");
}
try {
newMaxConn = Long.parseLong(value);
} catch (NumberFormatException e) {
throw new DdlException(PROP_MAX_USER_CONNECTIONS + " is not number");
}
if (newMaxConn <= 0 || newMaxConn > 10000) {
throw new DdlException(PROP_MAX_USER_CONNECTIONS + " is not valid, must between 1 and 10000");
}
} else if (keyArr[0].equalsIgnoreCase(PROP_LOAD_CLUSTER)) {
updateLoadCluster(keyArr, value, newDppConfigs);
} else if (keyArr[0].equalsIgnoreCase(PROP_DEFAULT_LOAD_CLUSTER)) {
if (keyArr.length != 1) {
throw new DdlException(PROP_DEFAULT_LOAD_CLUSTER + " format error");
}
if (value != null && !newDppConfigs.containsKey(value)) {
throw new DdlException("Load cluster[" + value + "] does not exist");
}
newDefaultLoadCluster = value;
} else if (keyArr[0].equalsIgnoreCase(PROP_MAX_QUERY_INSTANCES)) {
if (keyArr.length != 1) {
throw new DdlException(PROP_MAX_QUERY_INSTANCES + " format error");
}
try {
newMaxQueryInstances = Long.parseLong(value);
} catch (NumberFormatException e) {
throw new DdlException(PROP_MAX_QUERY_INSTANCES + " is not number");
}
} else if (keyArr[0].equalsIgnoreCase(PROP_SQL_BLOCK_RULES)) {
if (keyArr.length != 1) {
throw new DdlException(PROP_SQL_BLOCK_RULES + " format error");
}
for (String ruleName : value.replaceAll(" ", "").split(",")) {
if (!ruleName.equals("") && !Env.getCurrentEnv().getSqlBlockRuleMgr().existRule(ruleName)) {
throw new DdlException("the sql block rule " + ruleName + " not exist");
}
}
sqlBlockRules = value;
} else if (keyArr[0].equalsIgnoreCase(PROP_CPU_RESOURCE_LIMIT)) {
if (keyArr.length != 1) {
throw new DdlException(PROP_CPU_RESOURCE_LIMIT + " format error");
}
int limit = -1;
try {
limit = Integer.parseInt(value);
} catch (NumberFormatException e) {
throw new DdlException(key + " is not number");
}
if (limit <= 0 && limit != -1) {
throw new DdlException(key + " is not valid. Should not larger than 0 or equal to -1");
}
cpuResourceLimit = limit;
} else if (keyArr[0].equalsIgnoreCase(PROP_RESOURCE_TAGS)) {
if (keyArr.length != 2) {
throw new DdlException(PROP_RESOURCE_TAGS + " format error");
}
if (!keyArr[1].equals(Tag.TYPE_LOCATION)) {
throw new DdlException("Only support location tag now");
}
if (Strings.isNullOrEmpty(value)) {
resourceTags = Sets.newHashSet();
} else {
try {
resourceTags = parseLocationResoureTags(value);
} catch (NumberFormatException e) {
throw new DdlException(PROP_RESOURCE_TAGS + " parse failed: " + e.getMessage());
}
}
} else if (keyArr[0].equalsIgnoreCase(PROP_EXEC_MEM_LIMIT)) {
execMemLimit = getLongProperty(key, value, keyArr, PROP_EXEC_MEM_LIMIT);
} else if (keyArr[0].equalsIgnoreCase(PROP_USER_QUERY_TIMEOUT)) {
if (keyArr.length != 1) {
throw new DdlException(PROP_USER_QUERY_TIMEOUT + " format error");
}
try {
queryTimeout = Integer.parseInt(value);
} catch (NumberFormatException e) {
throw new DdlException(PROP_USER_QUERY_TIMEOUT + " is not number");
}
} else if (keyArr[0].equalsIgnoreCase(PROP_USER_INSERT_TIMEOUT)) {
if (keyArr.length != 1) {
throw new DdlException(PROP_USER_INSERT_TIMEOUT + " format error");
}
try {
insertTimeout = Integer.parseInt(value);
} catch (NumberFormatException e) {
throw new DdlException(PROP_USER_INSERT_TIMEOUT + " is not number");
}
} else if (keyArr[0].equalsIgnoreCase(PROP_WORKLOAD_GROUP)) {
if (keyArr.length != 1) {
throw new DdlException(PROP_WORKLOAD_GROUP + " format error");
}
workloadGroup = value;
} else {
throw new DdlException("Unknown user property(" + key + ")");
}
}
this.commonProperties.setMaxConn(newMaxConn);
this.commonProperties.setMaxQueryInstances(newMaxQueryInstances);
this.commonProperties.setSqlBlockRules(sqlBlockRules);
this.commonProperties.setCpuResourceLimit(cpuResourceLimit);
this.commonProperties.setResourceTags(resourceTags);
this.commonProperties.setExecMemLimit(execMemLimit);
this.commonProperties.setQueryTimeout(queryTimeout);
this.commonProperties.setInsertTimeout(insertTimeout);
this.commonProperties.setWorkloadGroup(workloadGroup);
if (newDppConfigs.containsKey(newDefaultLoadCluster)) {
defaultLoadCluster = newDefaultLoadCluster;
} else {
defaultLoadCluster = null;
}
clusterToDppConfig = newDppConfigs;
}

Line under review: String workloadGroup = this.commonProperties.getWorkloadGroup();

Code after addressing the review:
public void update(List<Pair<String, String>> properties) throws UserException {
long newMaxConn = this.commonProperties.getMaxConn();
long newMaxQueryInstances = this.commonProperties.getMaxQueryInstances();
String sqlBlockRules = this.commonProperties.getSqlBlockRules();
int cpuResourceLimit = this.commonProperties.getCpuResourceLimit();
Set<Tag> resourceTags = this.commonProperties.getResourceTags();
long execMemLimit = this.commonProperties.getExecMemLimit();
int queryTimeout = this.commonProperties.getQueryTimeout();
int insertTimeout = this.commonProperties.getInsertTimeout();
String workloadGroup = this.commonProperties.getWorkloadGroup();
String newDefaultLoadCluster = defaultLoadCluster;
Map<String, DppConfig> newDppConfigs = Maps.newHashMap(clusterToDppConfig);
for (Pair<String, String> entry : properties) {
String key = entry.first;
String value = entry.second;
String[] keyArr = key.split("\\" + SetUserPropertyVar.DOT_SEPARATOR);
if (keyArr[0].equalsIgnoreCase(PROP_MAX_USER_CONNECTIONS)) {
if (keyArr.length != 1) {
throw new DdlException(PROP_MAX_USER_CONNECTIONS + " format error");
}
try {
newMaxConn = Long.parseLong(value);
} catch (NumberFormatException e) {
throw new DdlException(PROP_MAX_USER_CONNECTIONS + " is not number");
}
if (newMaxConn <= 0 || newMaxConn > 10000) {
throw new DdlException(PROP_MAX_USER_CONNECTIONS + " is not valid, must between 1 and 10000");
}
} else if (keyArr[0].equalsIgnoreCase(PROP_LOAD_CLUSTER)) {
updateLoadCluster(keyArr, value, newDppConfigs);
} else if (keyArr[0].equalsIgnoreCase(PROP_DEFAULT_LOAD_CLUSTER)) {
if (keyArr.length != 1) {
throw new DdlException(PROP_DEFAULT_LOAD_CLUSTER + " format error");
}
if (value != null && !newDppConfigs.containsKey(value)) {
throw new DdlException("Load cluster[" + value + "] does not exist");
}
newDefaultLoadCluster = value;
} else if (keyArr[0].equalsIgnoreCase(PROP_MAX_QUERY_INSTANCES)) {
if (keyArr.length != 1) {
throw new DdlException(PROP_MAX_QUERY_INSTANCES + " format error");
}
try {
newMaxQueryInstances = Long.parseLong(value);
} catch (NumberFormatException e) {
throw new DdlException(PROP_MAX_QUERY_INSTANCES + " is not number");
}
} else if (keyArr[0].equalsIgnoreCase(PROP_SQL_BLOCK_RULES)) {
if (keyArr.length != 1) {
throw new DdlException(PROP_SQL_BLOCK_RULES + " format error");
}
for (String ruleName : value.replaceAll(" ", "").split(",")) {
if (!ruleName.equals("") && !Env.getCurrentEnv().getSqlBlockRuleMgr().existRule(ruleName)) {
throw new DdlException("the sql block rule " + ruleName + " not exist");
}
}
sqlBlockRules = value;
} else if (keyArr[0].equalsIgnoreCase(PROP_CPU_RESOURCE_LIMIT)) {
if (keyArr.length != 1) {
throw new DdlException(PROP_CPU_RESOURCE_LIMIT + " format error");
}
int limit = -1;
try {
limit = Integer.parseInt(value);
} catch (NumberFormatException e) {
throw new DdlException(key + " is not number");
}
if (limit <= 0 && limit != -1) {
throw new DdlException(key + " is not valid. Should not larger than 0 or equal to -1");
}
cpuResourceLimit = limit;
} else if (keyArr[0].equalsIgnoreCase(PROP_RESOURCE_TAGS)) {
if (keyArr.length != 2) {
throw new DdlException(PROP_RESOURCE_TAGS + " format error");
}
if (!keyArr[1].equals(Tag.TYPE_LOCATION)) {
throw new DdlException("Only support location tag now");
}
if (Strings.isNullOrEmpty(value)) {
resourceTags = Sets.newHashSet();
} else {
try {
resourceTags = parseLocationResoureTags(value);
} catch (NumberFormatException e) {
throw new DdlException(PROP_RESOURCE_TAGS + " parse failed: " + e.getMessage());
}
}
} else if (keyArr[0].equalsIgnoreCase(PROP_EXEC_MEM_LIMIT)) {
execMemLimit = getLongProperty(key, value, keyArr, PROP_EXEC_MEM_LIMIT);
} else if (keyArr[0].equalsIgnoreCase(PROP_USER_QUERY_TIMEOUT)) {
if (keyArr.length != 1) {
throw new DdlException(PROP_USER_QUERY_TIMEOUT + " format error");
}
try {
queryTimeout = Integer.parseInt(value);
} catch (NumberFormatException e) {
throw new DdlException(PROP_USER_QUERY_TIMEOUT + " is not number");
}
} else if (keyArr[0].equalsIgnoreCase(PROP_USER_INSERT_TIMEOUT)) {
if (keyArr.length != 1) {
throw new DdlException(PROP_USER_INSERT_TIMEOUT + " format error");
}
try {
insertTimeout = Integer.parseInt(value);
} catch (NumberFormatException e) {
throw new DdlException(PROP_USER_INSERT_TIMEOUT + " is not number");
}
} else if (keyArr[0].equalsIgnoreCase(PROP_WORKLOAD_GROUP)) {
if (keyArr.length != 1) {
throw new DdlException(PROP_WORKLOAD_GROUP + " format error");
}
workloadGroup = value;
} else {
throw new DdlException("Unknown user property(" + key + ")");
}
}
this.commonProperties.setMaxConn(newMaxConn);
this.commonProperties.setMaxQueryInstances(newMaxQueryInstances);
this.commonProperties.setSqlBlockRules(sqlBlockRules);
this.commonProperties.setCpuResourceLimit(cpuResourceLimit);
this.commonProperties.setResourceTags(resourceTags);
this.commonProperties.setExecMemLimit(execMemLimit);
this.commonProperties.setQueryTimeout(queryTimeout);
this.commonProperties.setInsertTimeout(insertTimeout);
this.commonProperties.setWorkloadGroup(workloadGroup);
if (newDppConfigs.containsKey(newDefaultLoadCluster)) {
defaultLoadCluster = newDefaultLoadCluster;
} else {
defaultLoadCluster = null;
}
clusterToDppConfig = newDppConfigs;
}