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
Showing 4 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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.");
Original file line number Diff line number Diff line change
@@ -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();
Original file line number Diff line number Diff line change
@@ -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();
Original file line number Diff line number Diff line change
@@ -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();

0 comments on commit 4149a02

Please sign in to comment.