Authored by DengXinFei

修复空指针异常隐患

... ... @@ -78,6 +78,10 @@ public class ActivateUnionRest {
vo.setClient_type(ClientTypeEnum.IOS.getName());
}
String agent = request.getHeader("user-agent");
if(StringUtils.isEmpty(agent)){
log.warn("activateUnion failed. user-agent is null. agent is {}, request vo is {}", agent, vo);
return new UnionResponse(200,"success","user-agent is null");
}
String clientType = vo.getClient_type();
log.info("addMonitor user-agent={}", agent);
String[] arr = agent.split(";");
... ...