mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-03-10 00:13:40 +08:00
代码优化,由IDEA自动进行的Code Cleanup
This commit is contained in:
@@ -24,7 +24,7 @@ public class MaterialDeleteRequestExecutor implements RequestExecutor<Boolean, S
|
||||
super();
|
||||
}
|
||||
|
||||
public Boolean execute(CloseableHttpClient httpclient, HttpHost httpProxy, String uri, String materialId) throws WxErrorException, ClientProtocolException, IOException {
|
||||
public Boolean execute(CloseableHttpClient httpclient, HttpHost httpProxy, String uri, String materialId) throws WxErrorException, IOException {
|
||||
HttpPost httpPost = new HttpPost(uri);
|
||||
if (httpProxy != null) {
|
||||
RequestConfig config = RequestConfig.custom().setProxy(httpProxy).build();
|
||||
|
||||
@@ -25,7 +25,7 @@ public class MaterialNewsInfoRequestExecutor implements RequestExecutor<WxMpMate
|
||||
super();
|
||||
}
|
||||
|
||||
public WxMpMaterialNews execute(CloseableHttpClient httpclient, HttpHost httpProxy, String uri, String materialId) throws WxErrorException, ClientProtocolException, IOException {
|
||||
public WxMpMaterialNews execute(CloseableHttpClient httpclient, HttpHost httpProxy, String uri, String materialId) throws WxErrorException, IOException {
|
||||
HttpPost httpPost = new HttpPost(uri);
|
||||
if (httpProxy != null) {
|
||||
RequestConfig config = RequestConfig.custom().setProxy(httpProxy).build();
|
||||
|
||||
@@ -23,7 +23,7 @@ import java.util.Map;
|
||||
public class MaterialUploadRequestExecutor implements RequestExecutor<WxMpMaterialUploadResult, WxMpMaterial> {
|
||||
|
||||
@Override
|
||||
public WxMpMaterialUploadResult execute(CloseableHttpClient httpclient, HttpHost httpProxy, String uri, WxMpMaterial material) throws WxErrorException, ClientProtocolException, IOException {
|
||||
public WxMpMaterialUploadResult execute(CloseableHttpClient httpclient, HttpHost httpProxy, String uri, WxMpMaterial material) throws WxErrorException, IOException {
|
||||
HttpPost httpPost = new HttpPost(uri);
|
||||
if (httpProxy != null) {
|
||||
RequestConfig response = RequestConfig.custom().setProxy(httpProxy).build();
|
||||
|
||||
@@ -24,7 +24,7 @@ public class MaterialVideoInfoRequestExecutor implements RequestExecutor<WxMpMat
|
||||
super();
|
||||
}
|
||||
|
||||
public WxMpMaterialVideoInfoResult execute(CloseableHttpClient httpclient, HttpHost httpProxy, String uri, String materialId) throws WxErrorException, ClientProtocolException, IOException {
|
||||
public WxMpMaterialVideoInfoResult execute(CloseableHttpClient httpclient, HttpHost httpProxy, String uri, String materialId) throws WxErrorException, IOException {
|
||||
HttpPost httpPost = new HttpPost(uri);
|
||||
if (httpProxy != null) {
|
||||
RequestConfig config = RequestConfig.custom().setProxy(httpProxy).build();
|
||||
|
||||
@@ -34,7 +34,7 @@ public class MaterialVoiceAndImageDownloadRequestExecutor implements RequestExec
|
||||
this.tmpDirFile = tmpDirFile;
|
||||
}
|
||||
|
||||
public InputStream execute(CloseableHttpClient httpclient, HttpHost httpProxy, String uri, String materialId) throws WxErrorException, ClientProtocolException, IOException {
|
||||
public InputStream execute(CloseableHttpClient httpclient, HttpHost httpProxy, String uri, String materialId) throws WxErrorException, IOException {
|
||||
HttpPost httpPost = new HttpPost(uri);
|
||||
if (httpProxy != null) {
|
||||
RequestConfig config = RequestConfig.custom().setProxy(httpProxy).build();
|
||||
|
||||
@@ -24,7 +24,7 @@ import java.io.IOException;
|
||||
*/
|
||||
public class MediaImgUploadRequestExecutor implements RequestExecutor<WxMediaImgUploadResult, File> {
|
||||
@Override
|
||||
public WxMediaImgUploadResult execute(CloseableHttpClient httpclient, HttpHost httpProxy, String uri, File data) throws WxErrorException, ClientProtocolException, IOException {
|
||||
public WxMediaImgUploadResult execute(CloseableHttpClient httpclient, HttpHost httpProxy, String uri, File data) throws WxErrorException, IOException {
|
||||
HttpPost httpPost = new HttpPost(uri);
|
||||
if (httpProxy != null) {
|
||||
RequestConfig config = RequestConfig.custom().setProxy(httpProxy).build();
|
||||
|
||||
@@ -31,7 +31,7 @@ public class QrCodeRequestExecutor implements RequestExecutor<File, WxMpQrCodeTi
|
||||
|
||||
@Override
|
||||
public File execute(CloseableHttpClient httpclient, HttpHost httpProxy, String uri,
|
||||
WxMpQrCodeTicket ticket) throws WxErrorException, ClientProtocolException, IOException {
|
||||
WxMpQrCodeTicket ticket) throws WxErrorException, IOException {
|
||||
if (ticket != null) {
|
||||
if (uri.indexOf('?') == -1) {
|
||||
uri += '?';
|
||||
|
||||
@@ -18,7 +18,7 @@ public class WxLongTimeJsonSerializer extends JsonSerializer<Long> {
|
||||
@Override
|
||||
public void serialize(Long value, JsonGenerator gen,
|
||||
SerializerProvider serializers)
|
||||
throws IOException, JsonProcessingException {
|
||||
throws IOException {
|
||||
gen.writeString(DF.format(value * 1000));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ public class WxMpUserGsonAdapter implements JsonDeserializer<WxMpUser> {
|
||||
WxMpUser wxMpUser = new WxMpUser();
|
||||
Integer subscribe = GsonHelper.getInteger(o, "subscribe");
|
||||
if (subscribe != null) {
|
||||
wxMpUser.setSubscribe(new Integer(0).equals(subscribe) ? false : true);
|
||||
wxMpUser.setSubscribe(!new Integer(0).equals(subscribe));
|
||||
}
|
||||
wxMpUser.setCity(GsonHelper.getString(o, "city"));
|
||||
wxMpUser.setCountry(GsonHelper.getString(o, "country"));
|
||||
|
||||
Reference in New Issue
Block a user