Skip to content

Commit

Permalink
[Improve] add @OverRide (#2224)
Browse files Browse the repository at this point in the history
  • Loading branch information
mchgood authored Jul 5, 2024
1 parent 65d69eb commit 4149a02
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public class FtpCollectImpl extends AbstractCollect {
/**
* preCheck params
*/
@Override
public void preCheck(Metrics metrics) throws IllegalArgumentException{
if (metrics == null || metrics.getFtp() == null) {
throw new IllegalArgumentException("Ftp collect must has ftp params.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ public MongodbSingleCollectImpl() {
/**
* Check that the mongodb connection information in metrics is complete
*/
@Override
public void preCheck(Metrics metrics) throws IllegalArgumentException{
Assert.isTrue(metrics != null && metrics.getMongodb() != null, "Mongodb collect must has mongodb params");
MongodbProtocol mongodbProtocol = metrics.getMongodb();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ public void destroy() {
* preCheck params
* @param metrics metrics config
*/
@Override
public void preCheck(Metrics metrics) throws IllegalArgumentException {
Assert.isTrue(metrics != null && metrics.getRocketmq() != null, "Mongodb collect must has rocketmq params");
RocketmqProtocol rocketmq = metrics.getRocketmq();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ public RedisCommonCollectImpl() {
connectionCommonCache = new ConnectionCommonCache<>();
}

@Override
public void preCheck(Metrics metrics) throws IllegalArgumentException{
Assert.noNullElements(new Object[] {metrics, metrics.getRedis()}, "Redis collect must has redis params");
RedisProtocol redisProtocol = metrics.getRedis();
Expand Down

0 comments on commit 4149a02

Please sign in to comment.