From 7b87767a904be87bfb8e2126d4d79abb6fbc0e40 Mon Sep 17 00:00:00 2001 From: egzosn Date: Fri, 26 Jan 2018 19:40:36 +0800 Subject: [PATCH] =?UTF-8?q?http=E8=AF=B7=E6=B1=82=E9=94=99=E5=88=AB?= =?UTF-8?q?=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/egzosn/pay/common/http/ClientHttpRequest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pay-java-common/src/main/java/com/egzosn/pay/common/http/ClientHttpRequest.java b/pay-java-common/src/main/java/com/egzosn/pay/common/http/ClientHttpRequest.java index 012eed5..f872fe7 100644 --- a/pay-java-common/src/main/java/com/egzosn/pay/common/http/ClientHttpRequest.java +++ b/pay-java-common/src/main/java/com/egzosn/pay/common/http/ClientHttpRequest.java @@ -227,8 +227,8 @@ public class ClientHttpRequest extends HttpEntityEnclosingRequestBase impleme return (T)result; } - String frist = result.substring(0, 1); - if ( ContentType.APPLICATION_JSON.getMimeType().equals( value[0]) || "{[".indexOf(frist) >= 0 ){ + String first = result.substring(0, 1); + if ( ContentType.APPLICATION_JSON.getMimeType().equals( value[0]) || "{[".indexOf(first) >= 0 ){ try { return JSON.parseObject(result, responseType); }catch (JSONException e){ @@ -236,7 +236,7 @@ public class ClientHttpRequest extends HttpEntityEnclosingRequestBase impleme } } - if (ContentType.APPLICATION_XML.getMimeType().equals( value[0]) || "<".indexOf(frist) >= 0){ + if (ContentType.APPLICATION_XML.getMimeType().equals( value[0]) || "<".indexOf(first) >= 0){ return XML.toJSONObject(result).toJavaObject(responseType); }