REM:
1. 增加添加节点接口的设备IP空字符串判断
This commit is contained in:
chenlinghy 2020-05-29 16:34:28 +08:00
parent 8ab11aa2ff
commit 3d00e35524
1 changed files with 4 additions and 2 deletions

View File

@ -136,9 +136,11 @@ public class DisposeNodeManagerImpl implements DisposeNodeManager {
public MulReturnType<ErrorCode, String> addNewDisposeDevice(DisposeDevice dev) {
DisposeEntryManager dp;
if (dev.getType() == null || dev.getIpAddr() == null || !IPAddrType.isIpAddress(dev.getIpAddr())) {
if (dev.getType() == null || dev.getIpAddr() == null
|| dev.getIpAddr().length() == 0
|| !IPAddrType.isIpAddress(dev.getIpAddr())) {
log.error("Add device error: type {}, ip {}", dev.getType(), dev.getIpAddr());
return new MulReturnType<>(ErrorCode.ERR_PARAMEXCEPTION, String.valueOf(-1));
return new MulReturnType<>(ErrorCode.ERR_PARAMS, String.valueOf(-1));
}
try {