Commit 72270887 authored by shangying's avatar shangying

sonar问题修改7

parent b2b8e27e
......@@ -107,8 +107,10 @@ public class CashWithdrawalServiceImpl implements CashWithdrawalService{
}else{
return Result.buildFail(msg) ;
}
}else {
return Result.buildFail("获取结果值空context={}",context) ;
}
return Result.buildFail("获取结果值空context={}",context) ;
}
......
......@@ -2,6 +2,7 @@ package cn.quantgroup.cashloanflowboss.utils;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.lang3.StringUtils;
import javax.crypto.Cipher;
import javax.crypto.spec.SecretKeySpec;
......@@ -97,7 +98,7 @@ public class AESUtil {
*/
public static byte[] decryptAfterBase64DecodeToByte(String data, String key) {
try {
if (key == null || "".equals(key.trim().length())) {
if (StringUtils.isBlank(key)) {
return null;
}
byte[] raw = key.getBytes(data_encoding);
......
......@@ -16,7 +16,7 @@ public class GetBiNoAndFinanceProducts {
JSONArray financeProducts=new JSONArray();
JSONArray terms=new JSONArray();
JSONObject para1=new JSONObject();
if (productId == CommonType.PRODUCTTYPEONE.getCode() || productId==CommonType.PRODUCTTYPEFOUR.getCode() ||productId==CommonType.PRODUCTID900.getCode() ||productId==CommonType.PRODUCTID910.getCode() || productId == CommonType.PRODUCTTYPEONE.getCode()){
if (productId == CommonType.PRODUCTTYPEONE.getCode() || productId==CommonType.PRODUCTTYPEFOUR.getCode() || productId==CommonType.PRODUCTID900.getCode() || productId==CommonType.PRODUCTID910.getCode() || productId == CommonType.PRODUCTTYPEONE.getCode()){
if(productId == CommonType.PRODUCTID900.getCode()){
getResult.put("biNo", "9");
......
......@@ -120,7 +120,11 @@ public class EnvUtil {
break;
}
}
}else {
return env;
}
}else {
return env;
}
return env;
}
......@@ -141,6 +145,8 @@ public class EnvUtil {
break;
}
}
}else{
return env;
}
}
return env;
......
......@@ -184,6 +184,7 @@ public class HttpService {
}
if(Objects.isNull(response)){
log.info("当前的response对象是空:{}",response);
return resultEntity;
}else {
result = doResponse(response, urlString);
// 得到响应状态码
......@@ -276,6 +277,7 @@ public class HttpService {
if(Objects.isNull(response)){
log.info("当前的response对象是空:{}",response);
return resultEntity;
}else {
result = doResponse(response, url);
......@@ -355,7 +357,8 @@ public class HttpService {
if(response==null){
log.info("请求超时,最大超时时间:{},url:{}", CommonConstant.HTTPCLIENT_CONNECT_TIMEOUT, url);
result="";
return resultEntity;
}
......@@ -428,6 +431,9 @@ public class HttpService {
case 504:
System.out.println("下载504错误代码,网关超时,url:" + url);
break;
default:
System.out.println("下载其他错误代码,url:" + url);
break;
}
System.out.println(">>>>>>>>>>>>>>>>>>>>>");
System.out.println("打印获取的result: "+result);
......@@ -719,6 +725,9 @@ public class HttpService {
case 504:
System.out.println("下载504错误代码,网关超时,url:" + urlString);
break;
default:
System.out.println("下载其他错误代码,url:" + urlString);
break;
}
System.out.println(">>>>>>>>>>>>>>>>>>>>>");
System.out.println("打印获取的result: "+result);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment