[Improve] add @Override (#2224)

This commit is contained in:
mchgood
2024-07-05 22:52:51 +08:00
committed by GitHub
parent 65d69eb191
commit 4149a027a7
4 changed files with 4 additions and 0 deletions
@@ -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.");
@@ -88,6 +88,7 @@ public class MongodbSingleCollectImpl extends AbstractCollect {
/**
* 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();
@@ -110,6 +110,7 @@ public class RocketmqSingleCollectImpl extends AbstractCollect implements Dispos
* 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();
@@ -73,6 +73,7 @@ public class RedisCommonCollectImpl extends AbstractCollect {
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();