根据阿里巴巴编码规范修改代码

master
星期八 6 years ago
parent 965e1ea3a7
commit 76b22afd6a
  1. 4
      src/main/java/com/lq/code/util/HttpsClient.java

@ -47,14 +47,14 @@ public class HttpsClient {
Class clazz = params.get(key).getClass();
String objectType = clazz.getName();
if(objectType.equals("java.io.File")){
if("java.io.File".equals(objectType)){
// 这里就是我要上传到服务器的多媒体图片
File file =(File)params.get(key);
mBuilder.addBinaryBody(key,file,
ContentType.APPLICATION_OCTET_STREAM,file
.getName());
}
if(objectType.equals("java.lang.String")){
if("java.lang.String".equals(objectType)){
String value =(String)params.get(key);
mBuilder.addTextBody(key, value);
}

Loading…
Cancel
Save