Skip to content

Commit e594de5

Browse files
committed
removing equals and hashcode
Signed-off-by: salaboy <[email protected]>
1 parent 4a02e43 commit e594de5

File tree

4 files changed

+1
-103
lines changed

4 files changed

+1
-103
lines changed

sdk/src/main/java/io/dapr/client/domain/ComponentMetadata.java

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ public final class ComponentMetadata {
2424
private String type;
2525
private String version;
2626

27-
public ComponentMetadata() {
28-
}
29-
3027
/**
3128
* Constructor for a ComponentMetadata.
3229
*
@@ -51,26 +48,5 @@ public String getType() {
5148
public String getVersion() {
5249
return version;
5350
}
54-
55-
@Override
56-
public int hashCode() {
57-
return Objects.hash(name, type, version);
58-
}
59-
60-
@Override
61-
public boolean equals(Object obj) {
62-
if (this == obj) {
63-
return true;
64-
}
65-
if (obj == null) {
66-
return false;
67-
}
68-
if (getClass() != obj.getClass()) {
69-
return false;
70-
}
71-
ComponentMetadata other = (ComponentMetadata) obj;
72-
return Objects.equals(name, other.name) && Objects.equals(type, other.type)
73-
&& Objects.equals(version, other.version);
74-
}
75-
51+
7652
}

sdk/src/main/java/io/dapr/client/domain/DaprMetadata.java

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ public final class DaprMetadata {
2727
private List<ComponentMetadata> components;
2828
private List<SubscriptionMetadata> subscriptions;
2929

30-
public DaprMetadata() {
31-
}
32-
3330
/**
3431
* Constructor for a DaprMetadata.
3532
*
@@ -61,27 +58,5 @@ public List<ComponentMetadata> getComponents() {
6158
public List<SubscriptionMetadata> getSubscriptions() {
6259
return subscriptions;
6360
}
64-
65-
@Override
66-
public int hashCode() {
67-
return Objects.hash(id, runtimeVersion, components, subscriptions);
68-
}
69-
70-
@Override
71-
public boolean equals(Object obj) {
72-
if (this == obj) {
73-
return true;
74-
}
75-
if (obj == null) {
76-
return false;
77-
}
78-
if (getClass() != obj.getClass()) {
79-
return false;
80-
}
81-
DaprMetadata other = (DaprMetadata) obj;
82-
return Objects.equals(id, other.id) && Objects.equals(runtimeVersion, other.runtimeVersion)
83-
&& Objects.equals(components, other.components) && Objects.equals(subscriptions, other.subscriptions);
84-
}
85-
8661

8762
}

sdk/src/main/java/io/dapr/client/domain/RuleMetadata.java

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,12 @@
1313

1414
package io.dapr.client.domain;
1515

16-
import java.util.Objects;
17-
1816
/**
1917
* RuleMetadata describes the Subscription Rule's Metadata.
2018
*/
2119
public final class RuleMetadata {
2220
private String path;
2321

24-
public RuleMetadata() {
25-
}
26-
2722
public RuleMetadata(String path) {
2823
this.path = path;
2924
}
@@ -32,26 +27,4 @@ public String getPath() {
3227
return path;
3328
}
3429

35-
@Override
36-
public int hashCode() {
37-
return Objects.hash(path);
38-
}
39-
40-
@Override
41-
public boolean equals(Object obj) {
42-
if (this == obj) {
43-
return true;
44-
}
45-
if (obj == null) {
46-
return false;
47-
}
48-
if (getClass() != obj.getClass()) {
49-
return false;
50-
}
51-
RuleMetadata other = (RuleMetadata) obj;
52-
return Objects.equals(path, other.path);
53-
}
54-
55-
56-
5730
}

sdk/src/main/java/io/dapr/client/domain/SubscriptionMetadata.java

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ public final class SubscriptionMetadata {
2626
private String deadLetterTopic;
2727
private List<RuleMetadata> rules;
2828

29-
public SubscriptionMetadata() {
30-
}
31-
3229
/**
3330
* Constructor for a SubscriptionMetadata.
3431
*
@@ -62,27 +59,4 @@ public List<RuleMetadata> getRules() {
6259
return rules;
6360
}
6461

65-
@Override
66-
public int hashCode() {
67-
return Objects.hash(topic, pubsubname, deadLetterTopic, rules);
68-
}
69-
70-
@Override
71-
public boolean equals(Object obj) {
72-
if (this == obj) {
73-
return true;
74-
}
75-
if (obj == null) {
76-
return false;
77-
}
78-
if (getClass() != obj.getClass()) {
79-
return false;
80-
}
81-
SubscriptionMetadata other = (SubscriptionMetadata) obj;
82-
return Objects.equals(topic, other.topic) && Objects.equals(pubsubname, other.pubsubname)
83-
&& Objects.equals(deadLetterTopic, other.deadLetterTopic) && Objects.equals(rules, other.rules);
84-
}
85-
86-
87-
8862
}

0 commit comments

Comments
 (0)