mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-10-14 18:25:10 +08:00
修复checkstyle检查出来的部分代码问题
This commit is contained in:
@@ -3,7 +3,7 @@ package cn.binarywang.wx.miniapp.bean;
|
||||
import cn.binarywang.wx.miniapp.util.json.WxMaGsonBuilder;
|
||||
|
||||
/**
|
||||
* 微信二维码(小程序码)包装器
|
||||
* 微信二维码(小程序码)包装器.
|
||||
*
|
||||
* @author Element
|
||||
*/
|
||||
|
@@ -15,6 +15,9 @@ public class BaseBuilder<T> {
|
||||
return (T) this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 构造器方法.
|
||||
*/
|
||||
public WxMaKefuMessage build() {
|
||||
WxMaKefuMessage m = new WxMaKefuMessage();
|
||||
m.setMsgType(this.msgType);
|
||||
|
@@ -36,11 +36,9 @@ public class QrCodeRequestExecutor implements RequestExecutor<File, AbstractWxMa
|
||||
public File execute(String uri, AbstractWxMaQrcodeWrapper ticket) throws WxErrorException, IOException {
|
||||
HttpPost httpPost = new HttpPost(uri);
|
||||
if (requestHttp.getRequestHttpProxy() != null) {
|
||||
httpPost
|
||||
.setConfig(RequestConfig.custom()
|
||||
.setProxy(requestHttp.getRequestHttpProxy())
|
||||
.build()
|
||||
);
|
||||
httpPost.setConfig(
|
||||
RequestConfig.custom().setProxy(requestHttp.getRequestHttpProxy()).build()
|
||||
);
|
||||
}
|
||||
httpPost.setEntity(new StringEntity(ticket.toString()));
|
||||
|
||||
@@ -48,8 +46,8 @@ public class QrCodeRequestExecutor implements RequestExecutor<File, AbstractWxMa
|
||||
InputStream inputStream = InputStreamResponseHandler.INSTANCE.handleResponse(response);) {
|
||||
Header[] contentTypeHeader = response.getHeaders("Content-Type");
|
||||
if (contentTypeHeader != null && contentTypeHeader.length > 0
|
||||
&& ContentType.APPLICATION_JSON.getMimeType()
|
||||
.equals(ContentType.parse(contentTypeHeader[0].getValue()).getMimeType())) {
|
||||
&& ContentType.APPLICATION_JSON.getMimeType()
|
||||
.equals(ContentType.parse(contentTypeHeader[0].getValue()).getMimeType())) {
|
||||
String responseContent = Utf8ResponseHandler.INSTANCE.handleResponse(response);
|
||||
throw new WxErrorException(WxError.fromJson(responseContent));
|
||||
}
|
||||
|
@@ -18,7 +18,7 @@ public class XStreamTransformer {
|
||||
}
|
||||
|
||||
/**
|
||||
* xml -> pojo
|
||||
* xml -> pojo.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public static <T> T fromXml(Class<T> clazz, String xml) {
|
||||
@@ -33,14 +33,14 @@ public class XStreamTransformer {
|
||||
}
|
||||
|
||||
/**
|
||||
* pojo -> xml
|
||||
* pojo -> xml.
|
||||
*/
|
||||
public static <T> String toXml(Class<T> clazz, T object) {
|
||||
return CLASS_2_XSTREAM_INSTANCE.get(clazz).toXML(object);
|
||||
}
|
||||
|
||||
/**
|
||||
* 注册扩展消息的解析器
|
||||
* 注册扩展消息的解析器.
|
||||
*
|
||||
* @param clz 类型
|
||||
* @param xStream xml解析器
|
||||
@@ -50,7 +50,7 @@ public class XStreamTransformer {
|
||||
}
|
||||
|
||||
/**
|
||||
* 会自动注册该类及其子类
|
||||
* 会自动注册该类及其子类.
|
||||
*
|
||||
* @param clz 要注册的类
|
||||
*/
|
||||
|
Reference in New Issue
Block a user