cgi 接口服务 防空指针处理

This commit is contained in:
leijun
2019-02-28 09:54:05 +08:00
parent 518600da40
commit ba56de3336

View File

@@ -727,14 +727,19 @@ public class ConfigServiceUtil {
logger.info("cgi info:"+result); logger.info("cgi info:"+result);
}else{ }else{
Map<String, String> map = new HashMap<String, String>(); Map<String, String> map = new HashMap<String, String>();
map = (Map<String, String>) JSON.parse(result); if(!StringUtil.isEmpty(result)){
String error = map.get("error"); map = (Map<String, String>) JSON.parse(result);
if (!StringUtil.isEmpty(error)) { String error = map.get("error");
error=cgiError(error); if (!StringUtil.isEmpty(error)) {
throw new MaatConvertException(error); error=cgiError(error);
throw new MaatConvertException(error);
}else{
throw new MaatConvertException(null);
}
}else{ }else{
throw new MaatConvertException(null); throw new MaatConvertException(null);
} }
} }
} catch (Exception e) { } catch (Exception e) {
throw e; throw e;