|
|
@@ -398,13 +398,13 @@ public class ProductUtils {
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
- if (HttpStatus.OK.value() == res.getStatusCode()) {
|
|
|
+ if (null != res && HttpStatus.OK.value() == res.getStatusCode()) {
|
|
|
List<ProductInfo> productInfoList = JSONObject.parseArray(res.getResponseText(), ProductInfo.class);
|
|
|
for (ProductInfo productInfo : productInfoList) {
|
|
|
resultMap.put(productInfo.getCode(), productInfo);
|
|
|
}
|
|
|
} else {
|
|
|
- logger.error("findByEnUUAndCodes http response status error: " + res.getStatusCode());
|
|
|
+ logger.error("findByEnUUAndCodes http response status error: " + res != null ? res.getStatusCode() : "access error");
|
|
|
}
|
|
|
}
|
|
|
return resultMap;
|