Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unit test for AbstractConfigTest #1716

Merged
merged 11 commits into from
May 3, 2018
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,7 @@ public static Properties getProperties() {
}

public static void setProperties(Properties properties) {
if (properties != null) {
PROPERTIES = properties;
}
PROPERTIES = properties;
}

public static void addProperties(Properties properties) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,11 +214,11 @@ && isPrimitive(method.getReturnType())) {
str = URL.encode(str);
}
if (parameter != null && parameter.append()) {
String pre = (String) parameters.get(Constants.DEFAULT_KEY + "." + key);
String pre = parameters.get(Constants.DEFAULT_KEY + "." + key);
if (pre != null && pre.length() > 0) {
str = pre + "," + str;
}
pre = (String) parameters.get(key);
pre = parameters.get(key);
if (pre != null && pre.length() > 0) {
str = pre + "," + str;
}
Expand Down Expand Up @@ -387,7 +387,6 @@ protected static void checkParameterName(Map<String, String> parameters) {
return;
}
for (Map.Entry<String, String> entry : parameters.entrySet()) {
//change by tony.chenl parameter value maybe has colon.for example napoli address
checkNameHasSymbol(entry.getKey(), entry.getValue());
}
}
Expand All @@ -402,7 +401,8 @@ protected static void checkProperty(String property, String value, int maxlength
if (pattern != null) {
Matcher matcher = pattern.matcher(value);
if (!matcher.matches()) {
throw new IllegalStateException("Invalid " + property + "=\"" + value + "\" contain illegal charactor, only digit, letter, '-', '_' and '.' is legal.");
throw new IllegalStateException("Invalid " + property + "=\"" + value + "\" contains illegal " +
"character, only digit, letter, '-', '_' or '.' is legal.");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ public String getStub() {
}

public void setStub(Boolean stub) {
if (local == null) {
if (stub == null) {
setStub((String) null);
} else {
setStub(String.valueOf(stub));
Expand Down
Loading