From 76b22afd6a35af1a60de608c71d5975d876a8239 Mon Sep 17 00:00:00 2001 From: qi_liang Date: Sat, 15 Jun 2019 00:28:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E9=98=BF=E9=87=8C=E5=B7=B4?= =?UTF-8?q?=E5=B7=B4=E7=BC=96=E7=A0=81=E8=A7=84=E8=8C=83=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/lq/code/util/HttpsClient.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/lq/code/util/HttpsClient.java b/src/main/java/com/lq/code/util/HttpsClient.java index e7e0514..03d3efe 100755 --- a/src/main/java/com/lq/code/util/HttpsClient.java +++ b/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); }