Eclipse says: contentType cannot be null here
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1353365 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
21471f8486
commit
94f76c998f
|
@ -108,7 +108,7 @@ public class URLEncodedUtils {
|
||||||
if (contentType != null && contentType.getMimeType().equalsIgnoreCase(CONTENT_TYPE)) {
|
if (contentType != null && contentType.getMimeType().equalsIgnoreCase(CONTENT_TYPE)) {
|
||||||
String content = EntityUtils.toString(entity, Consts.ASCII);
|
String content = EntityUtils.toString(entity, Consts.ASCII);
|
||||||
if (content != null && content.length() > 0) {
|
if (content != null && content.length() > 0) {
|
||||||
Charset charset = contentType != null ? contentType.getCharset() : null;
|
Charset charset = contentType.getCharset();
|
||||||
if (charset == null) {
|
if (charset == null) {
|
||||||
charset = HTTP.DEF_CONTENT_CHARSET;
|
charset = HTTP.DEF_CONTENT_CHARSET;
|
||||||
}
|
}
|
||||||
|
@ -285,7 +285,7 @@ public class URLEncodedUtils {
|
||||||
UNRESERVED.set('(');
|
UNRESERVED.set('(');
|
||||||
UNRESERVED.set(')');
|
UNRESERVED.set(')');
|
||||||
UNRESERVED.set('*');
|
UNRESERVED.set('*');
|
||||||
// punct chats
|
// punct chars
|
||||||
PUNCT.set(',');
|
PUNCT.set(',');
|
||||||
PUNCT.set(';');
|
PUNCT.set(';');
|
||||||
PUNCT.set(':');
|
PUNCT.set(':');
|
||||||
|
|
Loading…
Reference in New Issue