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:
Sebastian Bazley 2012-06-24 23:56:29 +00:00
parent 21471f8486
commit 94f76c998f
1 changed files with 2 additions and 2 deletions

View File

@ -108,7 +108,7 @@ public class URLEncodedUtils {
if (contentType != null && contentType.getMimeType().equalsIgnoreCase(CONTENT_TYPE)) {
String content = EntityUtils.toString(entity, Consts.ASCII);
if (content != null && content.length() > 0) {
Charset charset = contentType != null ? contentType.getCharset() : null;
Charset charset = contentType.getCharset();
if (charset == null) {
charset = HTTP.DEF_CONTENT_CHARSET;
}
@ -285,7 +285,7 @@ public class URLEncodedUtils {
UNRESERVED.set('(');
UNRESERVED.set(')');
UNRESERVED.set('*');
// punct chats
// punct chars
PUNCT.set(',');
PUNCT.set(';');
PUNCT.set(':');