Skip to content

Commit

Permalink
Merge pull request #1716, unit test for AbstractConfigTest.
Browse files Browse the repository at this point in the history
  • Loading branch information
beiwei30 authored and chickenlj committed May 3, 2018
1 parent b9b98c8 commit 46c6ccb
Show file tree
Hide file tree
Showing 19 changed files with 1,193 additions and 8 deletions.
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

0 comments on commit 46c6ccb

Please sign in to comment.