From ab327002c26e2a0082c0dcb1d525716b064d00d0 Mon Sep 17 00:00:00 2001 From: shashankrnr32 Date: Thu, 6 Apr 2023 01:53:01 +0530 Subject: [PATCH] Fix Sonar issues --- .../sharding/core/configuration/CollectionShardingOptions.java | 2 ++ .../sharding/core/configuration/CompositeShardingOptions.java | 2 ++ .../sharding/core/configuration/DatabaseShardingOptions.java | 2 ++ .../core/configuration/DelegatedCollectionShardingOptions.java | 3 +++ 4 files changed, 9 insertions(+) diff --git a/sharding-core/src/main/java/com/alpha/mongodb/sharding/core/configuration/CollectionShardingOptions.java b/sharding-core/src/main/java/com/alpha/mongodb/sharding/core/configuration/CollectionShardingOptions.java index 7560a654..af00056e 100644 --- a/sharding-core/src/main/java/com/alpha/mongodb/sharding/core/configuration/CollectionShardingOptions.java +++ b/sharding-core/src/main/java/com/alpha/mongodb/sharding/core/configuration/CollectionShardingOptions.java @@ -1,5 +1,6 @@ package com.alpha.mongodb.sharding.core.configuration; +import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.Setter; import lombok.ToString; @@ -19,6 +20,7 @@ * @author SHashank Sharma */ @ToString(callSuper = true) +@EqualsAndHashCode(callSuper = true) public class CollectionShardingOptions extends ShardingOptions { private final List defaultCollectionHints; diff --git a/sharding-core/src/main/java/com/alpha/mongodb/sharding/core/configuration/CompositeShardingOptions.java b/sharding-core/src/main/java/com/alpha/mongodb/sharding/core/configuration/CompositeShardingOptions.java index f9184450..b82640b5 100644 --- a/sharding-core/src/main/java/com/alpha/mongodb/sharding/core/configuration/CompositeShardingOptions.java +++ b/sharding-core/src/main/java/com/alpha/mongodb/sharding/core/configuration/CompositeShardingOptions.java @@ -1,6 +1,7 @@ package com.alpha.mongodb.sharding.core.configuration; import lombok.AccessLevel; +import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.Setter; import lombok.ToString; @@ -19,6 +20,7 @@ * @author SHashank Sharma */ @ToString(callSuper = true) +@EqualsAndHashCode(callSuper = true) public class CompositeShardingOptions extends DatabaseShardingOptions { @Getter(AccessLevel.PACKAGE) diff --git a/sharding-core/src/main/java/com/alpha/mongodb/sharding/core/configuration/DatabaseShardingOptions.java b/sharding-core/src/main/java/com/alpha/mongodb/sharding/core/configuration/DatabaseShardingOptions.java index 9108cb04..5ee74909 100644 --- a/sharding-core/src/main/java/com/alpha/mongodb/sharding/core/configuration/DatabaseShardingOptions.java +++ b/sharding-core/src/main/java/com/alpha/mongodb/sharding/core/configuration/DatabaseShardingOptions.java @@ -1,5 +1,6 @@ package com.alpha.mongodb.sharding.core.configuration; +import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.Setter; import lombok.ToString; @@ -17,6 +18,7 @@ * @author Shashank Sharma */ @ToString(callSuper = true) +@EqualsAndHashCode(callSuper = true) public class DatabaseShardingOptions extends ShardingOptions { private final List defaultDatabaseHints; diff --git a/sharding-core/src/main/java/com/alpha/mongodb/sharding/core/configuration/DelegatedCollectionShardingOptions.java b/sharding-core/src/main/java/com/alpha/mongodb/sharding/core/configuration/DelegatedCollectionShardingOptions.java index 0cc5368f..fd252934 100644 --- a/sharding-core/src/main/java/com/alpha/mongodb/sharding/core/configuration/DelegatedCollectionShardingOptions.java +++ b/sharding-core/src/main/java/com/alpha/mongodb/sharding/core/configuration/DelegatedCollectionShardingOptions.java @@ -1,5 +1,7 @@ package com.alpha.mongodb.sharding.core.configuration; +import lombok.EqualsAndHashCode; + /** * Delegated Collection Sharding options that is used with CompositeShardingOptions. * Use {@link CollectionShardingOptions} for defining sharding options for a collection @@ -8,6 +10,7 @@ * @author Shashank Sharma * @see com.alpha.mongodb.sharding.core.configuration.CollectionShardingOptions */ +@EqualsAndHashCode(callSuper = true) public class DelegatedCollectionShardingOptions extends CollectionShardingOptions { private final CompositeShardingOptions delegate;