Hello:
I was looking HttpUtils source code and I saw a weird thing in the method:
public static String getEncoding(MediaType mt, String defaultEncoding)
{
String charset = mt == null ? "UTF-8" :
mt.getParameters().get("charset");
return charset == null ? "UTF-8" : charset;
}
What is defaultEncoding parameter for ?
I saw it because I use it in some own JSONProvider implementations.
IMHO, maybe it could be:
public static String getEncoding(MediaType mt, String defaultEncoding)
{
String charset = mt == null ? defaultEncoding :
mt.getParameters().get("charset");
return charset == null ? defaultEncoding : charset;
}
Regards