代码优化,由IDEA自动进行的Code Cleanup

This commit is contained in:
BinaryWang
2016-07-27 17:57:13 +08:00
parent 38ab7759cb
commit b1f0b0787a
44 changed files with 140 additions and 156 deletions

View File

@@ -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();

View File

@@ -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();

View File

@@ -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();

View File

@@ -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();

View File

@@ -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();

View File

@@ -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();

View File

@@ -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 += '?';

View File

@@ -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));
}
}

View File

@@ -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"));