添加null判断,避免NPE

git-svn-id: http://code.alibabatech.com/svn/dubbo/trunk@260 1a56cb94-b969-4eaa-88fa-be21384802f2
This commit is contained in:
ding.lid 2011-11-14 06:46:25 +00:00
parent 6dbfb5c37e
commit b013e7bdf8
1 changed files with 1 additions and 1 deletions

View File

@ -880,7 +880,7 @@ public final class URL implements Serializable {
}
private void buildParameters(StringBuilder buf, boolean concat, String[] parameters) {
if (getParameters().size() > 0) {
if (getParameters() !=null && getParameters().size() > 0) {
List<String> includes = (parameters == null || parameters.length == 0 ? null : Arrays.asList(parameters));
boolean first = true;
for (Map.Entry<String, String> entry : new TreeMap<String, String>(getParameters()).entrySet()) {