修复问题
This commit is contained in:
@@ -10,6 +10,7 @@ import com.sunyard.util.SYMUtil;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import racal.sunyard.main.SydApi4j;
|
||||
|
||||
import javax.annotation.CheckForNull;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@@ -131,7 +132,7 @@ public class SydApi4Database implements SydApi {
|
||||
if (null == this.hsms || this.hsms.length < 1) {
|
||||
throw new SydApiException(-1);
|
||||
}
|
||||
|
||||
@CheckForNull
|
||||
SydApiException le = null;
|
||||
|
||||
updateLastUseTime();
|
||||
@@ -190,6 +191,7 @@ public class SydApi4Database implements SydApi {
|
||||
log.debug("Util.hexString2Bytes方法返回值:{}", Arrays.toString(procData));
|
||||
|
||||
}
|
||||
@CheckForNull
|
||||
SydApiException le = null;
|
||||
updateLastUseTime();
|
||||
for (SydApi4j api : this.hsms) {
|
||||
@@ -252,6 +254,7 @@ public class SydApi4Database implements SydApi {
|
||||
|
||||
updateLastUseTime();
|
||||
String keyIndex = String.format("%08d", iKeyIndex);
|
||||
@CheckForNull
|
||||
SydApiException le = null;
|
||||
for (SydApi4j api : this.hsms) {
|
||||
if (null == api) {
|
||||
@@ -332,7 +335,7 @@ public class SydApi4Database implements SydApi {
|
||||
for (int i = 0; i < iKeyIndex.length; i++) {
|
||||
keys[i] = "SK" + SYMUtil.genPrivateKeyMark("000000", "00A", String.format("%08d", iKeyIndex[i]));
|
||||
}
|
||||
|
||||
@CheckForNull
|
||||
SydApiException le = null;
|
||||
for (SydApi4j api : this.hsms) {
|
||||
if (null == api) {
|
||||
@@ -391,7 +394,7 @@ public class SydApi4Database implements SydApi {
|
||||
}
|
||||
updateLastUseTime();
|
||||
String keyIndex = String.format("%08d", iKeyIndex);
|
||||
|
||||
@CheckForNull
|
||||
SydApiException le = null;
|
||||
for (SydApi4j api : this.hsms) {
|
||||
if (null == api) {
|
||||
@@ -443,6 +446,9 @@ public class SydApi4Database implements SydApi {
|
||||
}
|
||||
|
||||
} catch (SydApiException e) {
|
||||
if (null==e){
|
||||
|
||||
}
|
||||
le = e;
|
||||
if (e.getRetCode() < 0) {
|
||||
log.error("HA 重试");
|
||||
@@ -453,6 +459,7 @@ public class SydApi4Database implements SydApi {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw le;
|
||||
}
|
||||
|
||||
@@ -471,6 +478,7 @@ public class SydApi4Database implements SydApi {
|
||||
for (int i = 0; i < iKeyIndex.length; i++) {
|
||||
keys[i] = "SK" + SYMUtil.genPrivateKeyMark("000000", "00A", String.format("%08d", iKeyIndex[i]));
|
||||
}
|
||||
@CheckForNull
|
||||
SydApiException le = null;
|
||||
for (SydApi4j api : this.hsms) {
|
||||
if (null == api) {
|
||||
@@ -538,6 +546,7 @@ public class SydApi4Database implements SydApi {
|
||||
for (int i = 0; i < iKeyIndex.length; i++) {
|
||||
keys[i] = "SK" + SYMUtil.genPrivateKeyMark("000000", "00A", String.format("%08d", iKeyIndex[i]));
|
||||
}
|
||||
@CheckForNull
|
||||
SydApiException le = null;
|
||||
for (SydApi4j api : this.hsms) {
|
||||
if (null == api) {
|
||||
@@ -608,7 +617,7 @@ public class SydApi4Database implements SydApi {
|
||||
if (Consts.PkgNumAll != iPkgNum && Consts.PkgNumHead != iPkgNum) {
|
||||
iv = pcProcData.getBytes();
|
||||
}
|
||||
|
||||
@CheckForNull
|
||||
SydApiException le = null;
|
||||
updateLastUseTime();
|
||||
for (SydApi4j api : this.hsms) {
|
||||
@@ -707,6 +716,7 @@ public class SydApi4Database implements SydApi {
|
||||
}
|
||||
String keyIndex = "SK" + SYMUtil.genPrivateKeyMark("000000", "00A", String.format("%08d", iKeyIndex));
|
||||
log.debug("\"SK\" + SYMUtil.genPrivateKeyMark方法返回值:{}", keyIndex);
|
||||
@CheckForNull
|
||||
SydApiException le = null;
|
||||
updateLastUseTime();
|
||||
for (SydApi4j api : this.hsms) {
|
||||
|
||||
@@ -33,13 +33,16 @@ public class HsmLinkInfo {
|
||||
|
||||
log.debug("mutiHsmLinkInfo方法接收参数:pcIpList:{},iPortList:{},iConnectTimeOut:{},iDealTimeOut:{}", Arrays.toString(pcIpList),Arrays.toString(iPortList),iConnectTimeOut,iAllDealTimeOut);
|
||||
log.debug("链接参数整理");
|
||||
if (null == pcIpList &&
|
||||
null == iPortList &&
|
||||
pcIpList.length != iPortList.length) {
|
||||
if (null == pcIpList ||
|
||||
null == iPortList
|
||||
) {
|
||||
log.error("ip 和 port 为空");
|
||||
throw new IllegalArgumentException("入参错误");
|
||||
}
|
||||
if ( pcIpList.length != iPortList.length){
|
||||
log.error("加密机配置 ip 和 port 数量错误");
|
||||
throw new IllegalArgumentException("入参错误");
|
||||
}
|
||||
|
||||
if ( iAllDealTimeOut < pcIpList.length) {
|
||||
log.error("加密机配置交易时间过短");
|
||||
throw new IllegalArgumentException("入参错误");
|
||||
|
||||
Reference in New Issue
Block a user