Commit 1a663440 authored by suhuiguang's avatar suhuiguang

1.空指针判断

parent f3848464
...@@ -917,9 +917,11 @@ public class CommonServiceImpl implements ICommonService { ...@@ -917,9 +917,11 @@ public class CommonServiceImpl implements ICommonService {
sb.append('&'); sb.append('&');
} }
try { try {
sb.append(URLEncoder.encode(key, "UTF-8")) if(value != null && !"".equals(value)){
.append('=') sb.append(URLEncoder.encode(key, "UTF-8"))
.append(URLEncoder.encode(value.toString(), "UTF-8")); .append('=')
.append(URLEncoder.encode(value.toString(), "UTF-8"));
}
} catch (UnsupportedEncodingException e) { } catch (UnsupportedEncodingException e) {
e.printStackTrace(); e.printStackTrace();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment