Skip to content

Commit

Permalink
modify from obj ==null to ValidateUtils.isNull
Browse files Browse the repository at this point in the history
  • Loading branch information
Liu-XinYuan committed Apr 22, 2021
1 parent c65ec68 commit 57a48da
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.xiaojukeji.kafka.manager.common.entity.pojo;

import com.xiaojukeji.kafka.manager.common.entity.dto.op.topic.TopicCreationDTO;
import com.xiaojukeji.kafka.manager.common.utils.ValidateUtils;

import java.util.Date;

Expand Down Expand Up @@ -95,7 +96,7 @@ public static TopicDO buildFrom(TopicCreationDTO dto) {
topicDO.setClusterId(dto.getClusterId());
topicDO.setTopicName(dto.getTopicName());
topicDO.setDescription(dto.getDescription());
topicDO.setPeakBytesIn(dto.getPeakBytesIn() == null ? -1L : dto.getPeakBytesIn());
topicDO.setPeakBytesIn(ValidateUtils.isNull(dto.getPeakBytesIn()) ? -1L : dto.getPeakBytesIn());
return topicDO;
}
}

0 comments on commit 57a48da

Please sign in to comment.