Skip to content

Commit 7a68fa6

Browse files
committed
remove redundant specification of type arguments
1 parent 0b2f443 commit 7a68fa6

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

weixin-java-mp/src/main/java/me/chanjar/weixin/mp/api/WxMpServiceImpl.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,7 @@ public void setMaxRetryTimes(int maxRetryTimes) {
825825

826826
@Override
827827
public WxMpPrepayIdResult getPrepayId(String openId, String outTradeNo, double amt, String body, String tradeType, String ip, String callbackUrl) {
828-
Map<String, String> packageParams = new HashMap<String, String>();
828+
Map<String, String> packageParams = new HashMap<>();
829829
packageParams.put("appid", this.wxMpConfigStorage.getAppId());
830830
packageParams.put("mch_id", this.wxMpConfigStorage.getPartnerId());
831831
packageParams.put("body", body);
@@ -843,7 +843,7 @@ public WxMpPrepayIdResult getPrepayId(String openId, String outTradeNo, double a
843843
public WxMpPrepayIdResult getPrepayId(final Map<String, String> parameters) {
844844
String nonce_str = System.currentTimeMillis() + "";
845845

846-
final SortedMap<String, String> packageParams = new TreeMap<String, String>(parameters);
846+
final SortedMap<String, String> packageParams = new TreeMap<>(parameters);
847847
packageParams.put("appid", this.wxMpConfigStorage.getAppId());
848848
packageParams.put("mch_id", this.wxMpConfigStorage.getPartnerId());
849849
packageParams.put("nonce_str", nonce_str);
@@ -895,7 +895,7 @@ private void checkParameters(Map<String, String> parameters) {
895895

896896
@Override
897897
public Map<String, String> getJsapiPayInfo(String openId,String outTradeNo, double amt, String body,String ip, String callbackUrl) throws WxErrorException{
898-
Map<String, String> packageParams = new HashMap<String, String>();
898+
Map<String, String> packageParams = new HashMap<>();
899899
packageParams.put("appid", this.wxMpConfigStorage.getAppId());
900900
packageParams.put("mch_id", this.wxMpConfigStorage.getPartnerId());
901901
packageParams.put("body", body);
@@ -911,7 +911,7 @@ public Map<String, String> getJsapiPayInfo(String openId,String outTradeNo, doub
911911

912912
@Override
913913
public Map<String, String> getNativePayInfo(String productId,String outTradeNo, double amt, String body,String ip, String callbackUrl) throws WxErrorException{
914-
Map<String, String> packageParams = new HashMap<String, String>();
914+
Map<String, String> packageParams = new HashMap<>();
915915
packageParams.put("appid", this.wxMpConfigStorage.getAppId());
916916
packageParams.put("mch_id", this.wxMpConfigStorage.getPartnerId());
917917
packageParams.put("body", body);
@@ -946,15 +946,15 @@ public Map<String, String> getPayInfo(Map<String, String> parameters) throws WxE
946946
throw new RuntimeException(String.format("Failed to get prepay id due to error code '%s'(%s).", wxMpPrepayIdResult.getErr_code(), wxMpPrepayIdResult.getErr_code_des()));
947947
}
948948

949-
Map<String, String> payInfo = new HashMap<String, String>();
949+
Map<String, String> payInfo = new HashMap<>();
950950
payInfo.put("appId", this.wxMpConfigStorage.getAppId());
951951
// 支付签名时间戳,注意微信jssdk中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符
952952
payInfo.put("timeStamp", String.valueOf(System.currentTimeMillis() / 1000));
953953
payInfo.put("nonceStr", System.currentTimeMillis() + "");
954954
payInfo.put("package", "prepay_id=" + prepayId);
955955
payInfo.put("signType", "MD5");
956956
if("NATIVE".equals(parameters.get("trade_type"))){
957-
payInfo.put("codeUrl", wxMpPrepayIdResult.getCode_url());
957+
payInfo.put("codeUrl", wxMpPrepayIdResult.getCode_url());
958958
}
959959

960960
String finalSign = WxCryptUtil.createSign(payInfo, this.wxMpConfigStorage.getPartnerKey());
@@ -966,7 +966,7 @@ public Map<String, String> getPayInfo(Map<String, String> parameters) throws WxE
966966
public WxMpPayResult getJSSDKPayResult(String transactionId, String outTradeNo) {
967967
String nonce_str = System.currentTimeMillis() + "";
968968

969-
SortedMap<String, String> packageParams = new TreeMap<String, String>();
969+
SortedMap<String, String> packageParams = new TreeMap<>();
970970
packageParams.put("appid", this.wxMpConfigStorage.getAppId());
971971
packageParams.put("mch_id", this.wxMpConfigStorage.getPartnerId());
972972
if (transactionId != null && !"".equals(transactionId.trim()))
@@ -1018,7 +1018,7 @@ public WxMpPayCallback getJSSDKCallbackData(String xmlData) {
10181018

10191019
@Override
10201020
public WxMpPayRefundResult refundPay(Map<String, String> parameters) throws WxErrorException {
1021-
SortedMap<String, String> refundParams = new TreeMap<String, String>(parameters);
1021+
SortedMap<String, String> refundParams = new TreeMap<>(parameters);
10221022
refundParams.put("appid", this.wxMpConfigStorage.getAppId());
10231023
refundParams.put("mch_id", this.wxMpConfigStorage.getPartnerId());
10241024
refundParams.put("nonce_str", System.currentTimeMillis() + "");
@@ -1080,7 +1080,7 @@ public boolean checkJSSDKCallbackDataSignature(Map<String, String> kvm, String s
10801080
public WxRedpackResult sendRedpack(Map<String, String> parameters) throws WxErrorException {
10811081
String nonce_str = System.currentTimeMillis() + "";
10821082

1083-
SortedMap<String, String> packageParams = new TreeMap<String, String>(parameters);
1083+
SortedMap<String, String> packageParams = new TreeMap<>(parameters);
10841084
packageParams.put("wxappid", this.wxMpConfigStorage.getAppId());
10851085
packageParams.put("mch_id", this.wxMpConfigStorage.getPartnerId());
10861086
packageParams.put("nonce_str", nonce_str);

0 commit comments

Comments
 (0)